react-native-google-maps-plus 1.1.0-dev.1 → 1.1.0-dev.3

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 (67) hide show
  1. package/RNGoogleMapsPlus.podspec +2 -0
  2. package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +38 -103
  3. package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +3 -3
  4. package/android/src/main/java/com/rngooglemapsplus/MapCircleBuilder.kt +16 -2
  5. package/android/src/main/java/com/rngooglemapsplus/MapMarkerBuilder.kt +48 -27
  6. package/android/src/main/java/com/rngooglemapsplus/MapPolygonBuilder.kt +18 -1
  7. package/android/src/main/java/com/rngooglemapsplus/MapPolylineBuilder.kt.kt +26 -9
  8. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +48 -72
  9. package/android/src/main/java/com/rngooglemapsplus/extensions/RNMarkerExtension.kt +17 -0
  10. package/ios/GoogleMapViewImpl.swift +94 -212
  11. package/ios/LocationHandler.swift +2 -10
  12. package/ios/MapCircleBuilder.swift +23 -8
  13. package/ios/MapHelper.swift +6 -4
  14. package/ios/MapMarkerBuilder.swift +55 -48
  15. package/ios/MapPolygonBuilder.swift +25 -7
  16. package/ios/MapPolylineBuilder.swift +27 -11
  17. package/ios/RNGoogleMapsPlusView.swift +9 -15
  18. package/ios/extensions/RNCircle+Extension.swift +0 -13
  19. package/ios/extensions/RNMarker+Extension.swift +6 -5
  20. package/ios/extensions/RNPolygon+Extension.swift.swift +2 -19
  21. package/ios/extensions/RNPolyline+Extension.swift.swift +1 -26
  22. package/lib/module/types.js.map +1 -1
  23. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +2 -3
  24. package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
  25. package/lib/typescript/src/types.d.ts +9 -2
  26. package/lib/typescript/src/types.d.ts.map +1 -1
  27. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +14 -15
  28. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +2 -4
  29. package/nitrogen/generated/android/c++/JRNCircle.hpp +4 -4
  30. package/nitrogen/generated/android/c++/JRNMapZoomConfig.hpp +57 -0
  31. package/nitrogen/generated/android/c++/JRNMarker.hpp +6 -12
  32. package/nitrogen/generated/android/c++/JRNMarkerSvg.hpp +61 -0
  33. package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +2 -6
  34. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +1 -7
  35. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCircle.kt +1 -1
  36. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapZoomConfig.kt +32 -0
  37. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +1 -7
  38. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarkerSvg.kt +35 -0
  39. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewManager.kt +1 -1
  40. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +13 -13
  41. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +75 -33
  42. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +6 -0
  43. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +11 -12
  44. package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +4 -9
  45. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +1 -2
  46. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +46 -94
  47. package/nitrogen/generated/ios/swift/RNCamera.swift +1 -8
  48. package/nitrogen/generated/ios/swift/RNCircle.swift +5 -17
  49. package/nitrogen/generated/ios/swift/RNInitialProps.swift +1 -8
  50. package/nitrogen/generated/ios/swift/RNLocationConfig.swift +2 -16
  51. package/nitrogen/generated/ios/swift/RNMapZoomConfig.swift +70 -0
  52. package/nitrogen/generated/ios/swift/RNMarker.swift +18 -35
  53. package/nitrogen/generated/ios/swift/RNMarkerSvg.swift +57 -0
  54. package/nitrogen/generated/ios/swift/RNPolygon.swift +11 -15
  55. package/nitrogen/generated/ios/swift/RNPolyline.swift +11 -15
  56. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +2 -4
  57. package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +5 -4
  58. package/nitrogen/generated/shared/c++/RNCircle.hpp +5 -5
  59. package/nitrogen/generated/shared/c++/RNMapZoomConfig.hpp +71 -0
  60. package/nitrogen/generated/shared/c++/RNMarker.hpp +8 -13
  61. package/nitrogen/generated/shared/c++/RNMarkerSvg.hpp +75 -0
  62. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +7 -19
  63. package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +2 -2
  64. package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +1 -2
  65. package/package.json +13 -13
  66. package/src/RNGoogleMapsPlusView.nitro.ts +2 -2
  67. package/src/types.ts +11 -2
@@ -0,0 +1,75 @@
1
+ ///
2
+ /// RNMarkerSvg.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2025 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #if __has_include(<NitroModules/JSIConverter.hpp>)
11
+ #include <NitroModules/JSIConverter.hpp>
12
+ #else
13
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
14
+ #endif
15
+ #if __has_include(<NitroModules/NitroDefines.hpp>)
16
+ #include <NitroModules/NitroDefines.hpp>
17
+ #else
18
+ #error NitroModules cannot be found! Are you sure you installed NitroModules properly?
19
+ #endif
20
+
21
+
22
+
23
+ #include <string>
24
+
25
+ namespace margelo::nitro::rngooglemapsplus {
26
+
27
+ /**
28
+ * A struct which can be represented as a JavaScript object (RNMarkerSvg).
29
+ */
30
+ struct RNMarkerSvg {
31
+ public:
32
+ double width SWIFT_PRIVATE;
33
+ double height SWIFT_PRIVATE;
34
+ std::string svgString SWIFT_PRIVATE;
35
+
36
+ public:
37
+ RNMarkerSvg() = default;
38
+ explicit RNMarkerSvg(double width, double height, std::string svgString): width(width), height(height), svgString(svgString) {}
39
+ };
40
+
41
+ } // namespace margelo::nitro::rngooglemapsplus
42
+
43
+ namespace margelo::nitro {
44
+
45
+ // C++ RNMarkerSvg <> JS RNMarkerSvg (object)
46
+ template <>
47
+ struct JSIConverter<margelo::nitro::rngooglemapsplus::RNMarkerSvg> final {
48
+ static inline margelo::nitro::rngooglemapsplus::RNMarkerSvg fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
49
+ jsi::Object obj = arg.asObject(runtime);
50
+ return margelo::nitro::rngooglemapsplus::RNMarkerSvg(
51
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "width")),
52
+ JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "height")),
53
+ JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "svgString"))
54
+ );
55
+ }
56
+ static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNMarkerSvg& arg) {
57
+ jsi::Object obj(runtime);
58
+ obj.setProperty(runtime, "width", JSIConverter<double>::toJSI(runtime, arg.width));
59
+ obj.setProperty(runtime, "height", JSIConverter<double>::toJSI(runtime, arg.height));
60
+ obj.setProperty(runtime, "svgString", JSIConverter<std::string>::toJSI(runtime, arg.svgString));
61
+ return obj;
62
+ }
63
+ static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
64
+ if (!value.isObject()) {
65
+ return false;
66
+ }
67
+ jsi::Object obj = value.getObject(runtime);
68
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "width"))) return false;
69
+ if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "height"))) return false;
70
+ if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "svgString"))) return false;
71
+ return true;
72
+ }
73
+ };
74
+
75
+ } // namespace margelo::nitro
@@ -105,24 +105,14 @@ namespace margelo::nitro::rngooglemapsplus::views {
105
105
  throw std::runtime_error(std::string("RNGoogleMapsPlusView.userInterfaceStyle: ") + exc.what());
106
106
  }
107
107
  }()),
108
- minZoomLevel([&]() -> CachedProp<std::optional<double>> {
108
+ mapZoomConfig([&]() -> CachedProp<std::optional<RNMapZoomConfig>> {
109
109
  try {
110
- const react::RawValue* rawValue = rawProps.at("minZoomLevel", nullptr, nullptr);
111
- if (rawValue == nullptr) return sourceProps.minZoomLevel;
110
+ const react::RawValue* rawValue = rawProps.at("mapZoomConfig", nullptr, nullptr);
111
+ if (rawValue == nullptr) return sourceProps.mapZoomConfig;
112
112
  const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
113
- return CachedProp<std::optional<double>>::fromRawValue(*runtime, value, sourceProps.minZoomLevel);
113
+ return CachedProp<std::optional<RNMapZoomConfig>>::fromRawValue(*runtime, value, sourceProps.mapZoomConfig);
114
114
  } catch (const std::exception& exc) {
115
- throw std::runtime_error(std::string("RNGoogleMapsPlusView.minZoomLevel: ") + exc.what());
116
- }
117
- }()),
118
- maxZoomLevel([&]() -> CachedProp<std::optional<double>> {
119
- try {
120
- const react::RawValue* rawValue = rawProps.at("maxZoomLevel", nullptr, nullptr);
121
- if (rawValue == nullptr) return sourceProps.maxZoomLevel;
122
- const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
123
- return CachedProp<std::optional<double>>::fromRawValue(*runtime, value, sourceProps.maxZoomLevel);
124
- } catch (const std::exception& exc) {
125
- throw std::runtime_error(std::string("RNGoogleMapsPlusView.maxZoomLevel: ") + exc.what());
115
+ throw std::runtime_error(std::string("RNGoogleMapsPlusView.mapZoomConfig: ") + exc.what());
126
116
  }
127
117
  }()),
128
118
  mapPadding([&]() -> CachedProp<std::optional<RNMapPadding>> {
@@ -336,8 +326,7 @@ namespace margelo::nitro::rngooglemapsplus::views {
336
326
  indoorEnabled(other.indoorEnabled),
337
327
  customMapStyle(other.customMapStyle),
338
328
  userInterfaceStyle(other.userInterfaceStyle),
339
- minZoomLevel(other.minZoomLevel),
340
- maxZoomLevel(other.maxZoomLevel),
329
+ mapZoomConfig(other.mapZoomConfig),
341
330
  mapPadding(other.mapPadding),
342
331
  mapType(other.mapType),
343
332
  markers(other.markers),
@@ -369,8 +358,7 @@ namespace margelo::nitro::rngooglemapsplus::views {
369
358
  case hashString("indoorEnabled"): return true;
370
359
  case hashString("customMapStyle"): return true;
371
360
  case hashString("userInterfaceStyle"): return true;
372
- case hashString("minZoomLevel"): return true;
373
- case hashString("maxZoomLevel"): return true;
361
+ case hashString("mapZoomConfig"): return true;
374
362
  case hashString("mapPadding"): return true;
375
363
  case hashString("mapType"): return true;
376
364
  case hashString("markers"): return true;
@@ -21,6 +21,7 @@
21
21
  #include "RNMapUiSettings.hpp"
22
22
  #include <string>
23
23
  #include "RNUserInterfaceStyle.hpp"
24
+ #include "RNMapZoomConfig.hpp"
24
25
  #include "RNMapPadding.hpp"
25
26
  #include "RNMapType.hpp"
26
27
  #include "RNMarker.hpp"
@@ -68,8 +69,7 @@ namespace margelo::nitro::rngooglemapsplus::views {
68
69
  CachedProp<std::optional<bool>> indoorEnabled;
69
70
  CachedProp<std::optional<std::string>> customMapStyle;
70
71
  CachedProp<std::optional<RNUserInterfaceStyle>> userInterfaceStyle;
71
- CachedProp<std::optional<double>> minZoomLevel;
72
- CachedProp<std::optional<double>> maxZoomLevel;
72
+ CachedProp<std::optional<RNMapZoomConfig>> mapZoomConfig;
73
73
  CachedProp<std::optional<RNMapPadding>> mapPadding;
74
74
  CachedProp<std::optional<RNMapType>> mapType;
75
75
  CachedProp<std::optional<std::vector<RNMarker>>> markers;
@@ -12,8 +12,7 @@
12
12
  "indoorEnabled": true,
13
13
  "customMapStyle": true,
14
14
  "userInterfaceStyle": true,
15
- "minZoomLevel": true,
16
- "maxZoomLevel": true,
15
+ "mapZoomConfig": true,
17
16
  "mapPadding": true,
18
17
  "mapType": true,
19
18
  "markers": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-maps-plus",
3
- "version": "1.1.0-dev.1",
3
+ "version": "1.1.0-dev.3",
4
4
  "description": "React-native wrapper for android & IOS google maps sdk",
5
5
  "main": "./lib/module/index.js",
6
6
  "module": "./lib/module/index.js",
@@ -71,36 +71,36 @@
71
71
  "provenance": true
72
72
  },
73
73
  "devDependencies": {
74
- "@commitlint/cli": "20.0.0",
74
+ "@commitlint/cli": "20.1.0",
75
75
  "@commitlint/config-conventional": "20.0.0",
76
76
  "@eslint/compat": "1.4.0",
77
77
  "@eslint/eslintrc": "3.3.1",
78
- "@eslint/js": "9.36.0",
78
+ "@eslint/js": "9.37.0",
79
79
  "@jamesacarr/eslint-formatter-github-actions": "0.2.0",
80
- "@react-native/babel-preset": "0.82.0-rc.4",
81
- "@react-native/eslint-config": "0.82.0-rc.4",
80
+ "@react-native/babel-preset": "0.82.0",
81
+ "@react-native/eslint-config": "0.82.0",
82
82
  "@semantic-release/changelog": "6.0.3",
83
83
  "@semantic-release/git": "10.0.1",
84
84
  "@semantic-release/npm": "13.0.0-beta.1",
85
85
  "@types/jest": "30.0.0",
86
- "@types/react": "19.1.15",
86
+ "@types/react": "19.2.2",
87
87
  "clang-format-node": "2.0.1",
88
88
  "conventional-changelog-conventionalcommits": "9.1.0",
89
89
  "del-cli": "7.0.0",
90
- "eslint": "9.36.0",
90
+ "eslint": "9.37.0",
91
91
  "eslint-config-prettier": "10.1.8",
92
92
  "eslint-plugin-ft-flow": "3.0.11",
93
93
  "eslint-plugin-prettier": "5.5.4",
94
94
  "jest": "30.2.0",
95
- "lefthook": "1.13.5",
96
- "nitrogen": "0.29.6",
95
+ "lefthook": "1.13.6",
96
+ "nitrogen": "0.29.8",
97
97
  "prettier": "3.6.2",
98
- "react": "19.1.1",
99
- "react-native": "0.82.0-rc.4",
98
+ "react": "19.2.0",
99
+ "react-native": "0.82.0",
100
100
  "react-native-builder-bob": "0.40.13",
101
- "react-native-nitro-modules": "0.29.6",
101
+ "react-native-nitro-modules": "0.29.8",
102
102
  "semantic-release": "25.0.0-beta.6",
103
- "typescript": "5.9.2"
103
+ "typescript": "5.9.3"
104
104
  },
105
105
  "overrides": {
106
106
  "@semantic-release/npm": "13.0.0-beta.1",
@@ -21,6 +21,7 @@ import type {
21
21
  RNCircle,
22
22
  RNMapUiSettings,
23
23
  RNLocationConfig,
24
+ RNMapZoomConfig,
24
25
  } from './types';
25
26
 
26
27
  export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
@@ -32,8 +33,7 @@ export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
32
33
  indoorEnabled?: boolean;
33
34
  customMapStyle?: string;
34
35
  userInterfaceStyle?: RNUserInterfaceStyle;
35
- minZoomLevel?: number;
36
- maxZoomLevel?: number;
36
+ mapZoomConfig?: RNMapZoomConfig;
37
37
  mapPadding?: RNMapPadding;
38
38
  mapType?: RNMapType;
39
39
  markers?: RNMarker[];
package/src/types.ts CHANGED
@@ -123,6 +123,11 @@ export type RNPosition = {
123
123
  y: number;
124
124
  };
125
125
 
126
+ export type RNMapZoomConfig = {
127
+ min?: number;
128
+ max?: number;
129
+ };
130
+
126
131
  export type RNLineCapType = 'butt' | 'round' | 'square';
127
132
  export type RNLineJoinType = 'miter' | 'round' | 'bevel';
128
133
 
@@ -131,9 +136,13 @@ export type RNMarker = {
131
136
  zIndex?: number;
132
137
  coordinate: RNLatLng;
133
138
  anchor?: RNPosition;
139
+ iconSvg?: RNMarkerSvg;
140
+ };
141
+
142
+ export type RNMarkerSvg = {
134
143
  width: number;
135
144
  height: number;
136
- iconSvg: string;
145
+ svgString: string;
137
146
  };
138
147
 
139
148
  export type RNPolygon = {
@@ -162,7 +171,7 @@ export type RNCircle = {
162
171
  pressable?: boolean;
163
172
  zIndex?: number;
164
173
  center: RNLatLng;
165
- radius?: number;
174
+ radius: number;
166
175
  strokeWidth?: number;
167
176
  strokeColor?: string;
168
177
  fillColor?: string;