react-native-maps 1.25.0-alpha.8 → 1.25.0

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 (86) hide show
  1. package/README.md +2 -53
  2. package/android/src/main/RCTThirdPartyComponentsProvider.mm +0 -2
  3. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerDelegate.java +1 -1
  4. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerDelegate.java +3 -0
  5. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerInterface.java +1 -0
  6. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerDelegate.java +6 -0
  7. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java +2 -0
  8. package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerDelegate.java +1 -1
  9. package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +1 -1
  10. package/android/src/main/java/com/rnmaps/fabric/MarkerManager.java +41 -5
  11. package/android/src/main/java/com/rnmaps/fabric/PolygonManager.java +9 -2
  12. package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeEvent.java +1 -2
  13. package/android/src/main/java/com/rnmaps/maps/MapMarker.java +46 -3
  14. package/android/src/main/java/com/rnmaps/maps/MapPolyline.java +8 -1
  15. package/android/src/main/java/com/rnmaps/maps/MapView.java +104 -51
  16. package/android/src/main/java/com/rnmaps/maps/MapsPackage.java +84 -27
  17. package/android/src/main/java/com/rnmaps/maps/RegionChangeEvent.java +1 -4
  18. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +6 -6
  19. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +6 -6
  20. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.cpp +5 -2
  21. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.h +27 -2
  22. package/ios/AirGoogleMaps/AIRGoogleMap.mm +13 -12
  23. package/ios/AirGoogleMaps/AIRGoogleMapPolyline.m +4 -0
  24. package/ios/AirGoogleMaps/RNMapsGoogleMapView.h +3 -3
  25. package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +6 -6
  26. package/ios/AirGoogleMaps/RNMapsGooglePolygonView.mm +4 -4
  27. package/ios/AirMaps/AIRMap.h +2 -1
  28. package/ios/AirMaps/AIRMapManager.m +34 -18
  29. package/ios/AirMaps/AIRMapMarker.m +7 -1
  30. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.mm +2 -2
  31. package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.mm +1 -1
  32. package/ios/AirMaps/RNMapsAirModule.mm +3 -3
  33. package/ios/AirMaps/RNMapsMapView.h +4 -4
  34. package/ios/AirMaps/RNMapsMapView.mm +55 -10
  35. package/ios/AirMaps/RNMapsMapViewManager.mm +1 -1
  36. package/ios/AirMaps/RNMapsMarkerView.mm +4 -3
  37. package/ios/generated/RNMapsAirModuleDelegate.h +1 -1
  38. package/ios/generated/{RNMapsHostVewDelegate.h → RNMapsHostViewDelegate.h} +1 -1
  39. package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +2 -0
  40. package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +2 -0
  41. package/ios/generated/RNMapsSpecs/EventEmitters.cpp +8 -6
  42. package/ios/generated/RNMapsSpecs/EventEmitters.h +20 -6
  43. package/ios/generated/RNMapsSpecs/Props.cpp +37 -2
  44. package/ios/generated/RNMapsSpecs/Props.h +110 -13
  45. package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +2 -0
  46. package/ios/generated/RNMapsSpecs/ShadowNodes.h +22 -0
  47. package/ios/generated/RNMapsSpecs/States.h +24 -0
  48. package/ios/generated/module.modulemap +1 -1
  49. package/package.json +9 -3
  50. package/plugin/build/ios.js +3 -3
  51. package/src/AnimatedRegion.ts +3 -1
  52. package/src/Geojson.tsx +5 -5
  53. package/src/MapCallout.tsx +5 -5
  54. package/src/MapCalloutSubview.tsx +9 -5
  55. package/src/MapCircle.tsx +5 -5
  56. package/src/MapHeatmap.tsx +11 -6
  57. package/src/MapLocalTile.tsx +4 -4
  58. package/src/MapMarker.tsx +38 -17
  59. package/src/MapMarkerNativeComponent.ts +3 -2
  60. package/src/MapOverlay.tsx +10 -10
  61. package/src/MapPolygon.tsx +6 -6
  62. package/src/MapPolygon.types.ts +2 -2
  63. package/src/MapPolyline.tsx +5 -5
  64. package/src/MapUrlTile.tsx +4 -4
  65. package/src/MapView.tsx +34 -37
  66. package/src/MapView.types.ts +2 -3
  67. package/src/MapViewNativeComponent.ts +3 -3
  68. package/src/MapWMSTile.tsx +4 -4
  69. package/src/createFabricMap.tsx +39 -37
  70. package/src/decorateMapComponent.ts +9 -3
  71. package/src/fixImageProp.ts +1 -1
  72. package/src/index.ts +1 -1
  73. package/src/sharedTypes.ts +1 -1
  74. package/src/specs/NativeAirMapsModule.ts +1 -1
  75. package/src/specs/NativeComponentCallout.ts +1 -1
  76. package/src/specs/NativeComponentCircle.ts +3 -2
  77. package/src/specs/NativeComponentGoogleMapView.ts +12 -10
  78. package/src/specs/NativeComponentGooglePolygon.ts +12 -1
  79. package/src/specs/NativeComponentMapView.ts +12 -10
  80. package/src/specs/NativeComponentMarker.ts +26 -2
  81. package/src/specs/NativeComponentOverlay.ts +1 -1
  82. package/src/specs/NativeComponentPolyline.ts +2 -2
  83. package/src/specs/NativeComponentUrlTile.ts +4 -1
  84. package/src/specs/NativeComponentWMSTile.ts +4 -1
  85. package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +0 -98
  86. package/ios/AirMaps.xcodeproj/project.pbxproj +0 -627
@@ -318,7 +318,7 @@ void RNMapsGoogleMapViewEventEmitter::onRegionChangeStart(OnRegionChangeStart $e
318
318
  region.setProperty(runtime, "longitudeDelta", $event.region.longitudeDelta);
319
319
  $payload.setProperty(runtime, "region", region);
320
320
  }
321
- $payload.setProperty(runtime, "continuous", $event.continuous);
321
+ $payload.setProperty(runtime, "isGesture", $event.isGesture);
322
322
  return $payload;
323
323
  });
324
324
  }
@@ -335,7 +335,7 @@ void RNMapsGoogleMapViewEventEmitter::onRegionChange(OnRegionChange $event) cons
335
335
  region.setProperty(runtime, "longitudeDelta", $event.region.longitudeDelta);
336
336
  $payload.setProperty(runtime, "region", region);
337
337
  }
338
- $payload.setProperty(runtime, "continuous", $event.continuous);
338
+ $payload.setProperty(runtime, "isGesture", $event.isGesture);
339
339
  return $payload;
340
340
  });
341
341
  }
@@ -352,7 +352,7 @@ void RNMapsGoogleMapViewEventEmitter::onRegionChangeComplete(OnRegionChangeCompl
352
352
  region.setProperty(runtime, "longitudeDelta", $event.region.longitudeDelta);
353
353
  $payload.setProperty(runtime, "region", region);
354
354
  }
355
- $payload.setProperty(runtime, "continuous", $event.continuous);
355
+ $payload.setProperty(runtime, "isGesture", $event.isGesture);
356
356
  return $payload;
357
357
  });
358
358
  }
@@ -730,7 +730,7 @@ void RNMapsMapViewEventEmitter::onRegionChangeStart(OnRegionChangeStart $event)
730
730
  region.setProperty(runtime, "longitudeDelta", $event.region.longitudeDelta);
731
731
  $payload.setProperty(runtime, "region", region);
732
732
  }
733
- $payload.setProperty(runtime, "continuous", $event.continuous);
733
+ $payload.setProperty(runtime, "isGesture", $event.isGesture);
734
734
  return $payload;
735
735
  });
736
736
  }
@@ -747,7 +747,7 @@ void RNMapsMapViewEventEmitter::onRegionChange(OnRegionChange $event) const {
747
747
  region.setProperty(runtime, "longitudeDelta", $event.region.longitudeDelta);
748
748
  $payload.setProperty(runtime, "region", region);
749
749
  }
750
- $payload.setProperty(runtime, "continuous", $event.continuous);
750
+ $payload.setProperty(runtime, "isGesture", $event.isGesture);
751
751
  return $payload;
752
752
  });
753
753
  }
@@ -764,7 +764,7 @@ void RNMapsMapViewEventEmitter::onRegionChangeComplete(OnRegionChangeComplete $e
764
764
  region.setProperty(runtime, "longitudeDelta", $event.region.longitudeDelta);
765
765
  $payload.setProperty(runtime, "region", region);
766
766
  }
767
- $payload.setProperty(runtime, "continuous", $event.continuous);
767
+ $payload.setProperty(runtime, "isGesture", $event.isGesture);
768
768
  return $payload;
769
769
  });
770
770
  }
@@ -974,4 +974,6 @@ $payload.setProperty(runtime, "id", $event.id);
974
974
  });
975
975
  }
976
976
 
977
+
978
+
977
979
  } // namespace facebook::react
@@ -245,7 +245,7 @@ class RNMapsGoogleMapViewEventEmitter : public ViewEventEmitter {
245
245
 
246
246
  struct OnRegionChangeStart {
247
247
  OnRegionChangeStartRegion region;
248
- bool continuous;
248
+ bool isGesture;
249
249
  };
250
250
 
251
251
  struct OnRegionChangeRegion {
@@ -257,7 +257,7 @@ class RNMapsGoogleMapViewEventEmitter : public ViewEventEmitter {
257
257
 
258
258
  struct OnRegionChange {
259
259
  OnRegionChangeRegion region;
260
- bool continuous;
260
+ bool isGesture;
261
261
  };
262
262
 
263
263
  struct OnRegionChangeCompleteRegion {
@@ -269,7 +269,7 @@ class RNMapsGoogleMapViewEventEmitter : public ViewEventEmitter {
269
269
 
270
270
  struct OnRegionChangeComplete {
271
271
  OnRegionChangeCompleteRegion region;
272
- bool continuous;
272
+ bool isGesture;
273
273
  };
274
274
 
275
275
  struct OnUserLocationChangeCoordinate {
@@ -593,7 +593,7 @@ class RNMapsMapViewEventEmitter : public ViewEventEmitter {
593
593
 
594
594
  struct OnRegionChangeStart {
595
595
  OnRegionChangeStartRegion region;
596
- bool continuous;
596
+ bool isGesture;
597
597
  };
598
598
 
599
599
  struct OnRegionChangeRegion {
@@ -605,7 +605,7 @@ class RNMapsMapViewEventEmitter : public ViewEventEmitter {
605
605
 
606
606
  struct OnRegionChange {
607
607
  OnRegionChangeRegion region;
608
- bool continuous;
608
+ bool isGesture;
609
609
  };
610
610
 
611
611
  struct OnRegionChangeCompleteRegion {
@@ -617,7 +617,7 @@ class RNMapsMapViewEventEmitter : public ViewEventEmitter {
617
617
 
618
618
  struct OnRegionChangeComplete {
619
619
  OnRegionChangeCompleteRegion region;
620
- bool continuous;
620
+ bool isGesture;
621
621
  };
622
622
 
623
623
  struct OnUserLocationChangeCoordinate {
@@ -842,5 +842,19 @@ class RNMapsPolylineEventEmitter : public ViewEventEmitter {
842
842
  OnPressPosition position;
843
843
  };
844
844
  void onPress(OnPress value) const;
845
+ };
846
+ class RNMapsUrlTileEventEmitter : public ViewEventEmitter {
847
+ public:
848
+ using ViewEventEmitter::ViewEventEmitter;
849
+
850
+
851
+
852
+ };
853
+ class RNMapsWMSTileEventEmitter : public ViewEventEmitter {
854
+ public:
855
+ using ViewEventEmitter::ViewEventEmitter;
856
+
857
+
858
+
845
859
  };
846
860
  } // namespace facebook::react
@@ -32,7 +32,7 @@ RNMapsCircleProps::RNMapsCircleProps(
32
32
  fillColor(convertRawProp(context, rawProps, "fillColor", sourceProps.fillColor, {})),
33
33
  radius(convertRawProp(context, rawProps, "radius", sourceProps.radius, {0.0})),
34
34
  strokeColor(convertRawProp(context, rawProps, "strokeColor", sourceProps.strokeColor, {})),
35
- strokeWidth(convertRawProp(context, rawProps, "strokeWidth", sourceProps.strokeWidth, {0.0})),
35
+ strokeWidth(convertRawProp(context, rawProps, "strokeWidth", sourceProps.strokeWidth, {1.0})),
36
36
  tappable(convertRawProp(context, rawProps, "tappable", sourceProps.tappable, {false}))
37
37
  {}
38
38
  RNMapsGoogleMapViewProps::RNMapsGoogleMapViewProps(
@@ -83,6 +83,7 @@ RNMapsGooglePolygonProps::RNMapsGooglePolygonProps(
83
83
  coordinates(convertRawProp(context, rawProps, "coordinates", sourceProps.coordinates, {})),
84
84
  fillColor(convertRawProp(context, rawProps, "fillColor", sourceProps.fillColor, {})),
85
85
  strokeColor(convertRawProp(context, rawProps, "strokeColor", sourceProps.strokeColor, {})),
86
+ strokeWidth(convertRawProp(context, rawProps, "strokeWidth", sourceProps.strokeWidth, {1.0})),
86
87
  geodesic(convertRawProp(context, rawProps, "geodesic", sourceProps.geodesic, {false})),
87
88
  holes(convertRawProp(context, rawProps, "holes", sourceProps.holes, {})),
88
89
  tappable(convertRawProp(context, rawProps, "tappable", sourceProps.tappable, {false}))
@@ -131,6 +132,7 @@ RNMapsMapViewProps::RNMapsMapViewProps(
131
132
  tintColor(convertRawProp(context, rawProps, "tintColor", sourceProps.tintColor, {})),
132
133
  toolbarEnabled(convertRawProp(context, rawProps, "toolbarEnabled", sourceProps.toolbarEnabled, {true})),
133
134
  userInterfaceStyle(convertRawProp(context, rawProps, "userInterfaceStyle", sourceProps.userInterfaceStyle, {RNMapsMapViewUserInterfaceStyle::System})),
135
+ customMapStyleString(convertRawProp(context, rawProps, "customMapStyleString", sourceProps.customMapStyleString, {})),
134
136
  userLocationAnnotationTitle(convertRawProp(context, rawProps, "userLocationAnnotationTitle", sourceProps.userLocationAnnotationTitle, {})),
135
137
  userLocationCalloutEnabled(convertRawProp(context, rawProps, "userLocationCalloutEnabled", sourceProps.userLocationCalloutEnabled, {false})),
136
138
  userLocationFastestInterval(convertRawProp(context, rawProps, "userLocationFastestInterval", sourceProps.userLocationFastestInterval, {5000})),
@@ -152,6 +154,7 @@ RNMapsMarkerProps::RNMapsMarkerProps(
152
154
  image(convertRawProp(context, rawProps, "image", sourceProps.image, {})),
153
155
  calloutOffset(convertRawProp(context, rawProps, "calloutOffset", sourceProps.calloutOffset, {})),
154
156
  displayPriority(convertRawProp(context, rawProps, "displayPriority", sourceProps.displayPriority, {RNMapsMarkerDisplayPriority::Required})),
157
+ centerOffset(convertRawProp(context, rawProps, "centerOffset", sourceProps.centerOffset, {})),
155
158
  coordinate(convertRawProp(context, rawProps, "coordinate", sourceProps.coordinate, {})),
156
159
  description(convertRawProp(context, rawProps, "description", sourceProps.description, {})),
157
160
  draggable(convertRawProp(context, rawProps, "draggable", sourceProps.draggable, {false})),
@@ -187,8 +190,40 @@ RNMapsPolylineProps::RNMapsPolylineProps(
187
190
  lineJoin(convertRawProp(context, rawProps, "lineJoin", sourceProps.lineJoin, {RNMapsPolylineLineJoin::Miter})),
188
191
  strokeColor(convertRawProp(context, rawProps, "strokeColor", sourceProps.strokeColor, {})),
189
192
  strokeColors(convertRawProp(context, rawProps, "strokeColors", sourceProps.strokeColors, {})),
190
- strokeWidth(convertRawProp(context, rawProps, "strokeWidth", sourceProps.strokeWidth, {0.0})),
193
+ strokeWidth(convertRawProp(context, rawProps, "strokeWidth", sourceProps.strokeWidth, {1.0})),
191
194
  tappable(convertRawProp(context, rawProps, "tappable", sourceProps.tappable, {false}))
192
195
  {}
196
+ RNMapsUrlTileProps::RNMapsUrlTileProps(
197
+ const PropsParserContext &context,
198
+ const RNMapsUrlTileProps &sourceProps,
199
+ const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
200
+
201
+ doubleTileSize(convertRawProp(context, rawProps, "doubleTileSize", sourceProps.doubleTileSize, {false})),
202
+ flipY(convertRawProp(context, rawProps, "flipY", sourceProps.flipY, {false})),
203
+ maximumNativeZ(convertRawProp(context, rawProps, "maximumNativeZ", sourceProps.maximumNativeZ, {100})),
204
+ maximumZ(convertRawProp(context, rawProps, "maximumZ", sourceProps.maximumZ, {100})),
205
+ minimumZ(convertRawProp(context, rawProps, "minimumZ", sourceProps.minimumZ, {0})),
206
+ offlineMode(convertRawProp(context, rawProps, "offlineMode", sourceProps.offlineMode, {false})),
207
+ shouldReplaceMapContent(convertRawProp(context, rawProps, "shouldReplaceMapContent", sourceProps.shouldReplaceMapContent, {false})),
208
+ tileCacheMaxAge(convertRawProp(context, rawProps, "tileCacheMaxAge", sourceProps.tileCacheMaxAge, {0})),
209
+ tileCachePath(convertRawProp(context, rawProps, "tileCachePath", sourceProps.tileCachePath, {})),
210
+ tileSize(convertRawProp(context, rawProps, "tileSize", sourceProps.tileSize, {256})),
211
+ urlTemplate(convertRawProp(context, rawProps, "urlTemplate", sourceProps.urlTemplate, {}))
212
+ {}
213
+ RNMapsWMSTileProps::RNMapsWMSTileProps(
214
+ const PropsParserContext &context,
215
+ const RNMapsWMSTileProps &sourceProps,
216
+ const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
217
+
218
+ maximumNativeZ(convertRawProp(context, rawProps, "maximumNativeZ", sourceProps.maximumNativeZ, {100})),
219
+ maximumZ(convertRawProp(context, rawProps, "maximumZ", sourceProps.maximumZ, {100})),
220
+ minimumZ(convertRawProp(context, rawProps, "minimumZ", sourceProps.minimumZ, {0})),
221
+ offlineMode(convertRawProp(context, rawProps, "offlineMode", sourceProps.offlineMode, {false})),
222
+ shouldReplaceMapContent(convertRawProp(context, rawProps, "shouldReplaceMapContent", sourceProps.shouldReplaceMapContent, {false})),
223
+ tileCacheMaxAge(convertRawProp(context, rawProps, "tileCacheMaxAge", sourceProps.tileCacheMaxAge, {0})),
224
+ tileCachePath(convertRawProp(context, rawProps, "tileCachePath", sourceProps.tileCachePath, {})),
225
+ tileSize(convertRawProp(context, rawProps, "tileSize", sourceProps.tileSize, {256})),
226
+ urlTemplate(convertRawProp(context, rawProps, "urlTemplate", sourceProps.urlTemplate, {}))
227
+ {}
193
228
 
194
229
  } // namespace facebook::react
@@ -61,7 +61,7 @@ class RNMapsCircleProps final : public ViewProps {
61
61
  SharedColor fillColor{};
62
62
  double radius{0.0};
63
63
  SharedColor strokeColor{};
64
- Float strokeWidth{0.0};
64
+ Float strokeWidth{1.0};
65
65
  bool tappable{false};
66
66
  };
67
67
 
@@ -478,6 +478,7 @@ class RNMapsGooglePolygonProps final : public ViewProps {
478
478
  std::vector<RNMapsGooglePolygonCoordinatesStruct> coordinates{};
479
479
  SharedColor fillColor{};
480
480
  SharedColor strokeColor{};
481
+ Float strokeWidth{1.0};
481
482
  bool geodesic{false};
482
483
  std::vector<std::vector<RNMapsGooglePolygonHolesStruct>> holes{};
483
484
  bool tappable{false};
@@ -918,6 +919,7 @@ class RNMapsMapViewProps final : public ViewProps {
918
919
  SharedColor tintColor{};
919
920
  bool toolbarEnabled{true};
920
921
  RNMapsMapViewUserInterfaceStyle userInterfaceStyle{RNMapsMapViewUserInterfaceStyle::System};
922
+ std::string customMapStyleString{};
921
923
  std::string userLocationAnnotationTitle{};
922
924
  bool userLocationCalloutEnabled{false};
923
925
  int userLocationFastestInterval{5000};
@@ -1047,6 +1049,28 @@ static inline std::string toString(const RNMapsMarkerCalloutOffsetStruct &value)
1047
1049
  return "[Object RNMapsMarkerCalloutOffsetStruct]";
1048
1050
  }
1049
1051
 
1052
+ struct RNMapsMarkerCenterOffsetStruct {
1053
+ double x{0.0};
1054
+ double y{0.0};
1055
+ };
1056
+
1057
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMarkerCenterOffsetStruct &result) {
1058
+ auto map = (std::unordered_map<std::string, RawValue>)value;
1059
+
1060
+ auto tmp_x = map.find("x");
1061
+ if (tmp_x != map.end()) {
1062
+ fromRawValue(context, tmp_x->second, result.x);
1063
+ }
1064
+ auto tmp_y = map.find("y");
1065
+ if (tmp_y != map.end()) {
1066
+ fromRawValue(context, tmp_y->second, result.y);
1067
+ }
1068
+ }
1069
+
1070
+ static inline std::string toString(const RNMapsMarkerCenterOffsetStruct &value) {
1071
+ return "[Object RNMapsMarkerCenterOffsetStruct]";
1072
+ }
1073
+
1050
1074
  struct RNMapsMarkerCoordinateStruct {
1051
1075
  double latitude{0.0};
1052
1076
  double longitude{0.0};
@@ -1080,6 +1104,7 @@ class RNMapsMarkerProps final : public ViewProps {
1080
1104
  ImageSource image{};
1081
1105
  RNMapsMarkerCalloutOffsetStruct calloutOffset{};
1082
1106
  RNMapsMarkerDisplayPriority displayPriority{RNMapsMarkerDisplayPriority::Required};
1107
+ RNMapsMarkerCenterOffsetStruct centerOffset{};
1083
1108
  RNMapsMarkerCoordinateStruct coordinate{};
1084
1109
  std::string description{};
1085
1110
  bool draggable{false};
@@ -1093,12 +1118,12 @@ class RNMapsMarkerProps final : public ViewProps {
1093
1118
  bool useLegacyPinView{false};
1094
1119
  };
1095
1120
 
1096
- struct RNMapsOverlayBoundsStruct {
1121
+ struct RNMapsOverlayBoundsNorthEastStruct {
1097
1122
  double latitude{0.0};
1098
1123
  double longitude{0.0};
1099
1124
  };
1100
1125
 
1101
- static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsOverlayBoundsStruct &result) {
1126
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsOverlayBoundsNorthEastStruct &result) {
1102
1127
  auto map = (std::unordered_map<std::string, RawValue>)value;
1103
1128
 
1104
1129
  auto tmp_latitude = map.find("latitude");
@@ -1111,19 +1136,53 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
1111
1136
  }
1112
1137
  }
1113
1138
 
1114
- static inline std::string toString(const RNMapsOverlayBoundsStruct &value) {
1115
- return "[Object RNMapsOverlayBoundsStruct]";
1139
+ static inline std::string toString(const RNMapsOverlayBoundsNorthEastStruct &value) {
1140
+ return "[Object RNMapsOverlayBoundsNorthEastStruct]";
1116
1141
  }
1117
1142
 
1118
- static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<RNMapsOverlayBoundsStruct> &result) {
1119
- auto items = (std::vector<RawValue>)value;
1120
- for (const auto &item : items) {
1121
- RNMapsOverlayBoundsStruct newItem;
1122
- fromRawValue(context, item, newItem);
1123
- result.emplace_back(newItem);
1143
+ struct RNMapsOverlayBoundsSouthWestStruct {
1144
+ double latitude{0.0};
1145
+ double longitude{0.0};
1146
+ };
1147
+
1148
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsOverlayBoundsSouthWestStruct &result) {
1149
+ auto map = (std::unordered_map<std::string, RawValue>)value;
1150
+
1151
+ auto tmp_latitude = map.find("latitude");
1152
+ if (tmp_latitude != map.end()) {
1153
+ fromRawValue(context, tmp_latitude->second, result.latitude);
1124
1154
  }
1155
+ auto tmp_longitude = map.find("longitude");
1156
+ if (tmp_longitude != map.end()) {
1157
+ fromRawValue(context, tmp_longitude->second, result.longitude);
1158
+ }
1159
+ }
1160
+
1161
+ static inline std::string toString(const RNMapsOverlayBoundsSouthWestStruct &value) {
1162
+ return "[Object RNMapsOverlayBoundsSouthWestStruct]";
1125
1163
  }
1126
1164
 
1165
+ struct RNMapsOverlayBoundsStruct {
1166
+ RNMapsOverlayBoundsNorthEastStruct northEast{};
1167
+ RNMapsOverlayBoundsSouthWestStruct southWest{};
1168
+ };
1169
+
1170
+ static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsOverlayBoundsStruct &result) {
1171
+ auto map = (std::unordered_map<std::string, RawValue>)value;
1172
+
1173
+ auto tmp_northEast = map.find("northEast");
1174
+ if (tmp_northEast != map.end()) {
1175
+ fromRawValue(context, tmp_northEast->second, result.northEast);
1176
+ }
1177
+ auto tmp_southWest = map.find("southWest");
1178
+ if (tmp_southWest != map.end()) {
1179
+ fromRawValue(context, tmp_southWest->second, result.southWest);
1180
+ }
1181
+ }
1182
+
1183
+ static inline std::string toString(const RNMapsOverlayBoundsStruct &value) {
1184
+ return "[Object RNMapsOverlayBoundsStruct]";
1185
+ }
1127
1186
  class RNMapsOverlayProps final : public ViewProps {
1128
1187
  public:
1129
1188
  RNMapsOverlayProps() = default;
@@ -1132,7 +1191,7 @@ class RNMapsOverlayProps final : public ViewProps {
1132
1191
  #pragma mark - Props
1133
1192
 
1134
1193
  Float bearing{0.0};
1135
- std::vector<RNMapsOverlayBoundsStruct> bounds{};
1194
+ RNMapsOverlayBoundsStruct bounds{};
1136
1195
  ImageSource image{};
1137
1196
  Float opacity{1.0};
1138
1197
  bool tappable{false};
@@ -1217,8 +1276,46 @@ class RNMapsPolylineProps final : public ViewProps {
1217
1276
  RNMapsPolylineLineJoin lineJoin{RNMapsPolylineLineJoin::Miter};
1218
1277
  SharedColor strokeColor{};
1219
1278
  std::vector<SharedColor> strokeColors{};
1220
- Float strokeWidth{0.0};
1279
+ Float strokeWidth{1.0};
1221
1280
  bool tappable{false};
1222
1281
  };
1223
1282
 
1283
+ class RNMapsUrlTileProps final : public ViewProps {
1284
+ public:
1285
+ RNMapsUrlTileProps() = default;
1286
+ RNMapsUrlTileProps(const PropsParserContext& context, const RNMapsUrlTileProps &sourceProps, const RawProps &rawProps);
1287
+
1288
+ #pragma mark - Props
1289
+
1290
+ bool doubleTileSize{false};
1291
+ bool flipY{false};
1292
+ int maximumNativeZ{100};
1293
+ int maximumZ{100};
1294
+ int minimumZ{0};
1295
+ bool offlineMode{false};
1296
+ bool shouldReplaceMapContent{false};
1297
+ int tileCacheMaxAge{0};
1298
+ std::string tileCachePath{};
1299
+ int tileSize{256};
1300
+ std::string urlTemplate{};
1301
+ };
1302
+
1303
+ class RNMapsWMSTileProps final : public ViewProps {
1304
+ public:
1305
+ RNMapsWMSTileProps() = default;
1306
+ RNMapsWMSTileProps(const PropsParserContext& context, const RNMapsWMSTileProps &sourceProps, const RawProps &rawProps);
1307
+
1308
+ #pragma mark - Props
1309
+
1310
+ int maximumNativeZ{100};
1311
+ int maximumZ{100};
1312
+ int minimumZ{0};
1313
+ bool offlineMode{false};
1314
+ bool shouldReplaceMapContent{false};
1315
+ int tileCacheMaxAge{0};
1316
+ std::string tileCachePath{};
1317
+ int tileSize{256};
1318
+ std::string urlTemplate{};
1319
+ };
1320
+
1224
1321
  } // namespace facebook::react
@@ -20,5 +20,7 @@ extern const char RNMapsMapViewComponentName[] = "RNMapsMapView";
20
20
  extern const char RNMapsMarkerComponentName[] = "RNMapsMarker";
21
21
  extern const char RNMapsOverlayComponentName[] = "RNMapsOverlay";
22
22
  extern const char RNMapsPolylineComponentName[] = "RNMapsPolyline";
23
+ extern const char RNMapsUrlTileComponentName[] = "RNMapsUrlTile";
24
+ extern const char RNMapsWMSTileComponentName[] = "RNMapsWMSTile";
23
25
 
24
26
  } // namespace facebook::react
@@ -106,4 +106,26 @@ using RNMapsPolylineShadowNode = ConcreteViewShadowNode<
106
106
  RNMapsPolylineEventEmitter,
107
107
  RNMapsPolylineState>;
108
108
 
109
+ JSI_EXPORT extern const char RNMapsUrlTileComponentName[];
110
+
111
+ /*
112
+ * `ShadowNode` for <RNMapsUrlTile> component.
113
+ */
114
+ using RNMapsUrlTileShadowNode = ConcreteViewShadowNode<
115
+ RNMapsUrlTileComponentName,
116
+ RNMapsUrlTileProps,
117
+ RNMapsUrlTileEventEmitter,
118
+ RNMapsUrlTileState>;
119
+
120
+ JSI_EXPORT extern const char RNMapsWMSTileComponentName[];
121
+
122
+ /*
123
+ * `ShadowNode` for <RNMapsWMSTile> component.
124
+ */
125
+ using RNMapsWMSTileShadowNode = ConcreteViewShadowNode<
126
+ RNMapsWMSTileComponentName,
127
+ RNMapsWMSTileProps,
128
+ RNMapsWMSTileEventEmitter,
129
+ RNMapsWMSTileState>;
130
+
109
131
  } // namespace facebook::react
@@ -110,4 +110,28 @@ public:
110
110
  #endif
111
111
  };
112
112
 
113
+ class RNMapsUrlTileState {
114
+ public:
115
+ RNMapsUrlTileState() = default;
116
+
117
+ #ifdef ANDROID
118
+ RNMapsUrlTileState(RNMapsUrlTileState const &previousState, folly::dynamic data){};
119
+ folly::dynamic getDynamic() const {
120
+ return {};
121
+ };
122
+ #endif
123
+ };
124
+
125
+ class RNMapsWMSTileState {
126
+ public:
127
+ RNMapsWMSTileState() = default;
128
+
129
+ #ifdef ANDROID
130
+ RNMapsWMSTileState(RNMapsWMSTileState const &previousState, folly::dynamic data){};
131
+ folly::dynamic getDynamic() const {
132
+ return {};
133
+ };
134
+ #endif
135
+ };
136
+
113
137
  } // namespace facebook::react
@@ -1,6 +1,6 @@
1
1
  framework module ReactNativeMapsGenerated {
2
2
  header "RNMapsAirModuleDelegate.h"
3
- header "RNMapsHostVewDelegate.h"
3
+ header "RNMapsHostViewDelegate.h"
4
4
 
5
5
  explicit module RNMapsSpecs {
6
6
  header "ComponentDescriptors.h"
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "main": "src/index.ts",
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": "1.25.0-alpha.8",
8
+ "version": "1.25.0",
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "eslint . --max-warnings 0",
@@ -25,8 +25,6 @@
25
25
  "ios",
26
26
  "app.plugin.js",
27
27
  "plugin/build",
28
- "react-native-maps-generated.podspec",
29
- "react-native-google-maps.podspec",
30
28
  "react-native-maps.podspec",
31
29
  "react-native.config.js",
32
30
  "!android/build",
@@ -111,6 +109,14 @@
111
109
  "includesGeneratedCode": true,
112
110
  "android": {
113
111
  "javaPackageName": "com.rnmaps.fabric"
112
+ },
113
+ "ios": {
114
+ "componentProvider": {
115
+ "RNMapsGoogleMapView": "RNMapsGoogleMapView",
116
+ "RNMapsGooglePolygon": "RNMapsGooglePolygonView",
117
+ "RNMapsMapView": "RNMapsMapView",
118
+ "RNMapsMarker": "RNMapsMarkerView"
119
+ }
114
120
  }
115
121
  },
116
122
  "engines": {
@@ -62,7 +62,7 @@ var withMapsIOS = function (config, props) {
62
62
  });
63
63
  // Adds/Removes AppDelegate setup for Google Maps API on iOS
64
64
  config = withGoogleMapsAppDelegate(config, {
65
- apiKey: props === null || props === void 0 ? void 0 : props.iosGoogleMapsApiKey,
65
+ apiKey: (props === null || props === void 0 ? void 0 : props.iosGoogleMapsApiKey) || null,
66
66
  });
67
67
  return config;
68
68
  };
@@ -111,14 +111,14 @@ function removeGoogleMapsAppDelegateInit(src) {
111
111
  exports.removeGoogleMapsAppDelegateInit = removeGoogleMapsAppDelegateInit;
112
112
  /**
113
113
  * @param src The contents of the Podfile.
114
+ * @param useGoogleMaps if GoogleMaps for iOS is used
114
115
  * @returns Podfile with react-native-maps integration configured.
115
116
  */
116
117
  function addMapsCocoapods(src, useGoogleMaps) {
117
118
  var newSrc = ' rn_maps_path = File.dirname(`node --print "require.resolve(\'react-native-maps/package.json\')"`) \n';
118
119
  if (useGoogleMaps) {
119
- newSrc += " pod 'react-native-google-maps', :path => rn_maps_path \n";
120
+ newSrc += " pod 'react-native-maps/Google', :path => rn_maps_path \n";
120
121
  }
121
- newSrc += " pod 'react-native-maps-generated', :path => rn_maps_path \n";
122
122
  return (0, generateCode_1.mergeContents)({
123
123
  tag: 'react-native-maps',
124
124
  src: src,
@@ -1,5 +1,5 @@
1
1
  import {Animated} from 'react-native';
2
- import {Region} from './sharedTypes';
2
+ import type {Region} from './sharedTypes';
3
3
 
4
4
  const AnimatedWithChildren = Object.getPrototypeOf(Animated.ValueXY);
5
5
  if (__DEV__) {
@@ -89,6 +89,7 @@ export default class AnimatedMapRegion extends AnimatedWithChildren {
89
89
  };
90
90
  }
91
91
 
92
+ // @ts-ignore
92
93
  private __attach() {
93
94
  this.latitude.__addChild(this);
94
95
  this.longitude.__addChild(this);
@@ -96,6 +97,7 @@ export default class AnimatedMapRegion extends AnimatedWithChildren {
96
97
  this.longitudeDelta.__addChild(this);
97
98
  }
98
99
 
100
+ // @ts-ignore
99
101
  private __detach() {
100
102
  this.latitude.__removeChild(this);
101
103
  this.longitude.__removeChild(this);
package/src/Geojson.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import {
2
+ import type {
3
3
  Feature,
4
4
  FeatureCollection,
5
5
  Point,
@@ -10,12 +10,12 @@ import {
10
10
  Polygon,
11
11
  MultiPolygon,
12
12
  } from 'geojson';
13
- import Marker, {MapMarkerProps as MarkerProps} from './MapMarker';
14
- import {MapPolygonProps as PolygonProps} from './MapPolygon';
15
- import {MapPolylineProps as PolylineProps} from './MapPolyline';
13
+ import Marker, {type MapMarkerProps as MarkerProps} from './MapMarker';
14
+ import type {MapPolygonProps as PolygonProps} from './MapPolygon';
15
+ import type {MapPolylineProps as PolylineProps} from './MapPolyline';
16
16
  import Polyline from './MapPolyline';
17
17
  import MapPolygon from './MapPolygon';
18
- import {LatLng} from './sharedTypes';
18
+ import type {LatLng} from './sharedTypes';
19
19
 
20
20
  export type GeojsonProps = {
21
21
  /**
@@ -1,14 +1,14 @@
1
1
  import * as React from 'react';
2
- import {StyleSheet, ViewProps} from 'react-native';
2
+ import {StyleSheet, type ViewProps} from 'react-native';
3
3
  import decorateMapComponent, {
4
- MapManagerCommand,
5
- NativeComponent,
6
4
  ProviderContext,
7
5
  SUPPORTED,
8
- UIManagerCommand,
9
6
  USES_DEFAULT_IMPLEMENTATION,
7
+ type MapManagerCommand,
8
+ type NativeComponent,
9
+ type UIManagerCommand,
10
10
  } from './decorateMapComponent';
11
- import {CalloutPressEvent} from './sharedTypes';
11
+ import type {CalloutPressEvent} from './sharedTypes';
12
12
 
13
13
  export type MapCalloutProps = ViewProps & {
14
14
  /**
@@ -1,14 +1,18 @@
1
1
  import * as React from 'react';
2
- import {NativeSyntheticEvent, StyleSheet, ViewProps} from 'react-native';
2
+ import {
3
+ StyleSheet,
4
+ type NativeSyntheticEvent,
5
+ type ViewProps,
6
+ } from 'react-native';
3
7
  import decorateMapComponent, {
4
8
  SUPPORTED,
5
9
  NOT_SUPPORTED,
6
10
  ProviderContext,
7
- NativeComponent,
8
- MapManagerCommand,
9
- UIManagerCommand,
11
+ type NativeComponent,
12
+ type MapManagerCommand,
13
+ type UIManagerCommand,
10
14
  } from './decorateMapComponent';
11
- import {Frame, Point} from './sharedTypes';
15
+ import type {Frame, Point} from './sharedTypes';
12
16
 
13
17
  export type MapCalloutSubviewProps = ViewProps & {
14
18
  /**
package/src/MapCircle.tsx CHANGED
@@ -1,14 +1,14 @@
1
1
  import * as React from 'react';
2
- import {View, ViewProps} from 'react-native';
2
+ import {View, type ViewProps} from 'react-native';
3
3
  import decorateMapComponent, {
4
4
  USES_DEFAULT_IMPLEMENTATION,
5
5
  SUPPORTED,
6
6
  ProviderContext,
7
- NativeComponent,
8
- MapManagerCommand,
9
- UIManagerCommand,
7
+ type NativeComponent,
8
+ type MapManagerCommand,
9
+ type UIManagerCommand,
10
10
  } from './decorateMapComponent';
11
- import {LatLng, LineCapType, LineJoinType} from './sharedTypes';
11
+ import type {LatLng, LineCapType, LineJoinType} from './sharedTypes';
12
12
 
13
13
  export type MapCircleProps = ViewProps & {
14
14
  /**