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