react-native-maps 2.0.0-beta.5 → 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/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 +1 -1
- package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +9 -26
- 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} +22 -22
- 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/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.js +2 -2
- package/lib/MapOverlay.js +2 -2
- package/lib/MapPolygon.js +2 -2
- package/lib/MapPolyline.js +2 -2
- package/lib/MapUrlTile.js +2 -2
- package/lib/MapView.d.ts +2 -3
- package/lib/MapView.js +71 -84
- 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/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
package/lib/MapCallout.js
CHANGED
|
@@ -33,8 +33,8 @@ class MapCallout extends React.Component {
|
|
|
33
33
|
getUIManagerCommand;
|
|
34
34
|
render() {
|
|
35
35
|
const { tooltip = false, alphaHitTest = false } = this.props;
|
|
36
|
-
const
|
|
37
|
-
return (<
|
|
36
|
+
const RNMMapCallout = this.getNativeComponent();
|
|
37
|
+
return (<RNMMapCallout {...this.props} tooltip={tooltip} alphaHitTest={alphaHitTest} style={[styles.callout, this.props.style]}/>);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
exports.MapCallout = MapCallout;
|
package/lib/MapCalloutSubview.js
CHANGED
|
@@ -32,8 +32,8 @@ class MapCalloutSubview extends React.Component {
|
|
|
32
32
|
getMapManagerCommand;
|
|
33
33
|
getUIManagerCommand;
|
|
34
34
|
render() {
|
|
35
|
-
const
|
|
36
|
-
return (<
|
|
35
|
+
const RNMMapCalloutSubview = this.getNativeComponent();
|
|
36
|
+
return (<RNMMapCalloutSubview {...this.props} style={[styles.calloutSubview, this.props.style]}/>);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
exports.MapCalloutSubview = MapCalloutSubview;
|
package/lib/MapCircle.js
CHANGED
|
@@ -40,8 +40,8 @@ class MapCircle extends React.Component {
|
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
42
|
const { strokeColor = '#000', strokeWidth = 1 } = this.props;
|
|
43
|
-
const
|
|
44
|
-
return (<
|
|
43
|
+
const RNMMapCircle = this.getNativeComponent();
|
|
44
|
+
return (<RNMMapCircle {...this.props} strokeColor={strokeColor} strokeWidth={strokeWidth} ref={this.circle}/>);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
exports.MapCircle = MapCircle;
|
package/lib/MapHeatmap.js
CHANGED
|
@@ -40,14 +40,14 @@ class MapHeatmap extends React.Component {
|
|
|
40
40
|
this.heatmap.current?.setNativeProps(props);
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
|
-
const
|
|
43
|
+
const RNMMapHeatmap = this.getNativeComponent();
|
|
44
44
|
const propGradient = this.props.gradient;
|
|
45
45
|
let gradient;
|
|
46
46
|
if (propGradient) {
|
|
47
47
|
const colors = propGradient.colors.map(c => (0, react_native_1.processColor)(c));
|
|
48
48
|
gradient = { ...propGradient, colors };
|
|
49
49
|
}
|
|
50
|
-
return (<
|
|
50
|
+
return (<RNMMapHeatmap {...this.props} gradient={gradient} ref={this.heatmap}/>);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
exports.MapHeatmap = MapHeatmap;
|
package/lib/MapLocalTile.js
CHANGED
|
@@ -31,8 +31,8 @@ class MapLocalTile extends React.Component {
|
|
|
31
31
|
getMapManagerCommand;
|
|
32
32
|
getUIManagerCommand;
|
|
33
33
|
render() {
|
|
34
|
-
const
|
|
35
|
-
return <
|
|
34
|
+
const RNMMapLocalTile = this.getNativeComponent();
|
|
35
|
+
return <RNMMapLocalTile {...this.props}/>;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
exports.MapLocalTile = MapLocalTile;
|
package/lib/MapMarker.js
CHANGED
|
@@ -87,8 +87,8 @@ class MapMarker extends React.Component {
|
|
|
87
87
|
icon = react_native_1.Image.resolveAssetSource(this.props.icon) || {};
|
|
88
88
|
icon = icon.uri;
|
|
89
89
|
}
|
|
90
|
-
const
|
|
91
|
-
return (<
|
|
90
|
+
const RNMMapMarker = this.getNativeComponent();
|
|
91
|
+
return (<RNMMapMarker {...this.props} ref={this.marker} image={image} icon={icon} style={[styles.marker, this.props.style]} onPress={event => {
|
|
92
92
|
if (stopPropagation) {
|
|
93
93
|
event.stopPropagation();
|
|
94
94
|
}
|
package/lib/MapOverlay.js
CHANGED
|
@@ -42,8 +42,8 @@ class MapOverlay extends React.Component {
|
|
|
42
42
|
const sourceAsset = react_native_1.Image.resolveAssetSource(this.props.image) || {};
|
|
43
43
|
image = sourceAsset.uri;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
return (<
|
|
45
|
+
const RNMMapOverlay = this.getNativeComponent();
|
|
46
|
+
return (<RNMMapOverlay {...this.props} opacity={opacity} image={image} style={[styles.overlay, this.props.style]}/>);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
exports.MapOverlay = MapOverlay;
|
package/lib/MapPolygon.js
CHANGED
|
@@ -40,8 +40,8 @@ class MapPolygon extends React.Component {
|
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
42
|
const { strokeColor = '#000', strokeWidth = 1 } = this.props;
|
|
43
|
-
const
|
|
44
|
-
return (<
|
|
43
|
+
const RNMMapPolygon = this.getNativeComponent();
|
|
44
|
+
return (<RNMMapPolygon {...this.props} strokeColor={strokeColor} strokeWidth={strokeWidth} ref={this.polygon}/>);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
exports.MapPolygon = MapPolygon;
|
package/lib/MapPolyline.js
CHANGED
|
@@ -40,8 +40,8 @@ class MapPolyline extends React.Component {
|
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
42
|
const { strokeColor = '#000', strokeWidth = 1, lineJoin = 'round', lineCap = 'round', } = this.props;
|
|
43
|
-
const
|
|
44
|
-
return (<
|
|
43
|
+
const RNMMapPolyline = this.getNativeComponent();
|
|
44
|
+
return (<RNMMapPolyline {...this.props} strokeColor={strokeColor} strokeWidth={strokeWidth} lineJoin={lineJoin} lineCap={lineCap} ref={this.polyline}/>);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
exports.MapPolyline = MapPolyline;
|
package/lib/MapUrlTile.js
CHANGED
|
@@ -31,8 +31,8 @@ class MapUrlTile extends React.Component {
|
|
|
31
31
|
getMapManagerCommand;
|
|
32
32
|
getUIManagerCommand;
|
|
33
33
|
render() {
|
|
34
|
-
const
|
|
35
|
-
return <
|
|
34
|
+
const RNMMapUrlTile = this.getNativeComponent();
|
|
35
|
+
return <RNMMapUrlTile {...this.props}/>;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
exports.MapUrlTile = MapUrlTile;
|
package/lib/MapView.d.ts
CHANGED
|
@@ -660,10 +660,9 @@ declare class MapView extends React.Component<MapViewProps, State> {
|
|
|
660
660
|
* @return Object Object bounding box ({ northEast: <LatLng>, southWest: <LatLng> })
|
|
661
661
|
*/
|
|
662
662
|
boundingBoxForRegion(region: Region): BoundingBox;
|
|
663
|
-
private _mapManagerCommand;
|
|
664
663
|
private _getHandle;
|
|
665
|
-
private
|
|
664
|
+
private _gogleMapsOniOS;
|
|
666
665
|
render(): JSX.Element;
|
|
667
666
|
}
|
|
668
|
-
export declare const enableLatestRenderer: () =>
|
|
667
|
+
export declare const enableLatestRenderer: () => Promise<string> | undefined;
|
|
669
668
|
export default MapView;
|
package/lib/MapView.js
CHANGED
|
@@ -22,6 +22,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
29
|
exports.enableLatestRenderer = exports.MAP_TYPES = void 0;
|
|
27
30
|
const React = __importStar(require("react"));
|
|
@@ -29,6 +32,8 @@ const react_native_1 = require("react-native");
|
|
|
29
32
|
const decorateMapComponent_1 = require("./decorateMapComponent");
|
|
30
33
|
const ProviderConstants = __importStar(require("./ProviderConstants"));
|
|
31
34
|
const MapViewNativeComponent_1 = require("./MapViewNativeComponent");
|
|
35
|
+
const NativeMapViewModule_1 = __importDefault(require("./NativeMapViewModule"));
|
|
36
|
+
const NativeGoogleMapViewModule_1 = __importDefault(require("./NativeGoogleMapViewModule"));
|
|
32
37
|
exports.MAP_TYPES = {
|
|
33
38
|
STANDARD: 'standard',
|
|
34
39
|
SATELLITE: 'satellite',
|
|
@@ -79,13 +84,10 @@ class MapView extends React.Component {
|
|
|
79
84
|
}
|
|
80
85
|
}
|
|
81
86
|
getCamera() {
|
|
82
|
-
if (
|
|
83
|
-
return
|
|
84
|
-
}
|
|
85
|
-
else if (react_native_1.Platform.OS === 'ios') {
|
|
86
|
-
return this._runCommand('getCamera', []);
|
|
87
|
+
if (this._gogleMapsOniOS()) {
|
|
88
|
+
return googleMapViewModuleMethod('getCamera')(this._getHandle());
|
|
87
89
|
}
|
|
88
|
-
return
|
|
90
|
+
return mapViewModuleMethod('getCamera')(this._getHandle());
|
|
89
91
|
}
|
|
90
92
|
setCamera(camera) {
|
|
91
93
|
if (this.map.current) {
|
|
@@ -126,13 +128,10 @@ class MapView extends React.Component {
|
|
|
126
128
|
* @return Promise Promise with the bounding box ({ northEast: <LatLng>, southWest: <LatLng> })
|
|
127
129
|
*/
|
|
128
130
|
async getMapBoundaries() {
|
|
129
|
-
if (
|
|
130
|
-
return
|
|
131
|
-
}
|
|
132
|
-
else if (react_native_1.Platform.OS === 'ios') {
|
|
133
|
-
return await this._runCommand('getMapBoundaries', []);
|
|
131
|
+
if (this._gogleMapsOniOS()) {
|
|
132
|
+
return googleMapViewModuleMethod('getMapBoundaries')(this._getHandle());
|
|
134
133
|
}
|
|
135
|
-
return
|
|
134
|
+
return mapViewModuleMethod('getMapBoundaries')(this._getHandle());
|
|
136
135
|
}
|
|
137
136
|
setMapBoundaries(northEast, southWest) {
|
|
138
137
|
if (this.map.current) {
|
|
@@ -163,7 +162,7 @@ class MapView extends React.Component {
|
|
|
163
162
|
const config = {
|
|
164
163
|
width: args.width || 0,
|
|
165
164
|
height: args.height || 0,
|
|
166
|
-
region: args.region
|
|
165
|
+
region: args.region,
|
|
167
166
|
format: args.format || 'png',
|
|
168
167
|
quality: args.quality || 1.0,
|
|
169
168
|
result: args.result || 'file',
|
|
@@ -174,31 +173,10 @@ class MapView extends React.Component {
|
|
|
174
173
|
if (config.result !== 'file' && config.result !== 'base64') {
|
|
175
174
|
throw new Error('Invalid result specified');
|
|
176
175
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
return react_native_1.NativeModules.AirMapModule.takeSnapshot(this._getHandle(), config);
|
|
176
|
+
if (this._gogleMapsOniOS()) {
|
|
177
|
+
return googleMapViewModuleMethod('takeSnapshot')(this._getHandle(), config);
|
|
180
178
|
}
|
|
181
|
-
|
|
182
|
-
return new Promise((resolve, reject) => {
|
|
183
|
-
this._runCommand('takeSnapshot', [
|
|
184
|
-
config.width,
|
|
185
|
-
config.height,
|
|
186
|
-
config.region,
|
|
187
|
-
config.format,
|
|
188
|
-
config.quality,
|
|
189
|
-
config.result,
|
|
190
|
-
(err, snapshot) => {
|
|
191
|
-
if (err) {
|
|
192
|
-
reject(err);
|
|
193
|
-
}
|
|
194
|
-
else {
|
|
195
|
-
resolve(snapshot);
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
]);
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
return Promise.reject('takeSnapshot not supported on this platform');
|
|
179
|
+
return mapViewModuleMethod('takeSnapshot')(this._getHandle(), config);
|
|
202
180
|
}
|
|
203
181
|
/**
|
|
204
182
|
* Convert a coordinate to address by using default Geocoder
|
|
@@ -210,13 +188,10 @@ class MapView extends React.Component {
|
|
|
210
188
|
* @return Promise with return type Address
|
|
211
189
|
*/
|
|
212
190
|
addressForCoordinate(coordinate) {
|
|
213
|
-
if (
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
else if (react_native_1.Platform.OS === 'ios') {
|
|
217
|
-
return this._runCommand('getAddressFromCoordinates', [coordinate]);
|
|
191
|
+
if (this._gogleMapsOniOS()) {
|
|
192
|
+
throw new Error('addressForCoordinate not supported on Google Maps iOS');
|
|
218
193
|
}
|
|
219
|
-
return
|
|
194
|
+
return mapViewModuleMethod('getAddressFromCoordinates')(this._getHandle(), coordinate);
|
|
220
195
|
}
|
|
221
196
|
/**
|
|
222
197
|
* Convert a map coordinate to user-space point
|
|
@@ -228,13 +203,10 @@ class MapView extends React.Component {
|
|
|
228
203
|
* @return Promise Promise with the point ({ x: Number, y: Number })
|
|
229
204
|
*/
|
|
230
205
|
pointForCoordinate(coordinate) {
|
|
231
|
-
if (
|
|
232
|
-
return
|
|
206
|
+
if (this._gogleMapsOniOS()) {
|
|
207
|
+
return googleMapViewModuleMethod('pointForCoordinate')(this._getHandle(), coordinate);
|
|
233
208
|
}
|
|
234
|
-
|
|
235
|
-
return this._runCommand('pointForCoordinate', [coordinate]);
|
|
236
|
-
}
|
|
237
|
-
return Promise.reject('pointForCoordinate not supported on this platform');
|
|
209
|
+
return mapViewModuleMethod('pointForCoordinate')(this._getHandle(), coordinate);
|
|
238
210
|
}
|
|
239
211
|
/**
|
|
240
212
|
* Convert a user-space point to a map coordinate
|
|
@@ -246,13 +218,10 @@ class MapView extends React.Component {
|
|
|
246
218
|
* @return Promise Promise with the coordinate ({ latitude: Number, longitude: Number })
|
|
247
219
|
*/
|
|
248
220
|
coordinateForPoint(point) {
|
|
249
|
-
if (
|
|
250
|
-
return
|
|
251
|
-
}
|
|
252
|
-
else if (react_native_1.Platform.OS === 'ios') {
|
|
253
|
-
return this._runCommand('coordinateForPoint', [point]);
|
|
221
|
+
if (this._gogleMapsOniOS()) {
|
|
222
|
+
return googleMapViewModuleMethod('coordinateForPoint')(this._getHandle(), point);
|
|
254
223
|
}
|
|
255
|
-
return
|
|
224
|
+
return mapViewModuleMethod('coordinateForPoint')(this._getHandle(), point);
|
|
256
225
|
}
|
|
257
226
|
/**
|
|
258
227
|
* Get markers' centers and frames in user-space coordinates
|
|
@@ -262,10 +231,13 @@ class MapView extends React.Component {
|
|
|
262
231
|
* @return Promise Promise with { <identifier>: { point: Point, frame: Frame } }
|
|
263
232
|
*/
|
|
264
233
|
getMarkersFrames(onlyVisible = false) {
|
|
265
|
-
if (react_native_1.Platform.OS
|
|
266
|
-
|
|
234
|
+
if (react_native_1.Platform.OS !== 'ios') {
|
|
235
|
+
throw new Error('getMarkersFrames only supported on iOS');
|
|
236
|
+
}
|
|
237
|
+
if (this._gogleMapsOniOS()) {
|
|
238
|
+
return googleMapViewModuleMethod('getMarkersFrames')(this._getHandle(), onlyVisible);
|
|
267
239
|
}
|
|
268
|
-
return
|
|
240
|
+
return mapViewModuleMethod('getMarkersFrames')(this._getHandle(), onlyVisible);
|
|
269
241
|
}
|
|
270
242
|
/**
|
|
271
243
|
* Get bounding box from region
|
|
@@ -286,19 +258,15 @@ class MapView extends React.Component {
|
|
|
286
258
|
},
|
|
287
259
|
};
|
|
288
260
|
}
|
|
289
|
-
_mapManagerCommand(name) {
|
|
290
|
-
return react_native_1.NativeModules[`${(0, decorateMapComponent_1.getNativeMapName)(this.props.provider)}Manager`][name];
|
|
291
|
-
}
|
|
292
261
|
_getHandle() {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
if (react_native_1.Platform.OS === 'ios') {
|
|
297
|
-
return this._mapManagerCommand(name)(this._getHandle(), ...args);
|
|
298
|
-
}
|
|
299
|
-
else {
|
|
300
|
-
return Promise.reject(`Invalid platform was passed: ${react_native_1.Platform.OS}`);
|
|
262
|
+
const handle = (0, react_native_1.findNodeHandle)(this.map.current);
|
|
263
|
+
if (!handle) {
|
|
264
|
+
throw new Error('Cannot find node handle');
|
|
301
265
|
}
|
|
266
|
+
return handle;
|
|
267
|
+
}
|
|
268
|
+
_gogleMapsOniOS() {
|
|
269
|
+
return react_native_1.Platform.OS === 'ios' && this.props.provider === 'google';
|
|
302
270
|
}
|
|
303
271
|
render() {
|
|
304
272
|
let props;
|
|
@@ -341,36 +309,55 @@ class MapView extends React.Component {
|
|
|
341
309
|
}
|
|
342
310
|
if (react_native_1.Platform.OS === 'android' && this.props.liteMode) {
|
|
343
311
|
return (<decorateMapComponent_1.ProviderContext.Provider value={this.props.provider}>
|
|
344
|
-
<
|
|
312
|
+
<RNMMapLite {...props}/>
|
|
345
313
|
</decorateMapComponent_1.ProviderContext.Provider>);
|
|
346
314
|
}
|
|
347
|
-
const
|
|
315
|
+
const RNMMap = getNativeMapComponent(this.props.provider);
|
|
348
316
|
return (<decorateMapComponent_1.ProviderContext.Provider value={this.props.provider}>
|
|
349
|
-
<
|
|
317
|
+
<RNMMap {...props}/>
|
|
350
318
|
</decorateMapComponent_1.ProviderContext.Provider>);
|
|
351
319
|
}
|
|
352
320
|
}
|
|
353
|
-
const
|
|
354
|
-
default: (0, react_native_1.requireNativeComponent)('
|
|
321
|
+
const rnmMaps = {
|
|
322
|
+
default: (0, react_native_1.requireNativeComponent)('RNMMap'),
|
|
355
323
|
google: () => null,
|
|
356
324
|
};
|
|
357
325
|
if (react_native_1.Platform.OS === 'android') {
|
|
358
|
-
|
|
326
|
+
rnmMaps.google = rnmMaps.default;
|
|
359
327
|
}
|
|
360
328
|
else {
|
|
361
|
-
|
|
362
|
-
? (0, react_native_1.requireNativeComponent)('
|
|
363
|
-
: (0, decorateMapComponent_1.createNotSupportedComponent)('react-native-maps:
|
|
329
|
+
rnmMaps.google = decorateMapComponent_1.googleMapIsInstalled
|
|
330
|
+
? (0, react_native_1.requireNativeComponent)('RNMGoogleMap')
|
|
331
|
+
: (0, decorateMapComponent_1.createNotSupportedComponent)('react-native-maps: RNMGoogleMaps dir must be added to your xCode project to support GoogleMaps on iOS.');
|
|
364
332
|
}
|
|
365
|
-
const getNativeMapComponent = (provider) =>
|
|
366
|
-
const
|
|
367
|
-
? (0, react_native_1.requireNativeComponent)('
|
|
333
|
+
const getNativeMapComponent = (provider) => rnmMaps[provider || 'default'];
|
|
334
|
+
const RNMMapLite = react_native_1.UIManager.getViewManagerConfig('RNMMapLite')
|
|
335
|
+
? (0, react_native_1.requireNativeComponent)('RNMMapLite')
|
|
368
336
|
: () => null;
|
|
369
337
|
const enableLatestRenderer = () => {
|
|
370
|
-
if (react_native_1.Platform.OS
|
|
371
|
-
return;
|
|
338
|
+
if (react_native_1.Platform.OS === 'android') {
|
|
339
|
+
return mapViewModuleMethod('enableLatestRenderer')();
|
|
372
340
|
}
|
|
373
|
-
return react_native_1.NativeModules.AirMapModule.enableLatestRenderer();
|
|
374
341
|
};
|
|
375
342
|
exports.enableLatestRenderer = enableLatestRenderer;
|
|
343
|
+
function mapViewModuleMethod(name) {
|
|
344
|
+
if (!NativeMapViewModule_1.default) {
|
|
345
|
+
throw new Error('MapViewModule is null');
|
|
346
|
+
}
|
|
347
|
+
const method = NativeMapViewModule_1.default[name];
|
|
348
|
+
if (!method) {
|
|
349
|
+
throw new Error(`Method ${name} is not defined`);
|
|
350
|
+
}
|
|
351
|
+
return NativeMapViewModule_1.default[name];
|
|
352
|
+
}
|
|
353
|
+
function googleMapViewModuleMethod(name) {
|
|
354
|
+
if (!NativeGoogleMapViewModule_1.default) {
|
|
355
|
+
throw new Error('GoogleMapViewModule is null');
|
|
356
|
+
}
|
|
357
|
+
const method = NativeGoogleMapViewModule_1.default[name];
|
|
358
|
+
if (!method) {
|
|
359
|
+
throw new Error(`Method ${name} is not defined`);
|
|
360
|
+
}
|
|
361
|
+
return NativeGoogleMapViewModule_1.default[name];
|
|
362
|
+
}
|
|
376
363
|
exports.default = MapView;
|
package/lib/MapView.types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClickEvent, LatLng, Point, Region } from './sharedTypes';
|
|
1
|
+
import { ClickEvent, Frame, LatLng, Point, Region } from './sharedTypes';
|
|
2
2
|
import { NativeSyntheticEvent } from 'react-native';
|
|
3
3
|
export type Camera = {
|
|
4
4
|
/**
|
|
@@ -150,4 +150,10 @@ export type Address = {
|
|
|
150
150
|
subLocality: string;
|
|
151
151
|
thoroughfare: string;
|
|
152
152
|
};
|
|
153
|
+
export interface MarkersFrames {
|
|
154
|
+
[key: string]: {
|
|
155
|
+
point: Point;
|
|
156
|
+
frame: Frame;
|
|
157
|
+
};
|
|
158
|
+
}
|
|
153
159
|
export type NativeCommandName = 'animateCamera' | 'animateToRegion' | 'coordinateForPoint' | 'fitToCoordinates' | 'fitToElements' | 'fitToSuppliedMarkers' | 'getAddressFromCoordinates' | 'getCamera' | 'getMapBoundaries' | 'getMarkersFrames' | 'pointForCoordinate' | 'setCamera' | 'setIndoorActiveLevelIndex' | 'setMapBoundaries' | 'takeSnapshot';
|
package/lib/MapWMSTile.js
CHANGED
|
@@ -31,8 +31,8 @@ class MapWMSTile extends React.Component {
|
|
|
31
31
|
getMapManagerCommand;
|
|
32
32
|
getUIManagerCommand;
|
|
33
33
|
render() {
|
|
34
|
-
const
|
|
35
|
-
return <
|
|
34
|
+
const RNMMapWMSTile = this.getNativeComponent();
|
|
35
|
+
return <RNMMapWMSTile {...this.props}/>;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
exports.MapWMSTile = MapWMSTile;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
import { BoundingBox, Camera, MarkersFrames } from './MapView.types';
|
|
3
|
+
import { LatLng, Point, Region } from './sharedTypes';
|
|
4
|
+
export interface Spec extends TurboModule {
|
|
5
|
+
coordinateForPoint: (viewTag: number, point: Point) => Promise<LatLng>;
|
|
6
|
+
getCamera: (viewTag: number) => Promise<Camera>;
|
|
7
|
+
getMapBoundaries: (viewTag: number) => Promise<BoundingBox>;
|
|
8
|
+
getMarkersFrames: (viewTag: number, onlyVisible: boolean) => Promise<MarkersFrames>;
|
|
9
|
+
pointForCoordinate: (viewTag: number, coordinate: LatLng) => Promise<Point>;
|
|
10
|
+
takeSnapshot: (viewTag: number, config: {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
region?: Region;
|
|
14
|
+
format: string;
|
|
15
|
+
quality: number;
|
|
16
|
+
result: string;
|
|
17
|
+
}) => Promise<string>;
|
|
18
|
+
}
|
|
19
|
+
declare const _default: Spec | null;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
import { Address, BoundingBox, Camera, MarkersFrames } from './MapView.types';
|
|
3
|
+
import { LatLng, Point, Region } from './sharedTypes';
|
|
4
|
+
export interface Spec extends TurboModule {
|
|
5
|
+
coordinateForPoint: (viewTag: number, point: Point) => Promise<LatLng>;
|
|
6
|
+
/** android only */
|
|
7
|
+
enableLatestRenderer: () => Promise<string>;
|
|
8
|
+
getAddressFromCoordinates: (viewTag: number, coordinate: LatLng) => Promise<Address>;
|
|
9
|
+
getCamera: (viewTag: number) => Promise<Camera>;
|
|
10
|
+
getMapBoundaries: (viewTag: number) => Promise<BoundingBox>;
|
|
11
|
+
/** ios only */
|
|
12
|
+
getMarkersFrames: (viewTag: number, onlyVisible: boolean) => Promise<MarkersFrames>;
|
|
13
|
+
pointForCoordinate: (viewTag: number, coordinate: LatLng) => Promise<Point>;
|
|
14
|
+
takeSnapshot: (viewTag: number, config: {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
region?: Region;
|
|
18
|
+
format: string;
|
|
19
|
+
quality: number;
|
|
20
|
+
result: string;
|
|
21
|
+
}) => Promise<string>;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: Spec | null;
|
|
24
|
+
export default _default;
|
|
@@ -16,7 +16,7 @@ export declare const SUPPORTED: ImplementationStatus;
|
|
|
16
16
|
export declare const USES_DEFAULT_IMPLEMENTATION: ImplementationStatus;
|
|
17
17
|
export declare const NOT_SUPPORTED: ImplementationStatus;
|
|
18
18
|
export declare const ProviderContext: import("react").Context<Provider>;
|
|
19
|
-
export declare function getNativeMapName(provider: Provider): "
|
|
19
|
+
export declare function getNativeMapName(provider: Provider): "RNMMap" | "RNMGoogleMap";
|
|
20
20
|
export declare const createNotSupportedComponent: (message: string) => () => null;
|
|
21
21
|
export declare const googleMapIsInstalled = true;
|
|
22
22
|
export default function decorateMapComponent<Type extends Component>(Component: Type, componentName: ComponentName, providers: Providers): Type;
|
|
@@ -10,12 +10,12 @@ exports.NOT_SUPPORTED = 'NOT_SUPPORTED';
|
|
|
10
10
|
exports.ProviderContext = (0, react_1.createContext)(undefined);
|
|
11
11
|
function getNativeMapName(provider) {
|
|
12
12
|
if (react_native_1.Platform.OS === 'android') {
|
|
13
|
-
return '
|
|
13
|
+
return 'RNMMap';
|
|
14
14
|
}
|
|
15
15
|
if (provider === ProviderConstants_1.PROVIDER_GOOGLE) {
|
|
16
|
-
return '
|
|
16
|
+
return 'RNMGoogleMap';
|
|
17
17
|
}
|
|
18
|
-
return '
|
|
18
|
+
return 'RNMMap';
|
|
19
19
|
}
|
|
20
20
|
exports.getNativeMapName = getNativeMapName;
|
|
21
21
|
function getNativeComponentName(provider, component) {
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Leland Richardson <leland.m.richardson@gmail.com>",
|
|
7
7
|
"homepage": "https://github.com/react-native-maps/react-native-maps#readme",
|
|
8
|
-
"version": "2.0.0-beta.
|
|
8
|
+
"version": "2.0.0-beta.6",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|
|
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
|
|
|
12
12
|
s.platform = :ios, "13.0"
|
|
13
13
|
|
|
14
14
|
s.source = { :git => "https://github.com/react-native-maps/react-native-maps.git", :tag=> "v#{s.version}" }
|
|
15
|
-
s.source_files = "ios/
|
|
15
|
+
s.source_files = "ios/GoogleMaps/**/*.{h,m}"
|
|
16
16
|
s.compiler_flags = '-DHAVE_GOOGLE_MAPS=1', '-DHAVE_GOOGLE_MAPS_UTILS=1'
|
|
17
17
|
s.pod_target_xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"${PODS_CONFIGURATION_BUILD_DIR}/react-native-maps"' }
|
|
18
18
|
|
|
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
|
|
|
12
12
|
s.platform = :ios, "11.0"
|
|
13
13
|
|
|
14
14
|
s.source = { :git => "https://github.com/react-native-maps/react-native-maps.git", :tag=> "v#{s.version}" }
|
|
15
|
-
s.source_files = "ios/
|
|
15
|
+
s.source_files = "ios/Maps/**/*.{h,m}"
|
|
16
16
|
|
|
17
17
|
s.dependency 'React-Core'
|
|
18
18
|
end
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// AIRGoogleMapCalloutSubviewManager.m
|
|
3
|
-
// AirMaps
|
|
4
|
-
//
|
|
5
|
-
// Created by Denis Oblogin on 10/8/18.
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
#ifdef HAVE_GOOGLE_MAPS
|
|
10
|
-
|
|
11
|
-
#import "AIRGoogleMapCalloutSubviewManager.h"
|
|
12
|
-
#import "AIRGoogleMapCalloutSubview.h"
|
|
13
|
-
#import <React/RCTView.h>
|
|
14
|
-
|
|
15
|
-
@implementation AIRGoogleMapCalloutSubviewManager
|
|
16
|
-
RCT_EXPORT_MODULE()
|
|
17
|
-
|
|
18
|
-
- (UIView *)view
|
|
19
|
-
{
|
|
20
|
-
AIRGoogleMapCalloutSubview *calloutSubview = [AIRGoogleMapCalloutSubview new];
|
|
21
|
-
return calloutSubview;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
RCT_EXPORT_VIEW_PROPERTY(onPress, RCTBubblingEventBlock)
|
|
25
|
-
|
|
26
|
-
@end
|
|
27
|
-
|
|
28
|
-
#endif
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// AIRMapCalloutSubviewManager.m
|
|
3
|
-
// AirMaps
|
|
4
|
-
//
|
|
5
|
-
// Created by Denis Oblogin on 10/8/18.
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
#import "AIRMapCalloutSubviewManager.h"
|
|
10
|
-
#import "AIRMapCalloutSubview.h"
|
|
11
|
-
#import <React/RCTView.h>
|
|
12
|
-
|
|
13
|
-
@implementation AIRMapCalloutSubviewManager
|
|
14
|
-
RCT_EXPORT_MODULE()
|
|
15
|
-
|
|
16
|
-
- (UIView *)view
|
|
17
|
-
{
|
|
18
|
-
AIRMapCalloutSubview *calloutSubview = [AIRMapCalloutSubview new];
|
|
19
|
-
return calloutSubview;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
RCT_EXPORT_VIEW_PROPERTY(onPress, RCTBubblingEventBlock)
|
|
23
|
-
|
|
24
|
-
@end
|