Reputation: 2142
I'm writing an HTML <a>
tag to open the native Apple Maps application on iOS from a Cordova app (i.e. a webpage). This is what I have so far:
<a href="maps:ll=38.897096,-77.036545" class="context-block-button map-button" id="map-button-1"><i class="ss-map icon-left"></i><span>Open in map (maps:)</span></a>
This works well, and will open the app at the White House in Washington DC. That's the correct place to go. But does anybody know how I can add a label to the map somehow? I tried using ?q=Label
but that just makes the app search after taking me to the specified coordinates.
Thanks
Upvotes: 4
Views: 1679
Reputation: 1473
<a href="
http://maps.apple.com/?lsp=9902&auid=4158007438164491913&sll=38.897517,-77.036542&q=The%20White%20House&hnear=1600%20Pennsylvania%20Ave%20NW,%20Washington,%20DC%2020500-0003,%20United%20States
">
<span>Open in map (maps:)</span>
</a>
With this link you get asked if you would like to open the link in MAPS.
MAPS goes to the coordinates showing the Label!
Upvotes: 2