Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps link for iOS

I want to have a link to a Google Map on our company mobile website. The problem is, if I make a link, it takes you to the Google Maps website. It needs to open up the app.

I have found out that if you start the url with "comgooglemaps://" it will open google maps. However, this poses the problem that if a iOS user does not have Google Maps installed the link will not work.

Is there a way to open Google Maps if it is installed, but open the browser if not (I don't believe you can open Apple Maps from a website due to the nature of their API)

Thanks

EDIT: Just a heads up, this is being done on a website, not an app. So it needs to be done through HTML, Javascript, PHP etc. NOT a programing language.

like image 970
collin Avatar asked Apr 18 '26 21:04

collin


1 Answers

Have a look at the Apple Maps Links page.

Basically you link to maps.apple.com and it redirects to Google Maps if needed. Here's an example from the page:

http://maps.apple.com/?daddr=San+Francisco,+CA&saddr=cupertino

With latitude, longitude and zoom:

http://maps.apple.com/?ll=53.01,6.01&z=15

like image 122
nevan king Avatar answered Apr 20 '26 12:04

nevan king



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!