Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
170 views
in Technique[技术] by (71.8m points)

android - 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>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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 see the official Google Maps Intents documentation


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...