Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to open 'Waze' from react app?

I want to have a google maps marker with two options:

  • one for open google maps with the specific lng/lat - done.
  • two - open "waze" application with the specific lng/lat - how can i do that?

this is for the google maps:

<a href={"https://www.google.com/maps/?q=" + this.state.linkLat + "," +
    this.state.linkLng} target="_blank"><img alt="gmap" src={gmap}/></a>
like image 526
ofirthedev Avatar asked Nov 01 '25 03:11

ofirthedev


1 Answers

This should work.

<a 
  href={`https://waze.com/ul?ll=${this.state.linkLat},${this.state.linkLng}&navigate=yes`} 
  target="_blank">
    Open in Waze
</a>
like image 91
Andrew Usher Avatar answered Nov 03 '25 04:11

Andrew Usher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!