MacMac
MacMac

Reputation: 35351

How to open Google maps application using the "maps:" scheme?

Firstly, I'm making a web application, not an iPhone application.


How do you open the Google maps application with a location passed to it so you can view it on the app?

I put this as a link:

<a href="maps:58.09423,67.97662">Open in Google Maps</a>

It does open the Google Maps application but it doesn't zoom into the place with a marker as requested, how do I do this?

Upvotes: 2

Views: 2378

Answers (3)

kmote
kmote

Reputation: 16775

Based on the Apple docs, I believe what you are looking for is:

<a href="http://maps.google.com/maps?ll=58.09423,67.97662">Open in Google Maps</a>

Upvotes: 3

leebriggs
leebriggs

Reputation: 3257

You no longer use the maps: protocol, just link directly to google. I believe maps: predates the phone, possibly a Symbian convention in origin.

Developer reference.

https://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html

Upvotes: 0

Zebs
Zebs

Reputation: 5448

The following code will open google maps with a marker on the requested location.

[someUIApplication openURL:[NSURL URLWithString:@"http://maps.google.com/maps?q=58.09423,67.97662"]]

Upvotes: 0

Related Questions