react-native-maps 1.23.12 → 1.24.1

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.
@@ -206,9 +206,9 @@ bool areHolesEqual(const std::vector<std::vector<RNMapsGooglePolygonHolesStruct>
206
206
  if (newViewProps.strokeColor){
207
207
  _view.strokeColor = RCTUIColorFromSharedColor(newViewProps.strokeColor);
208
208
  }
209
-
210
-
211
-
209
+ if (newViewProps.strokeWidth != oldViewProps.strokeWidth){
210
+ _view.strokeWidth = newViewProps.strokeWidth;
211
+ }
212
212
 
213
213
  [super updateProps:props oldProps:oldProps];
214
214
  }
@@ -117,6 +117,7 @@ NSInteger const AIR_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
117
117
  _pinView.layer.zPosition = self.zIndex;
118
118
  _pinView.displayPriority = self.displayPriority;
119
119
  _pinView.zPriority = self.zIndex;
120
+ _pinView.centerOffset = self.centerOffset;
120
121
  return _pinView;
121
122
  }
122
123
 
@@ -134,7 +135,7 @@ NSInteger const AIR_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
134
135
  _markerView.subtitleVisibility = self.subtitleVisibility ?: MKFeatureVisibilityHidden;
135
136
  _markerView.displayPriority = self.displayPriority;
136
137
  _markerView.zPriority = self.zIndex;
137
-
138
+ _markerView.centerOffset = self.centerOffset;
138
139
 
139
140
  }
140
141
  return _markerView ?: _pinView;
@@ -337,6 +338,11 @@ NSInteger const AIR_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
337
338
  [super setCalloutOffset:calloutOffset];
338
339
  }
339
340
 
341
+ - (void) setCenterOffset:(CGPoint)centerOffset
342
+ {
343
+ [super setCenterOffset:centerOffset];
344
+ }
345
+
340
346
  - (BOOL)shouldShowCalloutView
341
347
  {
342
348
  return self.calloutView != nil || self.title != nil || self.subtitle != nil;
@@ -131,6 +131,34 @@ using namespace facebook::react;
131
131
  _view = (AIRMap *)[_legacyMapManager view];
132
132
 
133
133
  self.contentView = _view;
134
+
135
+ _view.onLongPress = [self](NSDictionary* dictionary) {
136
+ if (_eventEmitter) {
137
+ // Extract values from the NSDictionary
138
+ NSDictionary* coordinateDict = dictionary[@"coordinate"];
139
+ NSDictionary* positionDict = dictionary[@"position"];
140
+
141
+ // Populate the OnMapPressCoordinate struct
142
+ facebook::react::RNMapsMapViewEventEmitter::OnLongPressCoordinate coordinate = {
143
+ .latitude = [coordinateDict[@"latitude"] doubleValue],
144
+ .longitude = [coordinateDict[@"longitude"] doubleValue],
145
+ };
146
+
147
+ // Populate the OnMapPressPosition struct
148
+ facebook::react::RNMapsMapViewEventEmitter::OnLongPressPosition position = {
149
+ .x = [positionDict[@"x"] doubleValue],
150
+ .y = [positionDict[@"y"] doubleValue],
151
+ };
152
+
153
+ auto mapViewEventEmitter = std::static_pointer_cast<RNMapsMapViewEventEmitter const>(_eventEmitter);
154
+ facebook::react::RNMapsMapViewEventEmitter::OnLongPress data = {
155
+ .action = std::string([@"long-press" UTF8String]),
156
+ .position = position,
157
+ .coordinate = coordinate
158
+ };
159
+ mapViewEventEmitter->onLongPress(data);
160
+ }
161
+ };
134
162
 
135
163
  _view.onPress = [self](NSDictionary* dictionary) {
136
164
  if (_eventEmitter) {
@@ -367,8 +367,9 @@ _view.name = CGPointMake(newViewProps.name.x, newViewProps.name.y); \
367
367
 
368
368
  REMAP_MAPVIEW_COLOR_PROP(pinColor)
369
369
 
370
-
371
370
  REMAP_MAPVIEW_POINT_PROP(calloutOffset)
371
+ REMAP_MAPVIEW_POINT_PROP(centerOffset)
372
+
372
373
  if (newViewProps.coordinate.latitude != oldViewProps.coordinate.latitude ||
373
374
  newViewProps.coordinate.longitude != oldViewProps.coordinate.longitude) {
374
375
  CLLocationCoordinate2D coordinates = CLLocationCoordinate2DMake(
@@ -24,6 +24,8 @@ registry->add(concreteComponentDescriptorProvider<RNMapsMapViewComponentDescript
24
24
  registry->add(concreteComponentDescriptorProvider<RNMapsMarkerComponentDescriptor>());
25
25
  registry->add(concreteComponentDescriptorProvider<RNMapsOverlayComponentDescriptor>());
26
26
  registry->add(concreteComponentDescriptorProvider<RNMapsPolylineComponentDescriptor>());
27
+ registry->add(concreteComponentDescriptorProvider<RNMapsUrlTileComponentDescriptor>());
28
+ registry->add(concreteComponentDescriptorProvider<RNMapsWMSTileComponentDescriptor>());
27
29
  }
28
30
 
29
31
  } // namespace facebook::react
@@ -24,6 +24,8 @@ using RNMapsMapViewComponentDescriptor = ConcreteComponentDescriptor<RNMapsMapVi
24
24
  using RNMapsMarkerComponentDescriptor = ConcreteComponentDescriptor<RNMapsMarkerShadowNode>;
25
25
  using RNMapsOverlayComponentDescriptor = ConcreteComponentDescriptor<RNMapsOverlayShadowNode>;
26
26
  using RNMapsPolylineComponentDescriptor = ConcreteComponentDescriptor<RNMapsPolylineShadowNode>;
27
+ using RNMapsUrlTileComponentDescriptor = ConcreteComponentDescriptor<RNMapsUrlTileShadowNode>;
28
+ using RNMapsWMSTileComponentDescriptor = ConcreteComponentDescriptor<RNMapsWMSTileShadowNode>;
27
29
 
28
30
  void RNMapsSpecs_registerComponentDescriptorsFromCodegen(
29
31
  std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
@@ -974,4 +974,6 @@ $payload.setProperty(runtime, "id", $event.id);
974
974
  });
975
975
  }
976
976
 
977
+
978
+
977
979
  } // namespace facebook::react
@@ -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
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.23.12",
8
+ "version": "1.24.1",
9
9
  "license": "MIT",
10
10
  "scripts": {
11
11
  "lint": "eslint . --max-warnings 0",
@@ -5,6 +5,7 @@ import type {
5
5
  Double,
6
6
  Float,
7
7
  BubblingEventHandler,
8
+ WithDefault,
8
9
  } from 'react-native/Libraries/Types/CodegenTypes';
9
10
 
10
11
  export type LatLng = Readonly<{
@@ -77,7 +78,7 @@ export interface CircleFabricNativeProps extends ViewProps {
77
78
  * @platform iOS: Supported
78
79
  * @platform Android: Supported
79
80
  */
80
- strokeWidth?: Float;
81
+ strokeWidth?: WithDefault<Float, 1.0>;
81
82
 
82
83
  /**
83
84
  * Boolean to allow a polygon to be tappable and use the onPress function.
@@ -4,6 +4,8 @@ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNati
4
4
  import type {
5
5
  Double,
6
6
  BubblingEventHandler,
7
+ Float,
8
+ WithDefault,
7
9
  } from 'react-native/Libraries/Types/CodegenTypes';
8
10
 
9
11
  export type LatLng = Readonly<{
@@ -53,6 +55,15 @@ export interface PolygonFabricNativeProps extends ViewProps {
53
55
  */
54
56
  strokeColor?: ColorValue;
55
57
 
58
+ /**
59
+ * The stroke width to use for the path.
60
+ *
61
+ * @default 1
62
+ * @platform iOS: Supported
63
+ * @platform Android: Supported
64
+ */
65
+ strokeWidth?: WithDefault<Float, 1.0>;
66
+
56
67
  /**
57
68
  * Boolean to indicate whether to draw each segment of the line as a geodesic as opposed to straight lines on the Mercator projection.
58
69
  * A geodesic is the shortest path between two points on the Earth's surface.
@@ -133,6 +133,19 @@ export interface MarkerFabricNativeProps extends ViewProps {
133
133
  */
134
134
  displayPriority?: WithDefault<AppleMarkerPriority, 'required'>;
135
135
 
136
+ /**
137
+ * The offset (in points) at which to display the annotation view.
138
+ *
139
+ * By default, the center point of an annotation view is placed at the coordinate point of the associated annotation.
140
+ *
141
+ * Positive offset values move the annotation view down and to the right, while negative values move it up and to the left.
142
+ *
143
+ * @default {x: 0.0, y: 0.0}
144
+ * @platform iOS: Apple Maps only. For Google Maps, see the `anchor` prop
145
+ * @platform Android: Not supported. see the `anchor` prop
146
+ */
147
+ centerOffset?: Point;
148
+
136
149
  /**
137
150
  * The coordinate for the marker.
138
151
  *
@@ -107,7 +107,7 @@ export interface PolylineFabricNativeProps extends ViewProps {
107
107
  * @platform iOS: Supported
108
108
  * @platform Android: Supported
109
109
  */
110
- strokeWidth?: Float;
110
+ strokeWidth?: WithDefault<Float, 1.0>;
111
111
 
112
112
  /**
113
113
  * Boolean to allow a polygon to be tappable and use the onPress function.