react-native-maps 2.0.0-beta.4 → 2.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -5
- package/android/src/main/java/com/rnmaps/maps/MapCalloutManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapCircleManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapGradientPolyline.java +4 -4
- package/android/src/main/java/com/rnmaps/maps/MapGradientPolylineManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapHeatmapManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapLiteManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapLocalTile.java +4 -4
- package/android/src/main/java/com/rnmaps/maps/MapLocalTileManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapMarker.java +2 -2
- package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +10 -27
- package/android/src/main/java/com/rnmaps/maps/MapOverlayManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapPolygonManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapPolylineManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapTileProvider.java +4 -4
- package/android/src/main/java/com/rnmaps/maps/MapUrlTileManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapView.java +9 -9
- package/android/src/main/java/com/rnmaps/maps/{MapModule.java → MapViewModule.java} +18 -18
- package/android/src/main/java/com/rnmaps/maps/MapWMSTile.java +6 -6
- package/android/src/main/java/com/rnmaps/maps/MapWMSTileManager.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapsPackage.java +1 -1
- package/android/src/main/java/com/rnmaps/maps/SizeReportingShadowNode.java +1 -1
- package/ios/{AirGoogleMaps/AIRDummyView.h → GoogleMaps/RNMDummyView.h} +3 -3
- package/ios/{AirGoogleMaps/AIRDummyView.m → GoogleMaps/RNMDummyView.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGMSMarker.h → GoogleMaps/RNMGMSMarker.h} +6 -6
- package/ios/{AirGoogleMaps/AIRGMSMarker.m → GoogleMaps/RNMGMSMarker.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGMSPolygon.h → GoogleMaps/RNMGMSPolygon.h} +4 -4
- package/ios/{AirGoogleMaps/AIRGMSPolygon.m → GoogleMaps/RNMGMSPolygon.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGMSPolyline.h → GoogleMaps/RNMGMSPolyline.h} +4 -4
- package/ios/{AirGoogleMaps/AIRGMSPolyline.m → GoogleMaps/RNMGMSPolyline.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGoogleMap.h → GoogleMaps/RNMGoogleMap.h} +5 -5
- package/ios/{AirGoogleMaps/AIRGoogleMap.m → GoogleMaps/RNMGoogleMap.m} +77 -77
- package/ios/{AirGoogleMaps/AIRGoogleMapCallout.h → GoogleMaps/RNMGoogleMapCallout.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapCallout.m → GoogleMaps/RNMGoogleMapCallout.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGoogleMapCalloutManager.h → GoogleMaps/RNMGoogleMapCalloutManager.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapCalloutManager.m → GoogleMaps/RNMGoogleMapCalloutManager.m} +7 -7
- package/ios/{AirGoogleMaps/AIRGoogleMapCalloutSubview.h → GoogleMaps/RNMGoogleMapCalloutSubview.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapCalloutSubview.m → GoogleMaps/RNMGoogleMapCalloutSubview.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGoogleMapCalloutSubviewManager.h → GoogleMaps/RNMGoogleMapCalloutSubviewManager.h} +3 -3
- package/ios/GoogleMaps/RNMGoogleMapCalloutSubviewManager.m +28 -0
- package/ios/{AirGoogleMaps/AIRGoogleMapCircle.h → GoogleMaps/RNMGoogleMapCircle.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapCircle.m → GoogleMaps/RNMGoogleMapCircle.m} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapCircleManager.h → GoogleMaps/RNMGoogleMapCircleManager.h} +2 -2
- package/ios/{AirGoogleMaps/AIRGoogleMapCircleManager.m → GoogleMaps/RNMGoogleMapCircleManager.m} +7 -7
- package/ios/{AirGoogleMaps/AIRGoogleMapHeatmap.h → GoogleMaps/RNMGoogleMapHeatmap.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapHeatmap.m → GoogleMaps/RNMGoogleMapHeatmap.m} +4 -4
- package/ios/GoogleMaps/RNMGoogleMapHeatmapManager.h +11 -0
- package/ios/{AirGoogleMaps/AIRGoogleMapHeatmapManager.m → GoogleMaps/RNMGoogleMapHeatmapManager.m} +9 -9
- package/ios/{AirGoogleMaps/AIRGoogleMapManager.h → GoogleMaps/RNMGoogleMapManager.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapManager.m → GoogleMaps/RNMGoogleMapManager.m} +63 -229
- package/ios/{AirGoogleMaps/AIRGoogleMapMarker.h → GoogleMaps/RNMGoogleMapMarker.h} +15 -15
- package/ios/{AirGoogleMaps/AIRGoogleMapMarker.m → GoogleMaps/RNMGoogleMapMarker.m} +23 -23
- package/ios/{AirGoogleMaps/AIRGoogleMapMarkerManager.h → GoogleMaps/RNMGoogleMapMarkerManager.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapMarkerManager.m → GoogleMaps/RNMGoogleMapMarkerManager.m} +20 -20
- package/ios/{AirGoogleMaps/AIRGoogleMapOverlay.h → GoogleMaps/RNMGoogleMapOverlay.h} +4 -4
- package/ios/{AirGoogleMaps/AIRGoogleMapOverlay.m → GoogleMaps/RNMGoogleMapOverlay.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGoogleMapOverlayManager.h → GoogleMaps/RNMGoogleMapOverlayManager.h} +2 -2
- package/ios/{AirGoogleMaps/AIRGoogleMapOverlayManager.m → GoogleMaps/RNMGoogleMapOverlayManager.m} +6 -6
- package/ios/{AirGoogleMaps/AIRGoogleMapPolygon.h → GoogleMaps/RNMGoogleMapPolygon.h} +7 -7
- package/ios/{AirGoogleMaps/AIRGoogleMapPolygon.m → GoogleMaps/RNMGoogleMapPolygon.m} +7 -7
- package/ios/{AirGoogleMaps/AIRGoogleMapPolylineManager.h → GoogleMaps/RNMGoogleMapPolygonManager.h} +2 -2
- package/ios/{AirGoogleMaps/AIRGoogleMapPolygonManager.m → GoogleMaps/RNMGoogleMapPolygonManager.m} +10 -10
- package/ios/{AirGoogleMaps/AIRGoogleMapPolyline.h → GoogleMaps/RNMGoogleMapPolyline.h} +7 -7
- package/ios/{AirGoogleMaps/AIRGoogleMapPolyline.m → GoogleMaps/RNMGoogleMapPolyline.m} +9 -9
- package/ios/{AirGoogleMaps/AIRGoogleMapPolygonManager.h → GoogleMaps/RNMGoogleMapPolylineManager.h} +2 -2
- package/ios/{AirGoogleMaps/AIRGoogleMapPolylineManager.m → GoogleMaps/RNMGoogleMapPolylineManager.m} +9 -9
- package/ios/{AirGoogleMaps/AIRGoogleMapUrlTile.h → GoogleMaps/RNMGoogleMapUrlTile.h} +2 -2
- package/ios/{AirGoogleMaps/AIRGoogleMapUrlTile.m → GoogleMaps/RNMGoogleMapUrlTile.m} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapUrlTileManager.h → GoogleMaps/RNMGoogleMapUrlTileManager.h} +2 -2
- package/ios/{AirGoogleMaps/AIRGoogleMapURLTileManager.m → GoogleMaps/RNMGoogleMapUrlTileManager.m} +7 -7
- package/ios/GoogleMaps/RNMGoogleMapViewModule.h +5 -0
- package/ios/GoogleMaps/RNMGoogleMapViewModule.m +183 -0
- package/ios/{AirGoogleMaps/AIRGoogleMapWMSTile.h → GoogleMaps/RNMGoogleMapWMSTile.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapWMSTile.m → GoogleMaps/RNMGoogleMapWMSTile.m} +4 -4
- package/ios/{AirGoogleMaps/AIRGoogleMapWMSTileManager.h → GoogleMaps/RNMGoogleMapWMSTileManager.h} +3 -3
- package/ios/{AirGoogleMaps/AIRGoogleMapWMSTileManager.m → GoogleMaps/RNMGoogleMapWMSTileManager.m} +8 -8
- package/ios/{AirMaps → Maps}/Callout/SMCalloutView.h +4 -4
- package/ios/{AirMaps/RCTConvert+AirMap.h → Maps/RCTConvert+RNMMap.h} +1 -1
- package/ios/{AirMaps/RCTConvert+AirMap.m → Maps/RCTConvert+RNMMap.m} +8 -8
- package/ios/{AirMaps/AIRMap.h → Maps/RNMMap.h} +8 -8
- package/ios/{AirMaps/AIRMap.m → Maps/RNMMap.m} +56 -56
- package/ios/{AirMaps/AIRMapCallout.h → Maps/RNMMapCallout.h} +1 -1
- package/ios/{AirMaps/AIRMapCallout.m → Maps/RNMMapCallout.m} +2 -2
- package/ios/{AirMaps/AIRMapCircleManager.h → Maps/RNMMapCalloutManager.h} +2 -2
- package/ios/{AirMaps/AIRMapCalloutManager.m → Maps/RNMMapCalloutManager.m} +7 -7
- package/ios/{AirMaps/AIRMapCalloutSubview.h → Maps/RNMMapCalloutSubview.h} +3 -3
- package/ios/{AirMaps/AIRMapCalloutSubview.m → Maps/RNMMapCalloutSubview.m} +4 -4
- package/ios/Maps/RNMMapCalloutSubviewManager.h +14 -0
- package/ios/Maps/RNMMapCalloutSubviewManager.m +24 -0
- package/ios/{AirMaps/AIRMapCircle.h → Maps/RNMMapCircle.h} +5 -5
- package/ios/{AirMaps/AIRMapCircle.m → Maps/RNMMapCircle.m} +3 -3
- package/ios/{AirMaps/AIRMapCalloutManager.h → Maps/RNMMapCircleManager.h} +2 -2
- package/ios/{AirMaps/AIRMapCircleManager.m → Maps/RNMMapCircleManager.m} +7 -7
- package/ios/{AirMaps/AIRMapCoordinate.h → Maps/RNMMapCoordinate.h} +2 -2
- package/ios/{AirMaps/AIRMapCoordinate.m → Maps/RNMMapCoordinate.m} +3 -3
- package/ios/{AirMaps/AIRMapLocalTile.h → Maps/RNMMapLocalTile.h} +7 -7
- package/ios/{AirMaps/AIRMapLocalTile.m → Maps/RNMMapLocalTile.m} +6 -6
- package/ios/{AirMaps/AIRMapLocalTileManager.h → Maps/RNMMapLocalTileManager.h} +3 -3
- package/ios/{AirMaps/AIRMapLocalTileManager.m → Maps/RNMMapLocalTileManager.m} +9 -9
- package/ios/{AirMaps/AIRMapLocalTileOverlay.h → Maps/RNMMapLocalTileOverlay.h} +2 -2
- package/ios/{AirMaps/AIRMapLocalTileOverlay.m → Maps/RNMMapLocalTileOverlay.m} +5 -5
- package/ios/{AirMaps/AIRMapManager.h → Maps/RNMMapManager.h} +6 -6
- package/ios/{AirMaps/AIRMapManager.m → Maps/RNMMapManager.m} +168 -445
- package/ios/{AirMaps/AIRMapMarker.h → Maps/RNMMapMarker.h} +8 -8
- package/ios/{AirMaps/AIRMapMarker.m → Maps/RNMMapMarker.m} +13 -13
- package/ios/{AirMaps/AIRMapMarkerManager.h → Maps/RNMMapMarkerManager.h} +1 -1
- package/ios/{AirMaps/AIRMapMarkerManager.m → Maps/RNMMapMarkerManager.m} +14 -14
- package/ios/{AirMaps/AIRMapOverlay.h → Maps/RNMMapOverlay.h} +7 -7
- package/ios/{AirMaps/AIRMapOverlay.m → Maps/RNMMapOverlay.m} +4 -4
- package/ios/Maps/RNMMapOverlayManager.h +5 -0
- package/ios/{AirMaps/AIRMapOverlayManager.m → Maps/RNMMapOverlayManager.m} +6 -6
- package/ios/{AirMaps/AIRMapOverlayRenderer.h → Maps/RNMMapOverlayRenderer.h} +1 -1
- package/ios/{AirMaps/AIRMapOverlayRenderer.m → Maps/RNMMapOverlayRenderer.m} +5 -5
- package/ios/{AirMaps/AIRMapPolygon.h → Maps/RNMMapPolygon.h} +7 -7
- package/ios/{AirMaps/AIRMapPolygon.m → Maps/RNMMapPolygon.m} +4 -4
- package/ios/{AirMaps/AIRMapPolygonManager.h → Maps/RNMMapPolygonManager.h} +2 -2
- package/ios/{AirMaps/AIRMapPolygonManager.m → Maps/RNMMapPolygonManager.m} +10 -10
- package/ios/{AirMaps/AIRMapPolyline.h → Maps/RNMMapPolyline.h} +6 -6
- package/ios/{AirMaps/AIRMapPolyline.m → Maps/RNMMapPolyline.m} +11 -11
- package/ios/{AirMaps/AIRMapPolylineManager.h → Maps/RNMMapPolylineManager.h} +2 -2
- package/ios/{AirMaps/AIRMapPolylineManager.m → Maps/RNMMapPolylineManager.m} +9 -9
- package/ios/{AirMaps/AIRMapPolylineRenderer.h → Maps/RNMMapPolylineRenderer.h} +2 -2
- package/ios/{AirMaps/AIRMapPolylineRenderer.m → Maps/RNMMapPolylineRenderer.m} +10 -10
- package/ios/{AirMaps/AIRMapSnapshot.h → Maps/RNMMapSnapshot.h} +6 -6
- package/ios/{AirMaps/AIRMapUrlTile.h → Maps/RNMMapUrlTile.h} +18 -18
- package/ios/{AirMaps/AIRMapUrlTile.m → Maps/RNMMapUrlTile.m} +7 -7
- package/ios/{AirMaps/AIRMapUrlTileCachedOverlay.h → Maps/RNMMapUrlTileCachedOverlay.h} +3 -3
- package/ios/{AirMaps/AIRMapUrlTileCachedOverlay.m → Maps/RNMMapUrlTileCachedOverlay.m} +10 -10
- package/ios/{AirMaps/AIRMapUrlTileManager.h → Maps/RNMMapUrlTileManager.h} +3 -3
- package/ios/{AirMaps/AIRMapUrlTileManager.m → Maps/RNMMapUrlTileManager.m} +9 -9
- package/ios/Maps/RNMMapViewModule.h +5 -0
- package/ios/Maps/RNMMapViewModule.m +297 -0
- package/ios/{AirMaps/AIRMapWMSTile.h → Maps/RNMMapWMSTile.h} +11 -11
- package/ios/{AirMaps/AIRMapWMSTile.m → Maps/RNMMapWMSTile.m} +15 -15
- package/ios/{AirMaps/AIRMapWMSTileManager.h → Maps/RNMMapWMSTileManager.h} +3 -3
- package/ios/{AirMaps/AIRMapWMSTileManager.m → Maps/RNMMapWMSTileManager.m} +9 -9
- package/ios/RNMaps.xcodeproj/project.pbxproj +647 -0
- package/lib/Geojson.d.ts +1 -1
- package/lib/MapCallout.js +2 -2
- package/lib/MapCalloutSubview.js +2 -2
- package/lib/MapCircle.js +2 -2
- package/lib/MapHeatmap.js +2 -2
- package/lib/MapLocalTile.js +2 -2
- package/lib/MapMarker.d.ts +2 -3
- package/lib/MapMarker.js +2 -4
- package/lib/MapOverlay.d.ts +1 -2
- package/lib/MapOverlay.js +2 -4
- package/lib/MapPolygon.js +2 -2
- package/lib/MapPolyline.js +2 -2
- package/lib/MapUrlTile.js +2 -2
- package/lib/MapView.d.ts +4 -9
- package/lib/MapView.js +74 -90
- package/lib/MapView.types.d.ts +7 -1
- package/lib/MapWMSTile.js +2 -2
- package/lib/NativeGoogleMapViewModule.d.ts +20 -0
- package/lib/NativeGoogleMapViewModule.js +4 -0
- package/lib/NativeMapViewModule.d.ts +24 -0
- package/lib/NativeMapViewModule.js +4 -0
- package/lib/decorateMapComponent.d.ts +1 -1
- package/lib/decorateMapComponent.js +3 -3
- package/lib/index.d.ts +14 -21
- package/lib/index.js +10 -38
- package/package.json +1 -1
- package/react-native-google-maps.podspec +1 -1
- package/react-native-maps.podspec +1 -1
- package/ios/AirGoogleMaps/AIRGoogleMapCalloutSubviewManager.m +0 -28
- package/ios/AirGoogleMaps/AIRGoogleMapHeatmapManager.h +0 -11
- package/ios/AirMaps/AIRMapCalloutSubviewManager.h +0 -14
- package/ios/AirMaps/AIRMapCalloutSubviewManager.m +0 -24
- package/ios/AirMaps/AIRMapOverlayManager.h +0 -5
- package/ios/AirMaps/AIRWeakMapReference.h +0 -24
- package/ios/AirMaps/AIRWeakMapReference.m +0 -23
- package/ios/AirMaps/AIRWeakTimerReference.h +0 -21
- package/ios/AirMaps/AIRWeakTimerReference.m +0 -42
- package/ios/AirMaps.xcodeproj/project.pbxproj +0 -587
- /package/ios/{AirGoogleMaps → GoogleMaps}/RCTConvert+GMSMapViewType.h +0 -0
- /package/ios/{AirGoogleMaps → GoogleMaps}/RCTConvert+GMSMapViewType.m +0 -0
- /package/ios/{AirMaps → Maps}/Callout/SMCalloutView.m +0 -0
|
@@ -7,23 +7,23 @@
|
|
|
7
7
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
#import "
|
|
11
|
-
#import "
|
|
10
|
+
#import "RNMMapMarker.h"
|
|
11
|
+
#import "RNMMapCallout.h"
|
|
12
12
|
|
|
13
13
|
#import <MapKit/MapKit.h>
|
|
14
14
|
#import <UIKit/UIKit.h>
|
|
15
15
|
|
|
16
16
|
#import <React/RCTComponent.h>
|
|
17
|
-
#import "
|
|
17
|
+
#import "RNMMap.h"
|
|
18
18
|
#import "SMCalloutView.h"
|
|
19
|
-
#import "RCTConvert+
|
|
19
|
+
#import "RCTConvert+RNMMap.h"
|
|
20
20
|
|
|
21
21
|
@class RCTBridge;
|
|
22
22
|
|
|
23
|
-
@interface
|
|
23
|
+
@interface RNMMapMarker : MKAnnotationView <MKAnnotation>
|
|
24
24
|
|
|
25
|
-
@property (nonatomic, strong)
|
|
26
|
-
@property (nonatomic, weak)
|
|
25
|
+
@property (nonatomic, strong) RNMMapCallout *calloutView;
|
|
26
|
+
@property (nonatomic, weak) RNMMap *map;
|
|
27
27
|
@property (nonatomic, weak) RCTBridge *bridge;
|
|
28
28
|
|
|
29
29
|
@property (nonatomic, strong) NSString *identifier;
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
@end
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
@interface
|
|
58
|
+
@interface RNMEmptyCalloutBackgroundView : SMCalloutBackgroundView
|
|
59
59
|
@end
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
#import "
|
|
10
|
+
#import "RNMMapMarker.h"
|
|
11
11
|
|
|
12
12
|
#import <React/RCTBridge.h>
|
|
13
13
|
#import <React/RCTEventDispatcher.h>
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
#import <React/RCTUtils.h>
|
|
16
16
|
#import <React/UIView+React.h>
|
|
17
17
|
|
|
18
|
-
NSInteger const
|
|
18
|
+
NSInteger const RNM_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
|
|
19
19
|
|
|
20
|
-
@implementation
|
|
20
|
+
@implementation RNMEmptyCalloutBackgroundView
|
|
21
21
|
@end
|
|
22
22
|
|
|
23
|
-
@implementation
|
|
23
|
+
@implementation RNMMapMarker {
|
|
24
24
|
BOOL _hasSetCalloutOffset;
|
|
25
25
|
RCTImageLoaderCancellationBlock _reloadImageCancellationBlock;
|
|
26
26
|
MKMarkerAnnotationView *_pinView;
|
|
@@ -62,15 +62,15 @@ NSInteger const AIR_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
- (void)insertReactSubview:(id<RCTComponent>)subview atIndex:(NSInteger)atIndex {
|
|
65
|
-
if ([subview isKindOfClass:[
|
|
66
|
-
self.calloutView = (
|
|
65
|
+
if ([subview isKindOfClass:[RNMMapCallout class]]) {
|
|
66
|
+
self.calloutView = (RNMMapCallout *)subview;
|
|
67
67
|
} else {
|
|
68
68
|
[super insertReactSubview:(UIView *)subview atIndex:atIndex];
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
- (void)removeReactSubview:(id<RCTComponent>)subview {
|
|
73
|
-
if ([subview isKindOfClass:[
|
|
73
|
+
if ([subview isKindOfClass:[RNMMapCallout class]] && self.calloutView == subview) {
|
|
74
74
|
self.calloutView = nil;
|
|
75
75
|
} else {
|
|
76
76
|
[super removeReactSubview:(UIView *)subview];
|
|
@@ -100,7 +100,7 @@ NSInteger const AIR_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
|
|
|
100
100
|
} else {
|
|
101
101
|
// If it has subviews, it means we are wanting to render a custom marker with arbitrary react views.
|
|
102
102
|
// if it has a non-null image, it means we want to render a custom marker with the image.
|
|
103
|
-
// In either case, we want to return the
|
|
103
|
+
// In either case, we want to return the RNMMapMarker since it is both an MKAnnotation and an
|
|
104
104
|
// MKAnnotationView all at the same time.
|
|
105
105
|
self.layer.zPosition = self.zIndex;
|
|
106
106
|
return self;
|
|
@@ -124,7 +124,7 @@ NSInteger const AIR_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
|
|
|
124
124
|
if (self.calloutView.tooltip) {
|
|
125
125
|
// if tooltip is true, then the user wants their react view to be the "tooltip" as wwell, so we set
|
|
126
126
|
// the background view to something empty/transparent
|
|
127
|
-
calloutView.backgroundView = [
|
|
127
|
+
calloutView.backgroundView = [RNMEmptyCalloutBackgroundView new];
|
|
128
128
|
} else {
|
|
129
129
|
// the default tooltip look is wanted, and the user is just filling the content with their react subviews.
|
|
130
130
|
// as a result, we use the default "masked" background view.
|
|
@@ -200,7 +200,7 @@ NSInteger const AIR_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
- (void)_handleTap:(UITapGestureRecognizer *)recognizer {
|
|
203
|
-
|
|
203
|
+
RNMMapMarker *marker = self;
|
|
204
204
|
if (!marker) return;
|
|
205
205
|
|
|
206
206
|
if (marker.selected) {
|
|
@@ -212,11 +212,11 @@ NSInteger const AIR_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
|
|
|
212
212
|
if (calloutView) {
|
|
213
213
|
// the callout (or its subview) got clicked, not the marker
|
|
214
214
|
UIWindow* win = [[[UIApplication sharedApplication] windows] firstObject];
|
|
215
|
-
|
|
215
|
+
RNMMapCalloutSubview* calloutSubview = nil;
|
|
216
216
|
UIView* tmp = calloutView;
|
|
217
217
|
while (tmp && tmp != win && tmp != self.calloutView && tmp != self.map) {
|
|
218
218
|
if ([tmp respondsToSelector:@selector(onPress)]) {
|
|
219
|
-
calloutSubview = (
|
|
219
|
+
calloutSubview = (RNMMapCalloutSubview*) tmp;
|
|
220
220
|
break;
|
|
221
221
|
}
|
|
222
222
|
tmp = tmp.superview;
|
|
@@ -341,7 +341,7 @@ NSInteger const AIR_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
|
|
|
341
341
|
- (void)setZIndex:(NSInteger)zIndex
|
|
342
342
|
{
|
|
343
343
|
_zIndexBeforeOpen = zIndex;
|
|
344
|
-
_zIndex = _calloutIsOpen ? zIndex +
|
|
344
|
+
_zIndex = _calloutIsOpen ? zIndex + RNM_CALLOUT_OPEN_ZINDEX_BASELINE : zIndex;
|
|
345
345
|
self.layer.zPosition = zIndex;
|
|
346
346
|
}
|
|
347
347
|
|
|
@@ -7,24 +7,24 @@
|
|
|
7
7
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
#import "
|
|
10
|
+
#import "RNMMapMarkerManager.h"
|
|
11
11
|
|
|
12
12
|
#import <React/RCTConvert+CoreLocation.h>
|
|
13
13
|
#import <React/RCTUIManager.h>
|
|
14
14
|
#import <React/UIView+React.h>
|
|
15
|
-
#import "
|
|
15
|
+
#import "RNMMapMarker.h"
|
|
16
16
|
|
|
17
|
-
@interface
|
|
17
|
+
@interface RNMMapMarkerManager () <MKMapViewDelegate>
|
|
18
18
|
|
|
19
19
|
@end
|
|
20
20
|
|
|
21
|
-
@implementation
|
|
21
|
+
@implementation RNMMapMarkerManager
|
|
22
22
|
|
|
23
|
-
RCT_EXPORT_MODULE()
|
|
23
|
+
RCT_EXPORT_MODULE(RNMMapMarker)
|
|
24
24
|
|
|
25
25
|
- (UIView *)view
|
|
26
26
|
{
|
|
27
|
-
|
|
27
|
+
RNMMapMarker *marker = [RNMMapMarker new];
|
|
28
28
|
[marker addTapGestureRecognizer];
|
|
29
29
|
marker.bridge = self.bridge;
|
|
30
30
|
marker.isAccessibilityElement = YES;
|
|
@@ -60,10 +60,10 @@ RCT_EXPORT_METHOD(showCallout:(nonnull NSNumber *)reactTag)
|
|
|
60
60
|
{
|
|
61
61
|
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
62
62
|
id view = viewRegistry[reactTag];
|
|
63
|
-
if (![view isKindOfClass:[
|
|
64
|
-
RCTLogError(@"Invalid view returned from registry, expecting
|
|
63
|
+
if (![view isKindOfClass:[RNMMapMarker class]]) {
|
|
64
|
+
RCTLogError(@"Invalid view returned from registry, expecting RNMMap, got: %@", view);
|
|
65
65
|
} else {
|
|
66
|
-
[(
|
|
66
|
+
[(RNMMapMarker *) view showCalloutView];
|
|
67
67
|
}
|
|
68
68
|
}];
|
|
69
69
|
}
|
|
@@ -72,10 +72,10 @@ RCT_EXPORT_METHOD(hideCallout:(nonnull NSNumber *)reactTag)
|
|
|
72
72
|
{
|
|
73
73
|
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
74
74
|
id view = viewRegistry[reactTag];
|
|
75
|
-
if (![view isKindOfClass:[
|
|
76
|
-
RCTLogError(@"Invalid view returned from registry, expecting
|
|
75
|
+
if (![view isKindOfClass:[RNMMapMarker class]]) {
|
|
76
|
+
RCTLogError(@"Invalid view returned from registry, expecting RNMMap, got: %@", view);
|
|
77
77
|
} else {
|
|
78
|
-
[(
|
|
78
|
+
[(RNMMapMarker *) view hideCalloutView];
|
|
79
79
|
}
|
|
80
80
|
}];
|
|
81
81
|
}
|
|
@@ -84,8 +84,8 @@ RCT_EXPORT_METHOD(redrawCallout:(nonnull NSNumber *)reactTag)
|
|
|
84
84
|
{
|
|
85
85
|
[self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
86
86
|
id view = viewRegistry[reactTag];
|
|
87
|
-
if (![view isKindOfClass:[
|
|
88
|
-
RCTLogError(@"Invalid view returned from registry, expecting
|
|
87
|
+
if (![view isKindOfClass:[RNMMapMarker class]]) {
|
|
88
|
+
RCTLogError(@"Invalid view returned from registry, expecting RNMMap, got: %@", view);
|
|
89
89
|
} else {
|
|
90
90
|
//no need to do anything here
|
|
91
91
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
#import "
|
|
1
|
+
#import "RNMMapCallout.h"
|
|
2
2
|
|
|
3
3
|
#import <MapKit/MapKit.h>
|
|
4
4
|
#import <UIKit/UIKit.h>
|
|
5
5
|
|
|
6
|
-
#import "RCTConvert+
|
|
6
|
+
#import "RCTConvert+RNMMap.h"
|
|
7
7
|
#import <React/RCTComponent.h>
|
|
8
|
-
#import "
|
|
9
|
-
#import "
|
|
8
|
+
#import "RNMMap.h"
|
|
9
|
+
#import "RNMMapOverlayRenderer.h"
|
|
10
10
|
|
|
11
11
|
@class RCTBridge;
|
|
12
12
|
|
|
13
|
-
@interface
|
|
13
|
+
@interface RNMMapOverlay : UIView <MKOverlay>
|
|
14
14
|
|
|
15
|
-
@property (nonatomic, strong)
|
|
16
|
-
@property (nonatomic, weak)
|
|
15
|
+
@property (nonatomic, strong) RNMMapOverlayRenderer *renderer;
|
|
16
|
+
@property (nonatomic, weak) RNMMap *map;
|
|
17
17
|
@property (nonatomic, weak) RCTBridge *bridge;
|
|
18
18
|
|
|
19
19
|
@property (nonatomic, strong) NSString *name;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#import "
|
|
1
|
+
#import "RNMMapOverlay.h"
|
|
2
2
|
|
|
3
3
|
#import <React/RCTBridge.h>
|
|
4
4
|
#import <React/RCTEventDispatcher.h>
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
#import <React/RCTUtils.h>
|
|
7
7
|
#import <React/UIView+React.h>
|
|
8
8
|
|
|
9
|
-
@interface
|
|
9
|
+
@interface RNMMapOverlay()
|
|
10
10
|
@property (nonatomic, strong, readwrite) UIImage *overlayImage;
|
|
11
11
|
@end
|
|
12
12
|
|
|
13
|
-
@implementation
|
|
13
|
+
@implementation RNMMapOverlay {
|
|
14
14
|
RCTImageLoaderCancellationBlock _reloadImageCancellationBlock;
|
|
15
15
|
CLLocationCoordinate2D _southWest;
|
|
16
16
|
CLLocationCoordinate2D _northEast;
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
{
|
|
66
66
|
if (MKMapRectIsEmpty(_mapRect) || !self.overlayImage) return;
|
|
67
67
|
__weak typeof(self) weakSelf = self;
|
|
68
|
-
self.renderer = [[
|
|
68
|
+
self.renderer = [[RNMMapOverlayRenderer alloc] initWithOverlay:weakSelf];
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
- (void)update
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
#import "
|
|
1
|
+
#import "RNMMapOverlayManager.h"
|
|
2
2
|
|
|
3
3
|
#import <React/RCTConvert+CoreLocation.h>
|
|
4
4
|
#import <React/RCTUIManager.h>
|
|
5
5
|
#import <React/UIView+React.h>
|
|
6
|
-
#import "
|
|
6
|
+
#import "RNMMapOverlay.h"
|
|
7
7
|
|
|
8
|
-
@interface
|
|
8
|
+
@interface RNMMapOverlayManager () <MKMapViewDelegate>
|
|
9
9
|
|
|
10
10
|
@end
|
|
11
11
|
|
|
12
|
-
@implementation
|
|
12
|
+
@implementation RNMMapOverlayManager
|
|
13
13
|
|
|
14
|
-
RCT_EXPORT_MODULE()
|
|
14
|
+
RCT_EXPORT_MODULE(RNMMapOverlay)
|
|
15
15
|
|
|
16
16
|
- (UIView *)view
|
|
17
17
|
{
|
|
18
|
-
|
|
18
|
+
RNMMapOverlay *overlay = [RNMMapOverlay new];
|
|
19
19
|
overlay.bridge = self.bridge;
|
|
20
20
|
return overlay;
|
|
21
21
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#import "
|
|
2
|
-
#import "
|
|
1
|
+
#import "RNMMapOverlayRenderer.h"
|
|
2
|
+
#import "RNMMapOverlay.h"
|
|
3
3
|
|
|
4
|
-
@implementation
|
|
4
|
+
@implementation RNMMapOverlayRenderer
|
|
5
5
|
|
|
6
6
|
- (void)drawMapRect:(MKMapRect)mapRect zoomScale:(MKZoomScale)zoomScale inContext:(CGContextRef)context {
|
|
7
|
-
UIImage *image = [(
|
|
7
|
+
UIImage *image = [(RNMMapOverlay *)self.overlay overlayImage];
|
|
8
8
|
|
|
9
9
|
CGContextSaveGState(context);
|
|
10
10
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
- (BOOL)canDrawMapRect:(MKMapRect)mapRect zoomScale:(MKZoomScale)zoomScale {
|
|
26
|
-
return [(
|
|
26
|
+
return [(RNMMapOverlay *)self.overlay overlayImage] != nil;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
@end
|
|
@@ -10,22 +10,22 @@
|
|
|
10
10
|
|
|
11
11
|
#import <React/RCTComponent.h>
|
|
12
12
|
#import <React/RCTView.h>
|
|
13
|
-
#import "
|
|
14
|
-
#import "
|
|
15
|
-
#import "RCTConvert+
|
|
13
|
+
#import "RNMMapCoordinate.h"
|
|
14
|
+
#import "RNMMap.h"
|
|
15
|
+
#import "RCTConvert+RNMMap.h"
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
@interface
|
|
19
|
+
@interface RNMMapPolygon: MKAnnotationView <MKOverlay>
|
|
20
20
|
|
|
21
|
-
@property (nonatomic, weak)
|
|
21
|
+
@property (nonatomic, weak) RNMMap *map;
|
|
22
22
|
|
|
23
23
|
@property (nonatomic, strong) MKPolygon *polygon;
|
|
24
24
|
@property (nonatomic, strong) MKPolygonRenderer *renderer;
|
|
25
25
|
@property (nonatomic, strong) NSArray<MKPolygon *> *interiorPolygons;
|
|
26
26
|
|
|
27
|
-
@property (nonatomic, strong) NSArray<
|
|
28
|
-
@property (nonatomic, strong) NSArray<NSArray<
|
|
27
|
+
@property (nonatomic, strong) NSArray<RNMMapCoordinate *> *coordinates;
|
|
28
|
+
@property (nonatomic, strong) NSArray<NSArray<RNMMapCoordinate *> *> *holes;
|
|
29
29
|
@property (nonatomic, strong) UIColor *fillColor;
|
|
30
30
|
@property (nonatomic, strong) UIColor *strokeColor;
|
|
31
31
|
@property (nonatomic, assign) CGFloat strokeWidth;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
// Copyright (c) 2015 Facebook. All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
|
|
6
|
-
#import "
|
|
6
|
+
#import "RNMMapPolygon.h"
|
|
7
7
|
#import <React/UIView+React.h>
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
@implementation
|
|
10
|
+
@implementation RNMMapPolygon {
|
|
11
11
|
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
[self update];
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
- (void)setCoordinates:(NSArray<
|
|
54
|
+
- (void)setCoordinates:(NSArray<RNMMapCoordinate *> *)coordinates {
|
|
55
55
|
_coordinates = coordinates;
|
|
56
56
|
CLLocationCoordinate2D coords[coordinates.count];
|
|
57
57
|
for(int i = 0; i < coordinates.count; i++)
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
[self update];
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
- (void)setHoles:(NSArray<NSArray<
|
|
68
|
+
- (void)setHoles:(NSArray<NSArray<RNMMapCoordinate *> *> *)holes {
|
|
69
69
|
_holes = holes;
|
|
70
70
|
if (holes.count)
|
|
71
71
|
{
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
#import "
|
|
10
|
+
#import "RNMMapPolygonManager.h"
|
|
11
11
|
|
|
12
12
|
#import <React/RCTBridge.h>
|
|
13
13
|
#import <React/RCTConvert.h>
|
|
@@ -15,26 +15,26 @@
|
|
|
15
15
|
#import <React/RCTEventDispatcher.h>
|
|
16
16
|
#import <React/RCTViewManager.h>
|
|
17
17
|
#import <React/UIView+React.h>
|
|
18
|
-
#import "RCTConvert+
|
|
19
|
-
#import "
|
|
20
|
-
#import "
|
|
18
|
+
#import "RCTConvert+RNMMap.h"
|
|
19
|
+
#import "RNMMapMarker.h"
|
|
20
|
+
#import "RNMMapPolygon.h"
|
|
21
21
|
|
|
22
|
-
@interface
|
|
22
|
+
@interface RNMMapPolygonManager()
|
|
23
23
|
|
|
24
24
|
@end
|
|
25
25
|
|
|
26
|
-
@implementation
|
|
26
|
+
@implementation RNMMapPolygonManager
|
|
27
27
|
|
|
28
|
-
RCT_EXPORT_MODULE()
|
|
28
|
+
RCT_EXPORT_MODULE(RNMMapPolygon)
|
|
29
29
|
|
|
30
30
|
- (UIView *)view
|
|
31
31
|
{
|
|
32
|
-
|
|
32
|
+
RNMMapPolygon *polygon = [RNMMapPolygon new];
|
|
33
33
|
return polygon;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
RCT_EXPORT_VIEW_PROPERTY(coordinates,
|
|
37
|
-
RCT_EXPORT_VIEW_PROPERTY(holes,
|
|
36
|
+
RCT_EXPORT_VIEW_PROPERTY(coordinates, RNMMapCoordinateArray)
|
|
37
|
+
RCT_EXPORT_VIEW_PROPERTY(holes, RNMMapCoordinateArrayArray)
|
|
38
38
|
RCT_EXPORT_VIEW_PROPERTY(fillColor, UIColor)
|
|
39
39
|
RCT_EXPORT_VIEW_PROPERTY(strokeColor, UIColor)
|
|
40
40
|
RCT_EXPORT_VIEW_PROPERTY(strokeWidth, CGFloat)
|
|
@@ -10,19 +10,19 @@
|
|
|
10
10
|
|
|
11
11
|
#import <React/RCTComponent.h>
|
|
12
12
|
#import <React/RCTView.h>
|
|
13
|
-
#import "
|
|
14
|
-
#import "
|
|
15
|
-
#import "RCTConvert+
|
|
13
|
+
#import "RNMMapCoordinate.h"
|
|
14
|
+
#import "RNMMap.h"
|
|
15
|
+
#import "RCTConvert+RNMMap.h"
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
@interface
|
|
18
|
+
@interface RNMMapPolyline: MKAnnotationView <MKOverlay>
|
|
19
19
|
|
|
20
|
-
@property (nonatomic, weak)
|
|
20
|
+
@property (nonatomic, weak) RNMMap *map;
|
|
21
21
|
|
|
22
22
|
@property (nonatomic, strong) MKPolyline *polyline;
|
|
23
23
|
@property (nonatomic, strong) MKOverlayPathRenderer *renderer;
|
|
24
24
|
|
|
25
|
-
@property (nonatomic, strong) NSArray<
|
|
25
|
+
@property (nonatomic, strong) NSArray<RNMMapCoordinate *> *coordinates;
|
|
26
26
|
@property (nonatomic, strong) UIColor *fillColor;
|
|
27
27
|
@property (nonatomic, strong) UIColor *strokeColor;
|
|
28
28
|
@property (nonatomic, strong) NSArray<UIColor *> *strokeColors;
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// Copyright (c) 2015 Facebook. All rights reserved.
|
|
4
4
|
//
|
|
5
5
|
|
|
6
|
-
#import "
|
|
7
|
-
#import "
|
|
6
|
+
#import "RNMMapPolyline.h"
|
|
7
|
+
#import "RNMMapPolylineRenderer.h"
|
|
8
8
|
#import <React/UIView+React.h>
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
@implementation
|
|
11
|
+
@implementation RNMMapPolyline {
|
|
12
12
|
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
- (void)setStrokeColors:(NSArray<UIColor *> *)strokeColors {
|
|
26
26
|
_strokeColors = strokeColors;
|
|
27
|
-
if ((self.renderer != nil) && ![_renderer isKindOfClass:[
|
|
27
|
+
if ((self.renderer != nil) && ![_renderer isKindOfClass:[RNMMapPolylineRenderer class]]) {
|
|
28
28
|
self.renderer = [self createRenderer];
|
|
29
29
|
}
|
|
30
30
|
[self update];
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
- (void)setCoordinates:(NSArray<
|
|
71
|
+
- (void)setCoordinates:(NSArray<RNMMapCoordinate *> *)coordinates {
|
|
72
72
|
_coordinates = coordinates;
|
|
73
73
|
CLLocationCoordinate2D *coords = calloc(coordinates.count, sizeof(CLLocationCoordinate2D));
|
|
74
74
|
for(int i = 0; i < coordinates.count; i++)
|
|
@@ -90,13 +90,13 @@
|
|
|
90
90
|
if (self.polyline == nil) return nil;
|
|
91
91
|
if (self.strokeColors == nil) {
|
|
92
92
|
// Use the default renderer when no array of stroke-colors is defined.
|
|
93
|
-
// This behaviour may be changed in the future if we permanently want to
|
|
93
|
+
// This behaviour may be changed in the future if we permanently want to
|
|
94
94
|
// use the custom renderer, because it can add funtionality that is not
|
|
95
95
|
// supported by the default renderer.
|
|
96
96
|
return [[MKPolylineRenderer alloc] initWithPolyline:self.polyline];
|
|
97
97
|
}
|
|
98
98
|
else {
|
|
99
|
-
return [[
|
|
99
|
+
return [[RNMMapPolylineRenderer alloc] initWithOverlay:self polyline:self.polyline];
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -120,8 +120,8 @@
|
|
|
120
120
|
renderer.lineDashPhase = _lineDashPhase;
|
|
121
121
|
renderer.lineDashPattern = _lineDashPattern;
|
|
122
122
|
|
|
123
|
-
if ([renderer isKindOfClass:[
|
|
124
|
-
((
|
|
123
|
+
if ([renderer isKindOfClass:[RNMMapPolylineRenderer class]]) {
|
|
124
|
+
((RNMMapPolylineRenderer*)renderer).strokeColors = _strokeColors;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -149,11 +149,11 @@
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
|
|
152
|
-
#pragma mark
|
|
152
|
+
#pragma mark RNMMapSnapshot implementation
|
|
153
153
|
|
|
154
154
|
- (void) drawToSnapshot:(MKMapSnapshot *) snapshot context:(CGContextRef) context
|
|
155
155
|
{
|
|
156
|
-
|
|
156
|
+
RNMMapPolylineRenderer* renderer = [[RNMMapPolylineRenderer alloc] initWithSnapshot:snapshot overlay:self polyline:self.polyline];
|
|
157
157
|
[self updateRenderer:renderer];
|
|
158
158
|
[renderer drawWithZoomScale:2 inContext:context];
|
|
159
159
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
#import "
|
|
10
|
+
#import "RNMMapPolylineManager.h"
|
|
11
11
|
|
|
12
12
|
#import <React/RCTBridge.h>
|
|
13
13
|
#import <React/RCTConvert.h>
|
|
@@ -15,25 +15,25 @@
|
|
|
15
15
|
#import <React/RCTEventDispatcher.h>
|
|
16
16
|
#import <React/RCTViewManager.h>
|
|
17
17
|
#import <React/UIView+React.h>
|
|
18
|
-
#import "RCTConvert+
|
|
19
|
-
#import "
|
|
20
|
-
#import "
|
|
18
|
+
#import "RCTConvert+RNMMap.h"
|
|
19
|
+
#import "RNMMapMarker.h"
|
|
20
|
+
#import "RNMMapPolyline.h"
|
|
21
21
|
|
|
22
|
-
@interface
|
|
22
|
+
@interface RNMMapPolylineManager()
|
|
23
23
|
|
|
24
24
|
@end
|
|
25
25
|
|
|
26
|
-
@implementation
|
|
26
|
+
@implementation RNMMapPolylineManager
|
|
27
27
|
|
|
28
|
-
RCT_EXPORT_MODULE()
|
|
28
|
+
RCT_EXPORT_MODULE(RNMMapPolyline)
|
|
29
29
|
|
|
30
30
|
- (UIView *)view
|
|
31
31
|
{
|
|
32
|
-
|
|
32
|
+
RNMMapPolyline *polyline = [RNMMapPolyline new];
|
|
33
33
|
return polyline;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
RCT_EXPORT_VIEW_PROPERTY(coordinates,
|
|
36
|
+
RCT_EXPORT_VIEW_PROPERTY(coordinates, RNMMapCoordinateArray)
|
|
37
37
|
RCT_EXPORT_VIEW_PROPERTY(strokeColor, UIColor)
|
|
38
38
|
RCT_EXPORT_VIEW_PROPERTY(strokeColors, UIColorArray)
|
|
39
39
|
RCT_EXPORT_VIEW_PROPERTY(strokeWidth, CGFloat)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
2
|
+
// RNMMapPolylineRenderer.h
|
|
3
3
|
// mapDemo
|
|
4
4
|
//
|
|
5
5
|
// Created by IjzerenHein on 13-11-21.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
#import <MapKit/MapKit.h>
|
|
10
10
|
|
|
11
|
-
@interface
|
|
11
|
+
@interface RNMMapPolylineRenderer : MKOverlayPathRenderer
|
|
12
12
|
|
|
13
13
|
-(id)initWithOverlay:(id<MKOverlay>)overlay polyline:(MKPolyline*)polyline;
|
|
14
14
|
-(id)initWithSnapshot:(MKMapSnapshot*)snapshot overlay:(id<MKOverlay>)overlay polyline:(MKPolyline*)polyline;
|