opc0de opc0de - 15 days ago 7
Android Question

Open google maps from hyperlink

I am trying to design a webpage specially for android users so i was wondering if there is a hyper link format that can open up google maps just like the call function eg

<a href="tel:0766551121"> Call me now </a>

Answer

If by "open up Google Maps" you mean the native Android Google Maps application instead of opening the link in the Android's browser then according to Geo Intents you can use the following Geo URI formats that trigger intents that will open the Google Maps application on the device to the given location or query:

  • geo:latitude,longitude
  • geo:latitude,longitude?z=zoom
  • geo:0,0?q=my+street+address
  • geo:0,0?q=business+near+city

For Google Streetview you can use:

  • google.streetview:cbll=lat,lng&cbp=1,yaw,,pitch,zoom&mz=mapZoom

For details on the available options for each geo intent URI see the first URL.

Comments