react-native-maps 1.28.2 → 1.29.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 (38) hide show
  1. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +2 -0
  2. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +2 -0
  3. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +175 -0
  4. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +157 -0
  5. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.cpp +183 -0
  6. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.h +431 -0
  7. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +2 -0
  8. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +22 -0
  9. package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.h +4 -0
  10. package/dist/src/specs/NativeComponentGoogleMarker.d.ts +250 -0
  11. package/dist/src/specs/NativeComponentPolygon.d.ts +108 -0
  12. package/dist/tsconfig.build.tsbuildinfo +1 -1
  13. package/ios/AirGoogleMaps/AIRGoogleMapMarker.h +3 -0
  14. package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +6 -2
  15. package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +8 -0
  16. package/ios/AirGoogleMaps/RNMapsGoogleMarkerView.h +28 -0
  17. package/ios/AirGoogleMaps/RNMapsGoogleMarkerView.mm +357 -0
  18. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMarkerView.h +24 -0
  19. package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMarkerView.mm +64 -0
  20. package/ios/AirMaps/RNMapsMapView.mm +8 -0
  21. package/ios/AirMaps/RNMapsPolygonView.h +26 -0
  22. package/ios/AirMaps/RNMapsPolygonView.mm +240 -0
  23. package/ios/generated/RCTThirdPartyComponentsProvider.mm +2 -0
  24. package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +2 -0
  25. package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +2 -0
  26. package/ios/generated/RNMapsSpecs/EventEmitters.cpp +175 -0
  27. package/ios/generated/RNMapsSpecs/EventEmitters.h +157 -0
  28. package/ios/generated/RNMapsSpecs/Props.cpp +178 -0
  29. package/ios/generated/RNMapsSpecs/Props.h +379 -0
  30. package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +143 -0
  31. package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +2 -0
  32. package/ios/generated/RNMapsSpecs/ShadowNodes.h +22 -0
  33. package/ios/generated/RNMapsSpecs/States.h +4 -0
  34. package/package.json +4 -2
  35. package/src/MapMarker.tsx +4 -3
  36. package/src/decorateMapComponent.ts +29 -15
  37. package/src/specs/NativeComponentGoogleMarker.ts +327 -0
  38. package/src/specs/NativeComponentPolygon.ts +137 -0
@@ -292,6 +292,110 @@ folly::dynamic RNMapsGoogleMapViewProps::getDiffProps(
292
292
  return result;
293
293
  }
294
294
  #endif
295
+ RNMapsGoogleMarkerProps::RNMapsGoogleMarkerProps(
296
+ const PropsParserContext &context,
297
+ const RNMapsGoogleMarkerProps &sourceProps,
298
+ const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
299
+
300
+ anchor(convertRawProp(context, rawProps, "anchor", sourceProps.anchor, {})),
301
+ calloutAnchor(convertRawProp(context, rawProps, "calloutAnchor", sourceProps.calloutAnchor, {})),
302
+ image(convertRawProp(context, rawProps, "image", sourceProps.image, {})),
303
+ icon(convertRawProp(context, rawProps, "icon", sourceProps.icon, {})),
304
+ coordinate(convertRawProp(context, rawProps, "coordinate", sourceProps.coordinate, {})),
305
+ description(convertRawProp(context, rawProps, "description", sourceProps.description, {})),
306
+ draggable(convertRawProp(context, rawProps, "draggable", sourceProps.draggable, {false})),
307
+ title(convertRawProp(context, rawProps, "title", sourceProps.title, {})),
308
+ tracksViewChanges(convertRawProp(context, rawProps, "tracksViewChanges", sourceProps.tracksViewChanges, {true})),
309
+ tracksInfoWindowChanges(convertRawProp(context, rawProps, "tracksInfoWindowChanges", sourceProps.tracksInfoWindowChanges, {false})),
310
+ flat(convertRawProp(context, rawProps, "flat", sourceProps.flat, {false})),
311
+ rotation(convertRawProp(context, rawProps, "rotation", sourceProps.rotation, {0.0})),
312
+ identifier(convertRawProp(context, rawProps, "identifier", sourceProps.identifier, {})),
313
+ tappable(convertRawProp(context, rawProps, "tappable", sourceProps.tappable, {true})),
314
+ opacity(convertRawProp(context, rawProps, "opacity", sourceProps.opacity, {1.0})),
315
+ pinColor(convertRawProp(context, rawProps, "pinColor", sourceProps.pinColor, {})) {}
316
+
317
+ #ifdef RN_SERIALIZABLE_STATE
318
+ ComponentName RNMapsGoogleMarkerProps::getDiffPropsImplementationTarget() const {
319
+ return "RNMapsGoogleMarker";
320
+ }
321
+
322
+ folly::dynamic RNMapsGoogleMarkerProps::getDiffProps(
323
+ const Props* prevProps) const {
324
+ static const auto defaultProps = RNMapsGoogleMarkerProps();
325
+ const RNMapsGoogleMarkerProps* oldProps = prevProps == nullptr
326
+ ? &defaultProps
327
+ : static_cast<const RNMapsGoogleMarkerProps*>(prevProps);
328
+ if (this == oldProps) {
329
+ return folly::dynamic::object();
330
+ }
331
+ folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
332
+
333
+ if (anchor != oldProps->anchor) {
334
+ result["anchor"] = toDynamic(anchor);
335
+ }
336
+
337
+ if (calloutAnchor != oldProps->calloutAnchor) {
338
+ result["calloutAnchor"] = toDynamic(calloutAnchor);
339
+ }
340
+
341
+ if (image != oldProps->image) {
342
+ result["image"] = toDynamic(image);
343
+ }
344
+
345
+ if (icon != oldProps->icon) {
346
+ result["icon"] = toDynamic(icon);
347
+ }
348
+
349
+ if (coordinate != oldProps->coordinate) {
350
+ result["coordinate"] = toDynamic(coordinate);
351
+ }
352
+
353
+ if (description != oldProps->description) {
354
+ result["description"] = description;
355
+ }
356
+
357
+ if (draggable != oldProps->draggable) {
358
+ result["draggable"] = draggable;
359
+ }
360
+
361
+ if (title != oldProps->title) {
362
+ result["title"] = title;
363
+ }
364
+
365
+ if (tracksViewChanges != oldProps->tracksViewChanges) {
366
+ result["tracksViewChanges"] = tracksViewChanges;
367
+ }
368
+
369
+ if (tracksInfoWindowChanges != oldProps->tracksInfoWindowChanges) {
370
+ result["tracksInfoWindowChanges"] = tracksInfoWindowChanges;
371
+ }
372
+
373
+ if (flat != oldProps->flat) {
374
+ result["flat"] = flat;
375
+ }
376
+
377
+ if ((rotation != oldProps->rotation) && !(std::isnan(rotation) && std::isnan(oldProps->rotation))) {
378
+ result["rotation"] = rotation;
379
+ }
380
+
381
+ if (identifier != oldProps->identifier) {
382
+ result["identifier"] = identifier;
383
+ }
384
+
385
+ if (tappable != oldProps->tappable) {
386
+ result["tappable"] = tappable;
387
+ }
388
+
389
+ if ((opacity != oldProps->opacity) && !(std::isnan(opacity) && std::isnan(oldProps->opacity))) {
390
+ result["opacity"] = opacity;
391
+ }
392
+
393
+ if (pinColor != oldProps->pinColor) {
394
+ result["pinColor"] = *pinColor;
395
+ }
396
+ return result;
397
+ }
398
+ #endif
295
399
  RNMapsGooglePolygonProps::RNMapsGooglePolygonProps(
296
400
  const PropsParserContext &context,
297
401
  const RNMapsGooglePolygonProps &sourceProps,
@@ -803,6 +907,80 @@ folly::dynamic RNMapsOverlayProps::getDiffProps(
803
907
  return result;
804
908
  }
805
909
  #endif
910
+ RNMapsPolygonProps::RNMapsPolygonProps(
911
+ const PropsParserContext &context,
912
+ const RNMapsPolygonProps &sourceProps,
913
+ const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
914
+
915
+ coordinates(convertRawProp(context, rawProps, "coordinates", sourceProps.coordinates, {})),
916
+ fillColor(convertRawProp(context, rawProps, "fillColor", sourceProps.fillColor, {})),
917
+ strokeColor(convertRawProp(context, rawProps, "strokeColor", sourceProps.strokeColor, {})),
918
+ strokeWidth(convertRawProp(context, rawProps, "strokeWidth", sourceProps.strokeWidth, {1.0})),
919
+ holes(convertRawProp(context, rawProps, "holes", sourceProps.holes, {})),
920
+ lineCap(convertRawProp(context, rawProps, "lineCap", sourceProps.lineCap, {RNMapsPolygonLineCap::Round})),
921
+ lineJoin(convertRawProp(context, rawProps, "lineJoin", sourceProps.lineJoin, {RNMapsPolygonLineJoin::Round})),
922
+ miterLimit(convertRawProp(context, rawProps, "miterLimit", sourceProps.miterLimit, {10.0})),
923
+ lineDashPhase(convertRawProp(context, rawProps, "lineDashPhase", sourceProps.lineDashPhase, {0.0})),
924
+ lineDashPattern(convertRawProp(context, rawProps, "lineDashPattern", sourceProps.lineDashPattern, {})) {}
925
+
926
+ #ifdef RN_SERIALIZABLE_STATE
927
+ ComponentName RNMapsPolygonProps::getDiffPropsImplementationTarget() const {
928
+ return "RNMapsPolygon";
929
+ }
930
+
931
+ folly::dynamic RNMapsPolygonProps::getDiffProps(
932
+ const Props* prevProps) const {
933
+ static const auto defaultProps = RNMapsPolygonProps();
934
+ const RNMapsPolygonProps* oldProps = prevProps == nullptr
935
+ ? &defaultProps
936
+ : static_cast<const RNMapsPolygonProps*>(prevProps);
937
+ if (this == oldProps) {
938
+ return folly::dynamic::object();
939
+ }
940
+ folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
941
+
942
+ if (coordinates != oldProps->coordinates) {
943
+ result["coordinates"] = toDynamic(coordinates);
944
+ }
945
+
946
+ if (fillColor != oldProps->fillColor) {
947
+ result["fillColor"] = *fillColor;
948
+ }
949
+
950
+ if (strokeColor != oldProps->strokeColor) {
951
+ result["strokeColor"] = *strokeColor;
952
+ }
953
+
954
+ if ((strokeWidth != oldProps->strokeWidth) && !(std::isnan(strokeWidth) && std::isnan(oldProps->strokeWidth))) {
955
+ result["strokeWidth"] = strokeWidth;
956
+ }
957
+
958
+ if (holes != oldProps->holes) {
959
+ result["holes"] = toDynamic(holes);
960
+ }
961
+
962
+ if (lineCap != oldProps->lineCap) {
963
+ result["lineCap"] = toDynamic(lineCap);
964
+ }
965
+
966
+ if (lineJoin != oldProps->lineJoin) {
967
+ result["lineJoin"] = toDynamic(lineJoin);
968
+ }
969
+
970
+ if ((miterLimit != oldProps->miterLimit) && !(std::isnan(miterLimit) && std::isnan(oldProps->miterLimit))) {
971
+ result["miterLimit"] = miterLimit;
972
+ }
973
+
974
+ if ((lineDashPhase != oldProps->lineDashPhase) && !(std::isnan(lineDashPhase) && std::isnan(oldProps->lineDashPhase))) {
975
+ result["lineDashPhase"] = lineDashPhase;
976
+ }
977
+
978
+ if (lineDashPattern != oldProps->lineDashPattern) {
979
+ result["lineDashPattern"] = toDynamic(lineDashPattern);
980
+ }
981
+ return result;
982
+ }
983
+ #endif
806
984
  RNMapsPolylineProps::RNMapsPolylineProps(
807
985
  const PropsParserContext &context,
808
986
  const RNMapsPolylineProps &sourceProps,