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.
Files changed (179) hide show
  1. package/README.md +32 -5
  2. package/android/src/main/java/com/rnmaps/maps/MapCalloutManager.java +1 -1
  3. package/android/src/main/java/com/rnmaps/maps/MapCircleManager.java +1 -1
  4. package/android/src/main/java/com/rnmaps/maps/MapGradientPolyline.java +4 -4
  5. package/android/src/main/java/com/rnmaps/maps/MapGradientPolylineManager.java +1 -1
  6. package/android/src/main/java/com/rnmaps/maps/MapHeatmapManager.java +1 -1
  7. package/android/src/main/java/com/rnmaps/maps/MapLiteManager.java +1 -1
  8. package/android/src/main/java/com/rnmaps/maps/MapLocalTile.java +4 -4
  9. package/android/src/main/java/com/rnmaps/maps/MapLocalTileManager.java +1 -1
  10. package/android/src/main/java/com/rnmaps/maps/MapManager.java +1 -1
  11. package/android/src/main/java/com/rnmaps/maps/MapMarker.java +2 -2
  12. package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +10 -27
  13. package/android/src/main/java/com/rnmaps/maps/MapOverlayManager.java +1 -1
  14. package/android/src/main/java/com/rnmaps/maps/MapPolygonManager.java +1 -1
  15. package/android/src/main/java/com/rnmaps/maps/MapPolylineManager.java +1 -1
  16. package/android/src/main/java/com/rnmaps/maps/MapTileProvider.java +4 -4
  17. package/android/src/main/java/com/rnmaps/maps/MapUrlTileManager.java +1 -1
  18. package/android/src/main/java/com/rnmaps/maps/MapView.java +9 -9
  19. package/android/src/main/java/com/rnmaps/maps/{MapModule.java → MapViewModule.java} +18 -18
  20. package/android/src/main/java/com/rnmaps/maps/MapWMSTile.java +6 -6
  21. package/android/src/main/java/com/rnmaps/maps/MapWMSTileManager.java +1 -1
  22. package/android/src/main/java/com/rnmaps/maps/MapsPackage.java +1 -1
  23. package/android/src/main/java/com/rnmaps/maps/SizeReportingShadowNode.java +1 -1
  24. package/ios/{AirGoogleMaps/AIRDummyView.h → GoogleMaps/RNMDummyView.h} +3 -3
  25. package/ios/{AirGoogleMaps/AIRDummyView.m → GoogleMaps/RNMDummyView.m} +4 -4
  26. package/ios/{AirGoogleMaps/AIRGMSMarker.h → GoogleMaps/RNMGMSMarker.h} +6 -6
  27. package/ios/{AirGoogleMaps/AIRGMSMarker.m → GoogleMaps/RNMGMSMarker.m} +4 -4
  28. package/ios/{AirGoogleMaps/AIRGMSPolygon.h → GoogleMaps/RNMGMSPolygon.h} +4 -4
  29. package/ios/{AirGoogleMaps/AIRGMSPolygon.m → GoogleMaps/RNMGMSPolygon.m} +4 -4
  30. package/ios/{AirGoogleMaps/AIRGMSPolyline.h → GoogleMaps/RNMGMSPolyline.h} +4 -4
  31. package/ios/{AirGoogleMaps/AIRGMSPolyline.m → GoogleMaps/RNMGMSPolyline.m} +4 -4
  32. package/ios/{AirGoogleMaps/AIRGoogleMap.h → GoogleMaps/RNMGoogleMap.h} +5 -5
  33. package/ios/{AirGoogleMaps/AIRGoogleMap.m → GoogleMaps/RNMGoogleMap.m} +77 -77
  34. package/ios/{AirGoogleMaps/AIRGoogleMapCallout.h → GoogleMaps/RNMGoogleMapCallout.h} +3 -3
  35. package/ios/{AirGoogleMaps/AIRGoogleMapCallout.m → GoogleMaps/RNMGoogleMapCallout.m} +4 -4
  36. package/ios/{AirGoogleMaps/AIRGoogleMapCalloutManager.h → GoogleMaps/RNMGoogleMapCalloutManager.h} +3 -3
  37. package/ios/{AirGoogleMaps/AIRGoogleMapCalloutManager.m → GoogleMaps/RNMGoogleMapCalloutManager.m} +7 -7
  38. package/ios/{AirGoogleMaps/AIRGoogleMapCalloutSubview.h → GoogleMaps/RNMGoogleMapCalloutSubview.h} +3 -3
  39. package/ios/{AirGoogleMaps/AIRGoogleMapCalloutSubview.m → GoogleMaps/RNMGoogleMapCalloutSubview.m} +4 -4
  40. package/ios/{AirGoogleMaps/AIRGoogleMapCalloutSubviewManager.h → GoogleMaps/RNMGoogleMapCalloutSubviewManager.h} +3 -3
  41. package/ios/GoogleMaps/RNMGoogleMapCalloutSubviewManager.m +28 -0
  42. package/ios/{AirGoogleMaps/AIRGoogleMapCircle.h → GoogleMaps/RNMGoogleMapCircle.h} +3 -3
  43. package/ios/{AirGoogleMaps/AIRGoogleMapCircle.m → GoogleMaps/RNMGoogleMapCircle.m} +3 -3
  44. package/ios/{AirGoogleMaps/AIRGoogleMapCircleManager.h → GoogleMaps/RNMGoogleMapCircleManager.h} +2 -2
  45. package/ios/{AirGoogleMaps/AIRGoogleMapCircleManager.m → GoogleMaps/RNMGoogleMapCircleManager.m} +7 -7
  46. package/ios/{AirGoogleMaps/AIRGoogleMapHeatmap.h → GoogleMaps/RNMGoogleMapHeatmap.h} +3 -3
  47. package/ios/{AirGoogleMaps/AIRGoogleMapHeatmap.m → GoogleMaps/RNMGoogleMapHeatmap.m} +4 -4
  48. package/ios/GoogleMaps/RNMGoogleMapHeatmapManager.h +11 -0
  49. package/ios/{AirGoogleMaps/AIRGoogleMapHeatmapManager.m → GoogleMaps/RNMGoogleMapHeatmapManager.m} +9 -9
  50. package/ios/{AirGoogleMaps/AIRGoogleMapManager.h → GoogleMaps/RNMGoogleMapManager.h} +3 -3
  51. package/ios/{AirGoogleMaps/AIRGoogleMapManager.m → GoogleMaps/RNMGoogleMapManager.m} +63 -229
  52. package/ios/{AirGoogleMaps/AIRGoogleMapMarker.h → GoogleMaps/RNMGoogleMapMarker.h} +15 -15
  53. package/ios/{AirGoogleMaps/AIRGoogleMapMarker.m → GoogleMaps/RNMGoogleMapMarker.m} +23 -23
  54. package/ios/{AirGoogleMaps/AIRGoogleMapMarkerManager.h → GoogleMaps/RNMGoogleMapMarkerManager.h} +3 -3
  55. package/ios/{AirGoogleMaps/AIRGoogleMapMarkerManager.m → GoogleMaps/RNMGoogleMapMarkerManager.m} +20 -20
  56. package/ios/{AirGoogleMaps/AIRGoogleMapOverlay.h → GoogleMaps/RNMGoogleMapOverlay.h} +4 -4
  57. package/ios/{AirGoogleMaps/AIRGoogleMapOverlay.m → GoogleMaps/RNMGoogleMapOverlay.m} +4 -4
  58. package/ios/{AirGoogleMaps/AIRGoogleMapOverlayManager.h → GoogleMaps/RNMGoogleMapOverlayManager.h} +2 -2
  59. package/ios/{AirGoogleMaps/AIRGoogleMapOverlayManager.m → GoogleMaps/RNMGoogleMapOverlayManager.m} +6 -6
  60. package/ios/{AirGoogleMaps/AIRGoogleMapPolygon.h → GoogleMaps/RNMGoogleMapPolygon.h} +7 -7
  61. package/ios/{AirGoogleMaps/AIRGoogleMapPolygon.m → GoogleMaps/RNMGoogleMapPolygon.m} +7 -7
  62. package/ios/{AirGoogleMaps/AIRGoogleMapPolylineManager.h → GoogleMaps/RNMGoogleMapPolygonManager.h} +2 -2
  63. package/ios/{AirGoogleMaps/AIRGoogleMapPolygonManager.m → GoogleMaps/RNMGoogleMapPolygonManager.m} +10 -10
  64. package/ios/{AirGoogleMaps/AIRGoogleMapPolyline.h → GoogleMaps/RNMGoogleMapPolyline.h} +7 -7
  65. package/ios/{AirGoogleMaps/AIRGoogleMapPolyline.m → GoogleMaps/RNMGoogleMapPolyline.m} +9 -9
  66. package/ios/{AirGoogleMaps/AIRGoogleMapPolygonManager.h → GoogleMaps/RNMGoogleMapPolylineManager.h} +2 -2
  67. package/ios/{AirGoogleMaps/AIRGoogleMapPolylineManager.m → GoogleMaps/RNMGoogleMapPolylineManager.m} +9 -9
  68. package/ios/{AirGoogleMaps/AIRGoogleMapUrlTile.h → GoogleMaps/RNMGoogleMapUrlTile.h} +2 -2
  69. package/ios/{AirGoogleMaps/AIRGoogleMapUrlTile.m → GoogleMaps/RNMGoogleMapUrlTile.m} +3 -3
  70. package/ios/{AirGoogleMaps/AIRGoogleMapUrlTileManager.h → GoogleMaps/RNMGoogleMapUrlTileManager.h} +2 -2
  71. package/ios/{AirGoogleMaps/AIRGoogleMapURLTileManager.m → GoogleMaps/RNMGoogleMapUrlTileManager.m} +7 -7
  72. package/ios/GoogleMaps/RNMGoogleMapViewModule.h +5 -0
  73. package/ios/GoogleMaps/RNMGoogleMapViewModule.m +183 -0
  74. package/ios/{AirGoogleMaps/AIRGoogleMapWMSTile.h → GoogleMaps/RNMGoogleMapWMSTile.h} +3 -3
  75. package/ios/{AirGoogleMaps/AIRGoogleMapWMSTile.m → GoogleMaps/RNMGoogleMapWMSTile.m} +4 -4
  76. package/ios/{AirGoogleMaps/AIRGoogleMapWMSTileManager.h → GoogleMaps/RNMGoogleMapWMSTileManager.h} +3 -3
  77. package/ios/{AirGoogleMaps/AIRGoogleMapWMSTileManager.m → GoogleMaps/RNMGoogleMapWMSTileManager.m} +8 -8
  78. package/ios/{AirMaps → Maps}/Callout/SMCalloutView.h +4 -4
  79. package/ios/{AirMaps/RCTConvert+AirMap.h → Maps/RCTConvert+RNMMap.h} +1 -1
  80. package/ios/{AirMaps/RCTConvert+AirMap.m → Maps/RCTConvert+RNMMap.m} +8 -8
  81. package/ios/{AirMaps/AIRMap.h → Maps/RNMMap.h} +8 -8
  82. package/ios/{AirMaps/AIRMap.m → Maps/RNMMap.m} +56 -56
  83. package/ios/{AirMaps/AIRMapCallout.h → Maps/RNMMapCallout.h} +1 -1
  84. package/ios/{AirMaps/AIRMapCallout.m → Maps/RNMMapCallout.m} +2 -2
  85. package/ios/{AirMaps/AIRMapCircleManager.h → Maps/RNMMapCalloutManager.h} +2 -2
  86. package/ios/{AirMaps/AIRMapCalloutManager.m → Maps/RNMMapCalloutManager.m} +7 -7
  87. package/ios/{AirMaps/AIRMapCalloutSubview.h → Maps/RNMMapCalloutSubview.h} +3 -3
  88. package/ios/{AirMaps/AIRMapCalloutSubview.m → Maps/RNMMapCalloutSubview.m} +4 -4
  89. package/ios/Maps/RNMMapCalloutSubviewManager.h +14 -0
  90. package/ios/Maps/RNMMapCalloutSubviewManager.m +24 -0
  91. package/ios/{AirMaps/AIRMapCircle.h → Maps/RNMMapCircle.h} +5 -5
  92. package/ios/{AirMaps/AIRMapCircle.m → Maps/RNMMapCircle.m} +3 -3
  93. package/ios/{AirMaps/AIRMapCalloutManager.h → Maps/RNMMapCircleManager.h} +2 -2
  94. package/ios/{AirMaps/AIRMapCircleManager.m → Maps/RNMMapCircleManager.m} +7 -7
  95. package/ios/{AirMaps/AIRMapCoordinate.h → Maps/RNMMapCoordinate.h} +2 -2
  96. package/ios/{AirMaps/AIRMapCoordinate.m → Maps/RNMMapCoordinate.m} +3 -3
  97. package/ios/{AirMaps/AIRMapLocalTile.h → Maps/RNMMapLocalTile.h} +7 -7
  98. package/ios/{AirMaps/AIRMapLocalTile.m → Maps/RNMMapLocalTile.m} +6 -6
  99. package/ios/{AirMaps/AIRMapLocalTileManager.h → Maps/RNMMapLocalTileManager.h} +3 -3
  100. package/ios/{AirMaps/AIRMapLocalTileManager.m → Maps/RNMMapLocalTileManager.m} +9 -9
  101. package/ios/{AirMaps/AIRMapLocalTileOverlay.h → Maps/RNMMapLocalTileOverlay.h} +2 -2
  102. package/ios/{AirMaps/AIRMapLocalTileOverlay.m → Maps/RNMMapLocalTileOverlay.m} +5 -5
  103. package/ios/{AirMaps/AIRMapManager.h → Maps/RNMMapManager.h} +6 -6
  104. package/ios/{AirMaps/AIRMapManager.m → Maps/RNMMapManager.m} +168 -445
  105. package/ios/{AirMaps/AIRMapMarker.h → Maps/RNMMapMarker.h} +8 -8
  106. package/ios/{AirMaps/AIRMapMarker.m → Maps/RNMMapMarker.m} +13 -13
  107. package/ios/{AirMaps/AIRMapMarkerManager.h → Maps/RNMMapMarkerManager.h} +1 -1
  108. package/ios/{AirMaps/AIRMapMarkerManager.m → Maps/RNMMapMarkerManager.m} +14 -14
  109. package/ios/{AirMaps/AIRMapOverlay.h → Maps/RNMMapOverlay.h} +7 -7
  110. package/ios/{AirMaps/AIRMapOverlay.m → Maps/RNMMapOverlay.m} +4 -4
  111. package/ios/Maps/RNMMapOverlayManager.h +5 -0
  112. package/ios/{AirMaps/AIRMapOverlayManager.m → Maps/RNMMapOverlayManager.m} +6 -6
  113. package/ios/{AirMaps/AIRMapOverlayRenderer.h → Maps/RNMMapOverlayRenderer.h} +1 -1
  114. package/ios/{AirMaps/AIRMapOverlayRenderer.m → Maps/RNMMapOverlayRenderer.m} +5 -5
  115. package/ios/{AirMaps/AIRMapPolygon.h → Maps/RNMMapPolygon.h} +7 -7
  116. package/ios/{AirMaps/AIRMapPolygon.m → Maps/RNMMapPolygon.m} +4 -4
  117. package/ios/{AirMaps/AIRMapPolygonManager.h → Maps/RNMMapPolygonManager.h} +2 -2
  118. package/ios/{AirMaps/AIRMapPolygonManager.m → Maps/RNMMapPolygonManager.m} +10 -10
  119. package/ios/{AirMaps/AIRMapPolyline.h → Maps/RNMMapPolyline.h} +6 -6
  120. package/ios/{AirMaps/AIRMapPolyline.m → Maps/RNMMapPolyline.m} +11 -11
  121. package/ios/{AirMaps/AIRMapPolylineManager.h → Maps/RNMMapPolylineManager.h} +2 -2
  122. package/ios/{AirMaps/AIRMapPolylineManager.m → Maps/RNMMapPolylineManager.m} +9 -9
  123. package/ios/{AirMaps/AIRMapPolylineRenderer.h → Maps/RNMMapPolylineRenderer.h} +2 -2
  124. package/ios/{AirMaps/AIRMapPolylineRenderer.m → Maps/RNMMapPolylineRenderer.m} +10 -10
  125. package/ios/{AirMaps/AIRMapSnapshot.h → Maps/RNMMapSnapshot.h} +6 -6
  126. package/ios/{AirMaps/AIRMapUrlTile.h → Maps/RNMMapUrlTile.h} +18 -18
  127. package/ios/{AirMaps/AIRMapUrlTile.m → Maps/RNMMapUrlTile.m} +7 -7
  128. package/ios/{AirMaps/AIRMapUrlTileCachedOverlay.h → Maps/RNMMapUrlTileCachedOverlay.h} +3 -3
  129. package/ios/{AirMaps/AIRMapUrlTileCachedOverlay.m → Maps/RNMMapUrlTileCachedOverlay.m} +10 -10
  130. package/ios/{AirMaps/AIRMapUrlTileManager.h → Maps/RNMMapUrlTileManager.h} +3 -3
  131. package/ios/{AirMaps/AIRMapUrlTileManager.m → Maps/RNMMapUrlTileManager.m} +9 -9
  132. package/ios/Maps/RNMMapViewModule.h +5 -0
  133. package/ios/Maps/RNMMapViewModule.m +297 -0
  134. package/ios/{AirMaps/AIRMapWMSTile.h → Maps/RNMMapWMSTile.h} +11 -11
  135. package/ios/{AirMaps/AIRMapWMSTile.m → Maps/RNMMapWMSTile.m} +15 -15
  136. package/ios/{AirMaps/AIRMapWMSTileManager.h → Maps/RNMMapWMSTileManager.h} +3 -3
  137. package/ios/{AirMaps/AIRMapWMSTileManager.m → Maps/RNMMapWMSTileManager.m} +9 -9
  138. package/ios/RNMaps.xcodeproj/project.pbxproj +647 -0
  139. package/lib/Geojson.d.ts +1 -1
  140. package/lib/MapCallout.js +2 -2
  141. package/lib/MapCalloutSubview.js +2 -2
  142. package/lib/MapCircle.js +2 -2
  143. package/lib/MapHeatmap.js +2 -2
  144. package/lib/MapLocalTile.js +2 -2
  145. package/lib/MapMarker.d.ts +2 -3
  146. package/lib/MapMarker.js +2 -4
  147. package/lib/MapOverlay.d.ts +1 -2
  148. package/lib/MapOverlay.js +2 -4
  149. package/lib/MapPolygon.js +2 -2
  150. package/lib/MapPolyline.js +2 -2
  151. package/lib/MapUrlTile.js +2 -2
  152. package/lib/MapView.d.ts +4 -9
  153. package/lib/MapView.js +74 -90
  154. package/lib/MapView.types.d.ts +7 -1
  155. package/lib/MapWMSTile.js +2 -2
  156. package/lib/NativeGoogleMapViewModule.d.ts +20 -0
  157. package/lib/NativeGoogleMapViewModule.js +4 -0
  158. package/lib/NativeMapViewModule.d.ts +24 -0
  159. package/lib/NativeMapViewModule.js +4 -0
  160. package/lib/decorateMapComponent.d.ts +1 -1
  161. package/lib/decorateMapComponent.js +3 -3
  162. package/lib/index.d.ts +14 -21
  163. package/lib/index.js +10 -38
  164. package/package.json +1 -1
  165. package/react-native-google-maps.podspec +1 -1
  166. package/react-native-maps.podspec +1 -1
  167. package/ios/AirGoogleMaps/AIRGoogleMapCalloutSubviewManager.m +0 -28
  168. package/ios/AirGoogleMaps/AIRGoogleMapHeatmapManager.h +0 -11
  169. package/ios/AirMaps/AIRMapCalloutSubviewManager.h +0 -14
  170. package/ios/AirMaps/AIRMapCalloutSubviewManager.m +0 -24
  171. package/ios/AirMaps/AIRMapOverlayManager.h +0 -5
  172. package/ios/AirMaps/AIRWeakMapReference.h +0 -24
  173. package/ios/AirMaps/AIRWeakMapReference.m +0 -23
  174. package/ios/AirMaps/AIRWeakTimerReference.h +0 -21
  175. package/ios/AirMaps/AIRWeakTimerReference.m +0 -42
  176. package/ios/AirMaps.xcodeproj/project.pbxproj +0 -587
  177. /package/ios/{AirGoogleMaps → GoogleMaps}/RCTConvert+GMSMapViewType.h +0 -0
  178. /package/ios/{AirGoogleMaps → GoogleMaps}/RCTConvert+GMSMapViewType.m +0 -0
  179. /package/ios/{AirMaps → Maps}/Callout/SMCalloutView.m +0 -0
package/lib/Geojson.d.ts CHANGED
@@ -136,7 +136,7 @@ export type GeojsonProps = {
136
136
  * This is the default value for all point markers in your geojson data. It can be overriden
137
137
  * on a per point basis by adding a `trackViewChanges` property to the `properties` object on the point.
138
138
  *
139
- * @default true
139
+ * @default false
140
140
  * @platform iOS: Google Maps only
141
141
  * @platform Android: Supported
142
142
  */
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 AIRMapCallout = this.getNativeComponent();
37
- return (<AIRMapCallout {...this.props} tooltip={tooltip} alphaHitTest={alphaHitTest} style={[styles.callout, this.props.style]}/>);
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;
@@ -32,8 +32,8 @@ class MapCalloutSubview extends React.Component {
32
32
  getMapManagerCommand;
33
33
  getUIManagerCommand;
34
34
  render() {
35
- const AIRMapCalloutSubview = this.getNativeComponent();
36
- return (<AIRMapCalloutSubview {...this.props} style={[styles.calloutSubview, this.props.style]}/>);
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 AIRMapCircle = this.getNativeComponent();
44
- return (<AIRMapCircle {...this.props} strokeColor={strokeColor} strokeWidth={strokeWidth} ref={this.circle}/>);
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 AIRMapHeatmap = this.getNativeComponent();
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 (<AIRMapHeatmap {...this.props} gradient={gradient} ref={this.heatmap}/>);
50
+ return (<RNMMapHeatmap {...this.props} gradient={gradient} ref={this.heatmap}/>);
51
51
  }
52
52
  }
53
53
  exports.MapHeatmap = MapHeatmap;
@@ -31,8 +31,8 @@ class MapLocalTile extends React.Component {
31
31
  getMapManagerCommand;
32
32
  getUIManagerCommand;
33
33
  render() {
34
- const AIRMapLocalTile = this.getNativeComponent();
35
- return <AIRMapLocalTile {...this.props}/>;
34
+ const RNMMapLocalTile = this.getNativeComponent();
35
+ return <RNMMapLocalTile {...this.props}/>;
36
36
  }
37
37
  }
38
38
  exports.MapLocalTile = MapLocalTile;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { Animated, ViewProps, ImageURISource, ImageRequireSource } from 'react-native';
2
+ import { ViewProps, ImageURISource, ImageRequireSource } from 'react-native';
3
3
  import { MapManagerCommand, NativeComponent, ProviderContext, UIManagerCommand } from './decorateMapComponent';
4
4
  import { MapMarkerNativeComponentType } from './MapMarkerNativeComponent';
5
5
  import { CalloutPressEvent, LatLng, MarkerDeselectEvent, MarkerDragEvent, MarkerDragStartEndEvent, MarkerPressEvent, MarkerSelectEvent, Point } from './sharedTypes';
@@ -246,7 +246,7 @@ export type MapMarkerProps = ViewProps & {
246
246
  * Sets whether this marker should track view changes.
247
247
  * It's recommended to turn it off whenever it's possible to improve custom marker performance.
248
248
  *
249
- * @default true
249
+ * @default false
250
250
  * @platform iOS: Google Maps only
251
251
  * @platform Android: Supported
252
252
  */
@@ -273,7 +273,6 @@ export declare class MapMarker extends React.Component<MapMarkerProps> {
273
273
  getNativeComponent: () => NativeComponent<NativeProps>;
274
274
  getMapManagerCommand: (name: string) => MapManagerCommand;
275
275
  getUIManagerCommand: (name: string) => UIManagerCommand;
276
- static Animated: Animated.AnimatedComponent<typeof MapMarker>;
277
276
  private marker;
278
277
  constructor(props: MapMarkerProps);
279
278
  /**
package/lib/MapMarker.js CHANGED
@@ -32,7 +32,6 @@ class MapMarker extends React.Component {
32
32
  getNativeComponent;
33
33
  getMapManagerCommand;
34
34
  getUIManagerCommand;
35
- static Animated;
36
35
  marker;
37
36
  constructor(props) {
38
37
  super(props);
@@ -88,8 +87,8 @@ class MapMarker extends React.Component {
88
87
  icon = react_native_1.Image.resolveAssetSource(this.props.icon) || {};
89
88
  icon = icon.uri;
90
89
  }
91
- const AIRMapMarker = this.getNativeComponent();
92
- return (<AIRMapMarker {...this.props} ref={this.marker} image={image} icon={icon} style={[styles.marker, this.props.style]} onPress={event => {
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 => {
93
92
  if (stopPropagation) {
94
93
  event.stopPropagation();
95
94
  }
@@ -106,7 +105,6 @@ const styles = react_native_1.StyleSheet.create({
106
105
  backgroundColor: 'transparent',
107
106
  },
108
107
  });
109
- MapMarker.Animated = react_native_1.Animated.createAnimatedComponent(MapMarker);
110
108
  exports.default = (0, decorateMapComponent_1.default)(MapMarker, 'Marker', {
111
109
  google: {
112
110
  ios: decorateMapComponent_1.SUPPORTED,
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { Animated, ViewProps, ImageURISource, ImageRequireSource, NativeSyntheticEvent } from 'react-native';
2
+ import { ViewProps, ImageURISource, ImageRequireSource, NativeSyntheticEvent } from 'react-native';
3
3
  import { MapManagerCommand, NativeComponent, ProviderContext, UIManagerCommand } from './decorateMapComponent';
4
4
  import { LatLng, Point } from './sharedTypes';
5
5
  import { Modify } from './sharedTypesInternal';
@@ -59,7 +59,6 @@ export declare class MapOverlay extends React.Component<MapOverlayProps> {
59
59
  getNativeComponent: () => NativeComponent<NativeProps>;
60
60
  getMapManagerCommand: (name: string) => MapManagerCommand;
61
61
  getUIManagerCommand: (name: string) => UIManagerCommand;
62
- static Animated: Animated.AnimatedComponent<typeof MapOverlay>;
63
62
  render(): JSX.Element;
64
63
  }
65
64
  type Coordinate = [number, number];
package/lib/MapOverlay.js CHANGED
@@ -31,7 +31,6 @@ class MapOverlay extends React.Component {
31
31
  getNativeComponent;
32
32
  getMapManagerCommand;
33
33
  getUIManagerCommand;
34
- static Animated;
35
34
  render() {
36
35
  const { opacity = 1.0 } = this.props;
37
36
  let image;
@@ -43,8 +42,8 @@ class MapOverlay extends React.Component {
43
42
  const sourceAsset = react_native_1.Image.resolveAssetSource(this.props.image) || {};
44
43
  image = sourceAsset.uri;
45
44
  }
46
- const AIRMapOverlay = this.getNativeComponent();
47
- return (<AIRMapOverlay {...this.props} opacity={opacity} image={image} style={[styles.overlay, this.props.style]}/>);
45
+ const RNMMapOverlay = this.getNativeComponent();
46
+ return (<RNMMapOverlay {...this.props} opacity={opacity} image={image} style={[styles.overlay, this.props.style]}/>);
48
47
  }
49
48
  }
50
49
  exports.MapOverlay = MapOverlay;
@@ -54,7 +53,6 @@ const styles = react_native_1.StyleSheet.create({
54
53
  backgroundColor: 'transparent',
55
54
  },
56
55
  });
57
- MapOverlay.Animated = react_native_1.Animated.createAnimatedComponent(MapOverlay);
58
56
  exports.default = (0, decorateMapComponent_1.default)(MapOverlay, 'Overlay', {
59
57
  google: {
60
58
  ios: decorateMapComponent_1.SUPPORTED,
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 AIRMapPolygon = this.getNativeComponent();
44
- return (<AIRMapPolygon {...this.props} strokeColor={strokeColor} strokeWidth={strokeWidth} ref={this.polygon}/>);
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;
@@ -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 AIRMapPolyline = this.getNativeComponent();
44
- return (<AIRMapPolyline {...this.props} strokeColor={strokeColor} strokeWidth={strokeWidth} lineJoin={lineJoin} lineCap={lineCap} ref={this.polyline}/>);
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 AIRMapUrlTile = this.getNativeComponent();
35
- return <AIRMapUrlTile {...this.props}/>;
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
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { Animated as RNAnimated, Animated, NativeSyntheticEvent, ViewProps } from 'react-native';
2
+ import { NativeSyntheticEvent, ViewProps } from 'react-native';
3
3
  import { CalloutPressEvent, ClickEvent, Frame, LatLng, MarkerDeselectEvent, MarkerDragEvent, MarkerDragStartEndEvent, MarkerPressEvent, MarkerSelectEvent, Point, Provider, Region } from './sharedTypes';
4
4
  import { Address, BoundingBox, Camera, ChangeEvent, Details, EdgePadding, FitToOptions, IndoorBuildingEvent, IndoorLevelActivatedEvent, KmlMapEvent, LongPressEvent, MapPressEvent, MapStyleElement, MapType, MapTypes, PanDragEvent, PoiClickEvent, SnapshotOptions, UserLocationChangeEvent } from './MapView.types';
5
5
  import { Modify } from './sharedTypesInternal';
@@ -570,7 +570,6 @@ type State = {
570
570
  isReady: boolean;
571
571
  };
572
572
  declare class MapView extends React.Component<MapViewProps, State> {
573
- static Animated: Animated.AnimatedComponent<typeof MapView>;
574
573
  private map;
575
574
  constructor(props: MapViewProps);
576
575
  /**
@@ -582,9 +581,7 @@ declare class MapView extends React.Component<MapViewProps, State> {
582
581
  private _onChange;
583
582
  getCamera(): Promise<Camera>;
584
583
  setCamera(camera: Partial<Camera>): void;
585
- animateCamera(camera: Partial<Camera>, opts?: {
586
- duration?: number;
587
- }): void;
584
+ animateCamera(camera: Partial<Camera>, duration?: number): void;
588
585
  animateToRegion(region: Region, duration?: number): void;
589
586
  fitToElements(options?: FitToOptions): void;
590
587
  fitToSuppliedMarkers(markers: string[], options?: FitToOptions): void;
@@ -663,11 +660,9 @@ declare class MapView extends React.Component<MapViewProps, State> {
663
660
  * @return Object Object bounding box ({ northEast: <LatLng>, southWest: <LatLng> })
664
661
  */
665
662
  boundingBoxForRegion(region: Region): BoundingBox;
666
- private _mapManagerCommand;
667
663
  private _getHandle;
668
- private _runCommand;
664
+ private _gogleMapsOniOS;
669
665
  render(): JSX.Element;
670
666
  }
671
- export declare const AnimatedMapView: RNAnimated.AnimatedComponent<typeof MapView>;
672
- export declare const enableLatestRenderer: () => any;
667
+ export declare const enableLatestRenderer: () => Promise<string> | undefined;
673
668
  export default MapView;
package/lib/MapView.js CHANGED
@@ -22,13 +22,18 @@ 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
- exports.enableLatestRenderer = exports.AnimatedMapView = exports.MAP_TYPES = void 0;
29
+ exports.enableLatestRenderer = exports.MAP_TYPES = void 0;
27
30
  const React = __importStar(require("react"));
28
31
  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',
@@ -39,7 +44,6 @@ exports.MAP_TYPES = {
39
44
  };
40
45
  const GOOGLE_MAPS_ONLY_TYPES = [exports.MAP_TYPES.TERRAIN, exports.MAP_TYPES.NONE];
41
46
  class MapView extends React.Component {
42
- static Animated;
43
47
  map;
44
48
  constructor(props) {
45
49
  super(props);
@@ -80,22 +84,19 @@ class MapView extends React.Component {
80
84
  }
81
85
  }
82
86
  getCamera() {
83
- if (react_native_1.Platform.OS === 'android') {
84
- return react_native_1.NativeModules.AirMapModule.getCamera(this._getHandle());
85
- }
86
- else if (react_native_1.Platform.OS === 'ios') {
87
- return this._runCommand('getCamera', []);
87
+ if (this._gogleMapsOniOS()) {
88
+ return googleMapViewModuleMethod('getCamera')(this._getHandle());
88
89
  }
89
- return Promise.reject('getCamera not supported on this platform');
90
+ return mapViewModuleMethod('getCamera')(this._getHandle());
90
91
  }
91
92
  setCamera(camera) {
92
93
  if (this.map.current) {
93
94
  MapViewNativeComponent_1.Commands.setCamera(this.map.current, camera);
94
95
  }
95
96
  }
96
- animateCamera(camera, opts) {
97
+ animateCamera(camera, duration = 500) {
97
98
  if (this.map.current) {
98
- MapViewNativeComponent_1.Commands.animateCamera(this.map.current, camera, opts?.duration ? opts.duration : 500);
99
+ MapViewNativeComponent_1.Commands.animateCamera(this.map.current, camera, duration);
99
100
  }
100
101
  }
101
102
  animateToRegion(region, duration = 500) {
@@ -127,13 +128,10 @@ class MapView extends React.Component {
127
128
  * @return Promise Promise with the bounding box ({ northEast: <LatLng>, southWest: <LatLng> })
128
129
  */
129
130
  async getMapBoundaries() {
130
- if (react_native_1.Platform.OS === 'android') {
131
- return await react_native_1.NativeModules.AirMapModule.getMapBoundaries(this._getHandle());
132
- }
133
- else if (react_native_1.Platform.OS === 'ios') {
134
- return await this._runCommand('getMapBoundaries', []);
131
+ if (this._gogleMapsOniOS()) {
132
+ return googleMapViewModuleMethod('getMapBoundaries')(this._getHandle());
135
133
  }
136
- return Promise.reject('getMapBoundaries not supported on this platform');
134
+ return mapViewModuleMethod('getMapBoundaries')(this._getHandle());
137
135
  }
138
136
  setMapBoundaries(northEast, southWest) {
139
137
  if (this.map.current) {
@@ -164,7 +162,7 @@ class MapView extends React.Component {
164
162
  const config = {
165
163
  width: args.width || 0,
166
164
  height: args.height || 0,
167
- region: args.region || {},
165
+ region: args.region,
168
166
  format: args.format || 'png',
169
167
  quality: args.quality || 1.0,
170
168
  result: args.result || 'file',
@@ -175,31 +173,10 @@ class MapView extends React.Component {
175
173
  if (config.result !== 'file' && config.result !== 'base64') {
176
174
  throw new Error('Invalid result specified');
177
175
  }
178
- // Call native function
179
- if (react_native_1.Platform.OS === 'android') {
180
- return react_native_1.NativeModules.AirMapModule.takeSnapshot(this._getHandle(), config);
176
+ if (this._gogleMapsOniOS()) {
177
+ return googleMapViewModuleMethod('takeSnapshot')(this._getHandle(), config);
181
178
  }
182
- else if (react_native_1.Platform.OS === 'ios') {
183
- return new Promise((resolve, reject) => {
184
- this._runCommand('takeSnapshot', [
185
- config.width,
186
- config.height,
187
- config.region,
188
- config.format,
189
- config.quality,
190
- config.result,
191
- (err, snapshot) => {
192
- if (err) {
193
- reject(err);
194
- }
195
- else {
196
- resolve(snapshot);
197
- }
198
- },
199
- ]);
200
- });
201
- }
202
- return Promise.reject('takeSnapshot not supported on this platform');
179
+ return mapViewModuleMethod('takeSnapshot')(this._getHandle(), config);
203
180
  }
204
181
  /**
205
182
  * Convert a coordinate to address by using default Geocoder
@@ -211,13 +188,10 @@ class MapView extends React.Component {
211
188
  * @return Promise with return type Address
212
189
  */
213
190
  addressForCoordinate(coordinate) {
214
- if (react_native_1.Platform.OS === 'android') {
215
- return react_native_1.NativeModules.AirMapModule.getAddressFromCoordinates(this._getHandle(), coordinate);
216
- }
217
- else if (react_native_1.Platform.OS === 'ios') {
218
- return this._runCommand('getAddressFromCoordinates', [coordinate]);
191
+ if (this._gogleMapsOniOS()) {
192
+ throw new Error('addressForCoordinate not supported on Google Maps iOS');
219
193
  }
220
- return Promise.reject('getAddress not supported on this platform');
194
+ return mapViewModuleMethod('getAddressFromCoordinates')(this._getHandle(), coordinate);
221
195
  }
222
196
  /**
223
197
  * Convert a map coordinate to user-space point
@@ -229,13 +203,10 @@ class MapView extends React.Component {
229
203
  * @return Promise Promise with the point ({ x: Number, y: Number })
230
204
  */
231
205
  pointForCoordinate(coordinate) {
232
- if (react_native_1.Platform.OS === 'android') {
233
- return react_native_1.NativeModules.AirMapModule.pointForCoordinate(this._getHandle(), coordinate);
206
+ if (this._gogleMapsOniOS()) {
207
+ return googleMapViewModuleMethod('pointForCoordinate')(this._getHandle(), coordinate);
234
208
  }
235
- else if (react_native_1.Platform.OS === 'ios') {
236
- return this._runCommand('pointForCoordinate', [coordinate]);
237
- }
238
- return Promise.reject('pointForCoordinate not supported on this platform');
209
+ return mapViewModuleMethod('pointForCoordinate')(this._getHandle(), coordinate);
239
210
  }
240
211
  /**
241
212
  * Convert a user-space point to a map coordinate
@@ -247,13 +218,10 @@ class MapView extends React.Component {
247
218
  * @return Promise Promise with the coordinate ({ latitude: Number, longitude: Number })
248
219
  */
249
220
  coordinateForPoint(point) {
250
- if (react_native_1.Platform.OS === 'android') {
251
- return react_native_1.NativeModules.AirMapModule.coordinateForPoint(this._getHandle(), point);
252
- }
253
- else if (react_native_1.Platform.OS === 'ios') {
254
- return this._runCommand('coordinateForPoint', [point]);
221
+ if (this._gogleMapsOniOS()) {
222
+ return googleMapViewModuleMethod('coordinateForPoint')(this._getHandle(), point);
255
223
  }
256
- return Promise.reject('coordinateForPoint not supported on this platform');
224
+ return mapViewModuleMethod('coordinateForPoint')(this._getHandle(), point);
257
225
  }
258
226
  /**
259
227
  * Get markers' centers and frames in user-space coordinates
@@ -263,10 +231,13 @@ class MapView extends React.Component {
263
231
  * @return Promise Promise with { <identifier>: { point: Point, frame: Frame } }
264
232
  */
265
233
  getMarkersFrames(onlyVisible = false) {
266
- if (react_native_1.Platform.OS === 'ios') {
267
- return this._runCommand('getMarkersFrames', [onlyVisible]);
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);
268
239
  }
269
- return Promise.reject('getMarkersFrames not supported on this platform');
240
+ return mapViewModuleMethod('getMarkersFrames')(this._getHandle(), onlyVisible);
270
241
  }
271
242
  /**
272
243
  * Get bounding box from region
@@ -287,19 +258,15 @@ class MapView extends React.Component {
287
258
  },
288
259
  };
289
260
  }
290
- _mapManagerCommand(name) {
291
- return react_native_1.NativeModules[`${(0, decorateMapComponent_1.getNativeMapName)(this.props.provider)}Manager`][name];
292
- }
293
261
  _getHandle() {
294
- return (0, react_native_1.findNodeHandle)(this.map.current);
295
- }
296
- _runCommand(name, args) {
297
- if (react_native_1.Platform.OS === 'ios') {
298
- return this._mapManagerCommand(name)(this._getHandle(), ...args);
299
- }
300
- else {
301
- 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');
302
265
  }
266
+ return handle;
267
+ }
268
+ _gogleMapsOniOS() {
269
+ return react_native_1.Platform.OS === 'ios' && this.props.provider === 'google';
303
270
  }
304
271
  render() {
305
272
  let props;
@@ -342,38 +309,55 @@ class MapView extends React.Component {
342
309
  }
343
310
  if (react_native_1.Platform.OS === 'android' && this.props.liteMode) {
344
311
  return (<decorateMapComponent_1.ProviderContext.Provider value={this.props.provider}>
345
- <AIRMapLite {...props}/>
312
+ <RNMMapLite {...props}/>
346
313
  </decorateMapComponent_1.ProviderContext.Provider>);
347
314
  }
348
- const AIRMap = getNativeMapComponent(this.props.provider);
315
+ const RNMMap = getNativeMapComponent(this.props.provider);
349
316
  return (<decorateMapComponent_1.ProviderContext.Provider value={this.props.provider}>
350
- <AIRMap {...props}/>
317
+ <RNMMap {...props}/>
351
318
  </decorateMapComponent_1.ProviderContext.Provider>);
352
319
  }
353
320
  }
354
- const airMaps = {
355
- default: (0, react_native_1.requireNativeComponent)('AIRMap'),
321
+ const rnmMaps = {
322
+ default: (0, react_native_1.requireNativeComponent)('RNMMap'),
356
323
  google: () => null,
357
324
  };
358
325
  if (react_native_1.Platform.OS === 'android') {
359
- airMaps.google = airMaps.default;
326
+ rnmMaps.google = rnmMaps.default;
360
327
  }
361
328
  else {
362
- airMaps.google = decorateMapComponent_1.googleMapIsInstalled
363
- ? (0, react_native_1.requireNativeComponent)('AIRGoogleMap')
364
- : (0, decorateMapComponent_1.createNotSupportedComponent)('react-native-maps: AirGoogleMaps dir must be added to your xCode project to support GoogleMaps on iOS.');
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.');
365
332
  }
366
- const getNativeMapComponent = (provider) => airMaps[provider || 'default'];
367
- const AIRMapLite = react_native_1.UIManager.getViewManagerConfig('AIRMapLite')
368
- ? (0, react_native_1.requireNativeComponent)('AIRMapLite')
333
+ const getNativeMapComponent = (provider) => rnmMaps[provider || 'default'];
334
+ const RNMMapLite = react_native_1.UIManager.getViewManagerConfig('RNMMapLite')
335
+ ? (0, react_native_1.requireNativeComponent)('RNMMapLite')
369
336
  : () => null;
370
- exports.AnimatedMapView = react_native_1.Animated.createAnimatedComponent(MapView);
371
337
  const enableLatestRenderer = () => {
372
- if (react_native_1.Platform.OS !== 'android') {
373
- return;
338
+ if (react_native_1.Platform.OS === 'android') {
339
+ return mapViewModuleMethod('enableLatestRenderer')();
374
340
  }
375
- return react_native_1.NativeModules.AirMapModule.enableLatestRenderer();
376
341
  };
377
342
  exports.enableLatestRenderer = enableLatestRenderer;
378
- MapView.Animated = exports.AnimatedMapView;
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
+ }
379
363
  exports.default = MapView;
@@ -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 AIRMapWMSTile = this.getNativeComponent();
35
- return <AIRMapWMSTile {...this.props}/>;
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,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const react_native_1 = require("react-native");
4
+ exports.default = react_native_1.TurboModuleRegistry.get('RNMGoogleMapViewModule');
@@ -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;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const react_native_1 = require("react-native");
4
+ exports.default = react_native_1.TurboModuleRegistry.get('RNMMapViewModule');
@@ -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): "AIRMap" | "AIRGoogleMap";
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 'AIRMap';
13
+ return 'RNMMap';
14
14
  }
15
15
  if (provider === ProviderConstants_1.PROVIDER_GOOGLE) {
16
- return 'AIRGoogleMap';
16
+ return 'RNMGoogleMap';
17
17
  }
18
- return 'AIRMap';
18
+ return 'RNMMap';
19
19
  }
20
20
  exports.getNativeMapName = getNativeMapName;
21
21
  function getNativeComponentName(provider, component) {