Jake McAllister
Jake McAllister

Reputation: 1075

Jquery google maps linking with iPhone maps

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

Answers (2)

uadrive
uadrive

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

leopic
leopic

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&amp;q=Chelsea+Market,+New+York,+NY,+United+States&amp;hl=en&amp;ved=0CBMQ-gswAA&amp;sa=X&amp;ei=AbqjTvjcBILmygTh2tjPCQ&amp;sig2=zXJOwK02xhQK3vS7iyA56A" target="_blank" class="gmap">
                <img src="http://maps.googleapis.com/maps/api/staticmap?center=Chelsea+Market,+New+York,+NY,+United+States&amp;zoom=13&amp;size=470x220&amp;sensor=false&amp;markers=color:black%7Clabel:S%7C40.74362,-74.00726">
            </a>

When the user clicks, Google Maps will kick in.

Upvotes: 1

Related Questions