Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/104.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用mapbox ios标记执行操作_Ios_Swift_Mapbox_Markers - Fatal编程技术网

如何使用mapbox ios标记执行操作

如何使用mapbox ios标记执行操作,ios,swift,mapbox,markers,Ios,Swift,Mapbox,Markers,如果用户双击标记,是否有方法在屏幕上检测? 或者如果他们点击并保持屏幕一段时间 Mapbox具有以下返回true的方法,该方法发出信号以显示有关当前位置/标记的信息。检查用户是否单击此白色部分或双击当前标记的最佳方法是什么 提前谢谢你 /* Tapping the marker */ func mapView(mapView: MGLMapView!, annotationCanShowCallout annotation: MGLAnnotation!) -> Bool {

如果用户双击标记,是否有方法在屏幕上检测? 或者如果他们点击并保持屏幕一段时间

Mapbox具有以下返回true的方法,该方法发出信号以显示有关当前位置/标记的信息。检查用户是否单击此白色部分或双击当前标记的最佳方法是什么

提前谢谢你

    /* Tapping the marker */
 func mapView(mapView: MGLMapView!, annotationCanShowCallout annotation: MGLAnnotation!) -> Bool {
    return true

    /*THIS WHERE THE TAP IS BEING RECOGNIZED, 
      return true here allows the information about the current marker (name and address)*/

    }//eom


要检测用户对白色部分(注释标注)的触摸,可以使用以下方法:

func mapView(mapView: MGLMapView, tapOnCalloutForAnnotation annotation: MGLAnnotation) {
    print("tap on callout")
}

有关更多信息,请参阅mapbox文档::

我想知道,如果您获得了此问题的解决方案,请让我知道或发送给我,因为我面临相同的问题。
func mapView(mapView: MGLMapView, tapOnCalloutForAnnotation annotation: MGLAnnotation) {
    print("tap on callout")
}