Commit a4812c17 authored by 7c00's avatar 7c00

Fix iOS Marker onPress and onInfoWindowPress bug

ref #143
parent 9bd1c7a1
...@@ -119,21 +119,17 @@ RCT_EXPORT_METHOD(animateTo:(nonnull NSNumber *)reactTag params:(NSDictionary *) ...@@ -119,21 +119,17 @@ RCT_EXPORT_METHOD(animateTo:(nonnull NSNumber *)reactTag params:(NSDictionary *)
} }
- (void)mapView:(AMapView *)mapView didSelectAnnotationView:(MAAnnotationView *)view { - (void)mapView:(AMapView *)mapView didSelectAnnotationView:(MAAnnotationView *)view {
if ([view.annotation isKindOfClass:[AMapMarker class]]) {
AMapMarker *marker = [mapView getMarker:view.annotation]; AMapMarker *marker = [mapView getMarker:view.annotation];
if (marker.onPress) { if (marker.onPress) {
marker.onPress(nil); marker.onPress(nil);
} }
}
} }
- (void)mapView:(AMapView *)mapView didAnnotationViewCalloutTapped:(MAAnnotationView *)view { - (void)mapView:(AMapView *)mapView didAnnotationViewCalloutTapped:(MAAnnotationView *)view {
if ([view.annotation isKindOfClass:[AMapMarker class]]) {
AMapMarker *marker = [mapView getMarker:view.annotation]; AMapMarker *marker = [mapView getMarker:view.annotation];
if (marker.onInfoWindowPress) { if (marker.onInfoWindowPress) {
marker.onInfoWindowPress(nil); marker.onInfoWindowPress(nil);
} }
}
} }
- (void)mapView:(AMapView *)mapView annotationView:(MAAnnotationView *)view didChangeDragState:(MAAnnotationViewDragState)newState - (void)mapView:(AMapView *)mapView annotationView:(MAAnnotationView *)view didChangeDragState:(MAAnnotationViewDragState)newState
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment