Reputation: 1075
im making an iphone web based app and i have embedded a google maps with a place marker for a shop and i want to know how you make it so when the user taps on it, it loads up google maps app and allows them to navigate to it.
Upvotes: 1
Views: 407
Reputation: 1269
Apple has a URL Scheme Reference for Map Links that describe this.
A link as simple as this would work. I just tested it to be sure.
<a href="http://maps.google.com/maps?q=London">London</a>
Here's also a discussion of setting the Map Marker link.
Upvotes: 0
Reputation: 3012
It's actually quite simple, just put your google map inside a link to the actual location in google maps, like so:
<a href="http://maps.google.com/maps/place?cid=12131408883620679552&q=Chelsea+Market,+New+York,+NY,+United+States&hl=en&ved=0CBMQ-gswAA&sa=X&ei=AbqjTvjcBILmygTh2tjPCQ&sig2=zXJOwK02xhQK3vS7iyA56A" target="_blank" class="gmap">
<img src="http://maps.googleapis.com/maps/api/staticmap?center=Chelsea+Market,+New+York,+NY,+United+States&zoom=13&size=470x220&sensor=false&markers=color:black%7Clabel:S%7C40.74362,-74.00726">
</a>
When the user clicks, Google Maps will kick in.
Upvotes: 1