كيف أحصل على منسقات MkannotationView؟
-
21-09-2019 - |
سؤال
لدي طريقة مثل هذه:
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
باستخدام هذا ، هل يمكنني الحصول على الإحداثيات؟
المحلول
return view.annotation.coordinate;
.annotation
منشأه: http://developer.apple.com/iphone/library/documentation/mapkit/reference/mkannotationview_class/reference/reference.html#//apple_ref/doc/uid/tp40008207-sw7.coordinate
منشأه: http://developer.apple.com/iphone/library/documentation/mapkit/reference/mkannotation_protocol/reference/reference.html#//apple_ref/doc/uid/tp40008208-ch1-sw2
لا تنتمي إلى StackOverflow