I'm trying to set a label on a map marker using the map links api. According to apple's docs if I use the 'q' param with the 'address' param it will take the 'q' param as a label. But I can't make it to work.
Blockquote The q parameter can also be used as a label if the location is explicitly defined in the ll or address parameters docs.
This is the url I've tried
http://maps.apple.com/?address=San+Jose&q=Blah
I want it to say 'Blah' as the marker's label.
Thanks.
Show labels in satellite view: Click the Map button in the toolbar, click Satellite, then select Labels.
The anchor property is required in order for the marker to render correctly when the zoom level changes. Learn more about using Symbols to create vector-based icons for markers (and polylines).
I just ran into this issue and submitted a bug report to Apple. According to their docs, the combination of the q
and address
parameters should set the marker label to the value of q
.
In the meantime, you can get this working by using the ll
parameter:
http://maps.apple.com/?q=Blah&ll=34.0836834,-118.3468481
More on the ll
parameter:
A comma-separated pair of floating point values that represent latitude and longitude (in that order).
https://developer.apple.com/library/content/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html#//apple_ref/doc/uid/TP40007899-CH5-SW1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With