简体   繁体   English

iOS Native Maps URL方案多个图钉

[英]iOS Native Maps URL scheme multiple pins

I am using PhoneGap to build applications for iOS and Android. 我正在使用PhoneGap构建适用于iOS和Android的应用程序。

I want to open the native map application on iOS with multiple pins. 我想使用多个图钉在iOS上打开本机地图应用程序。 I am able to open the native map on iOS device using their Maps URL scheme using a ?q=lat,long parameter 我可以使用?q = lat,long参数使用其Maps URL方案在iOS设备上打开本机地图

http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html

Is it possible to open the native maps app and showing multiple pings instead of only one? 是否可以打开本机地图应用程序并显示多个ping,而不是仅显示一个?

I have tried enough to search for it but there isn't enough documentation to answer my question. 我已经尝试了足够的搜索方法,但是没有足够的文档来回答我的问题。

Thank you for the help 感谢您的帮助

Create an MKMapItem for each pin you want to display, save the MKMapItems to an array, and then use openMapsWithItems:launchOptions: to send the array to the Maps app. 为要显示的每个图钉创建一个MKMapItem,将MKMapItems保存到数组,然后使用openMapsWithItems:launchOptions:将数组发送到Maps应用。 The Maps app will display a pin for each item in the array. Maps应用将为阵列中的每个项目显示一个图钉。

I have not used this myself, but it's from Apple's documentation at: 我本人并没有使用过它,但来自Apple的文档:

http://developer.apple.com/library/ios/documentation/MapKit/Reference/MKMapItem_class/Reference/Reference.html#//apple_ref/occ/clm/MKMapItem/openMapsWithItems:launchOptions : http://developer.apple.com/library/ios/documentation/MapKit/Reference/MKMapItem_class/Reference/Reference.html#//apple_ref/occ/clm/MKMapItem/openMapsWithItems:launchOptions

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM