Commit 9384e0a0 authored by 7c00's avatar 7c00

Resolve #26

parent 2b8b18a5
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
@property(nonatomic, copy) RCTBubblingEventBlock onDragEnd; @property(nonatomic, copy) RCTBubblingEventBlock onDragEnd;
- (BOOL)active; - (BOOL)active;
- (void)setActive:(BOOL)active;
- (MAAnnotationView *)annotationView; - (MAAnnotationView *)annotationView;
- (void)setMapView:(AMapView *)mapView; - (void)setMapView:(AMapView *)mapView;
- (void)updateActive; - (void)updateActive;
......
...@@ -126,6 +126,13 @@ RCT_EXPORT_METHOD(animateTo:(nonnull NSNumber *)reactTag params:(NSDictionary *) ...@@ -126,6 +126,13 @@ RCT_EXPORT_METHOD(animateTo:(nonnull NSNumber *)reactTag params:(NSDictionary *)
} }
} }
- (void)mapView:(MAMapView *)mapView didDeselectAnnotationView:(MAAnnotationView *)view {
if ([view.annotation isKindOfClass:[AMapMarker class]]) {
AMapMarker *marker = (AMapMarker *) view.annotation;
marker.active = NO;
}
}
- (void)mapView:(MAMapView *)mapView didAnnotationViewCalloutTapped:(MAAnnotationView *)view { - (void)mapView:(MAMapView *)mapView didAnnotationViewCalloutTapped:(MAAnnotationView *)view {
if ([view.annotation isKindOfClass:[AMapMarker class]]) { if ([view.annotation isKindOfClass:[AMapMarker class]]) {
AMapMarker *marker = (AMapMarker *) view.annotation; AMapMarker *marker = (AMapMarker *) view.annotation;
......
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