如何通过URL中的查询字符串添加苹果地图标记?

如何通过URL中的查询字符串添加苹果地图标记?

问题描述:

当我使用URL链接从我的应用程序在iPhone上打开地图时,我想在地图应用程序中添加地图标记(如Google地图)。

I want add map marker (like google map) in the map app when I use a url link to open the map on the iPhone from my app.

like这:< a href = http://maps.apple.com?ll=latitude,longtitude>

我可以打开苹果地图,并且地图中心在我想要的位置上,但是如何同时添加标记?我不确定如何在网址上添加查询字符串

I can open the apple map and the map center is on the location I want, but how to add a marker at the same time? I am not sure how query string I can add on the url

我已经阅读了下面的文档

I have already read the doc below

https ://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html#//apple_ref/doc/uid/TP40007899-CH5-SW1

谢谢!

如果要使用内部地图应用程序(Apple Map),则应更改地图协议。

If you wanna use internal map app (Apple Map), you should change your protocol for maps.

赞:

maps://maps.apple.com/?q={latitude},{longitude}

现在 http://maps.apple.com 查询将重定向到Google地图:O

Now http://maps.apple.com query will redirect to google map :O