1 /** 2 * Copyright (c) 2015-present, Facebook, Inc. 3 * All rights reserved. 4 * 5 * This source code is licensed under the BSD-style license found in the 6 * LICENSE file in the root directory of this source tree. An additional grant 7 * of patent rights can be found in the PATENTS file in the same directory. 8 */ 9 10 #import "AIRMapMarker.h" 11 #import "AIRMapCallout.h" 12 13 #import <MapKit/MapKit.h> 14 #import <UIKit/UIKit.h> 15 16 #import <React/RCTComponent.h> 17 #import "AIRMap.h" 18 #import "SMCalloutView.h" 19 #import "RCTConvert+AirMap.h" 20 21 @class RCTBridge; 22 23 @interface AIRMapMarker : MKAnnotationView <MKAnnotation> 24 25 @property (nonatomic, strong) AIRMapCallout *calloutView; 26 @property (nonatomic, weak) AIRMap *map; 27 @property (nonatomic, weak) RCTBridge *bridge; 28 29 @property (nonatomic, strong) NSString *identifier; 30 @property (nonatomic, copy) NSString *imageSrc; 31 @property (nonatomic, copy) NSString *title; 32 @property (nonatomic, copy) NSString *subtitle; 33 @property (nonatomic, assign) CLLocationCoordinate2D coordinate; 34 @property (nonatomic, strong) UIColor *pinColor; 35 @property (nonatomic, assign) NSInteger zIndex; 36 @property (nonatomic, assign) double opacity; 37 @property (nonatomic, assign) BOOL isPreselected; 38 39 @property (nonatomic, copy) RCTBubblingEventBlock onPress; 40 @property (nonatomic, copy) RCTDirectEventBlock onSelect; 41 @property (nonatomic, copy) RCTDirectEventBlock onDeselect; 42 @property (nonatomic, copy) RCTDirectEventBlock onCalloutPress; 43 @property (nonatomic, copy) RCTDirectEventBlock onDragStart; 44 @property (nonatomic, copy) RCTDirectEventBlock onDrag; 45 @property (nonatomic, copy) RCTDirectEventBlock onDragEnd; 46 47 48 - (MKAnnotationView *)getAnnotationView; 49 - (void)fillCalloutView:(SMCalloutView *)calloutView; 50 - (BOOL)shouldShowCalloutView; 51 - (void)showCalloutView; 52 - (void)hideCalloutView; 53 - (void)addTapGestureRecognizer; 54 55 @end 56 57 58 @interface AIREmptyCalloutBackgroundView : SMCalloutBackgroundView 59 @end 60