Commit a4812c17 authored by 7c00's avatar 7c00

Fix iOS Marker onPress and onInfoWindowPress bug

ref #143
parent 9bd1c7a1
...@@ -119,20 +119,16 @@ RCT_EXPORT_METHOD(animateTo:(nonnull NSNumber *)reactTag params:(NSDictionary *) ...@@ -119,20 +119,16 @@ 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);
}
} }
} }
......
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