react-native-google-maps-plus 1.1.0-dev.2 → 1.1.0-dev.4
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.
- package/README.md +7 -5
- package/RNGoogleMapsPlus.podspec +2 -1
- package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +91 -102
- package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +3 -3
- package/android/src/main/java/com/rngooglemapsplus/MapCircleBuilder.kt +16 -2
- package/android/src/main/java/com/rngooglemapsplus/MapHeatmapBuilder.kt +31 -0
- package/android/src/main/java/com/rngooglemapsplus/MapMarkerBuilder.kt +25 -0
- package/android/src/main/java/com/rngooglemapsplus/MapPolygonBuilder.kt +18 -1
- package/android/src/main/java/com/rngooglemapsplus/MapPolylineBuilder.kt.kt +26 -9
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +61 -71
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNHeatmapPointExtension.kt +9 -0
- package/ios/GoogleMapViewImpl.swift +129 -213
- package/ios/LocationHandler.swift +2 -10
- package/ios/MapCircleBuilder.swift +23 -8
- package/ios/MapHeatmapBuilder.swift +27 -0
- package/ios/MapHelper.swift +6 -4
- package/ios/MapMarkerBuilder.swift +39 -41
- package/ios/MapPolygonBuilder.swift +25 -7
- package/ios/MapPolylineBuilder.swift +27 -11
- package/ios/RNGoogleMapsPlusView.swift +31 -14
- package/ios/extensions/RNCircle+Extension.swift +0 -13
- package/ios/extensions/RNHeatmap+Extension.swift +16 -0
- package/ios/extensions/RNPolygon+Extension.swift.swift +2 -19
- package/ios/extensions/RNPolyline+Extension.swift.swift +1 -26
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +3 -3
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +24 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +48 -15
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +4 -4
- package/nitrogen/generated/android/c++/JRNCircle.hpp +4 -4
- package/nitrogen/generated/android/c++/JRNHeatmap.hpp +100 -0
- package/nitrogen/generated/android/c++/JRNHeatmapGradient.hpp +89 -0
- package/nitrogen/generated/android/c++/JRNHeatmapPoint.hpp +61 -0
- package/nitrogen/generated/android/c++/JRNMapZoomConfig.hpp +57 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +7 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCircle.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmap.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmapGradient.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmapPoint.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapZoomConfig.kt +32 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +101 -0
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +12 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +23 -11
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +9 -9
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +2 -2
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +39 -19
- package/nitrogen/generated/ios/swift/RNCircle.swift +5 -17
- package/nitrogen/generated/ios/swift/RNHeatmap.swift +180 -0
- package/nitrogen/generated/ios/swift/RNHeatmapGradient.swift +81 -0
- package/nitrogen/generated/ios/swift/RNHeatmapPoint.swift +57 -0
- package/nitrogen/generated/ios/swift/RNMapZoomConfig.swift +70 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +4 -4
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +10 -4
- package/nitrogen/generated/shared/c++/RNCircle.hpp +5 -5
- package/nitrogen/generated/shared/c++/RNHeatmap.hpp +98 -0
- package/nitrogen/generated/shared/c++/RNHeatmapGradient.hpp +76 -0
- package/nitrogen/generated/shared/c++/RNHeatmapPoint.hpp +75 -0
- package/nitrogen/generated/shared/c++/RNMapZoomConfig.hpp +71 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +19 -19
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +4 -2
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +2 -2
- package/package.json +12 -12
- package/src/RNGoogleMapsPlusView.nitro.ts +4 -2
- package/src/types.ts +28 -1
|
@@ -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
|
-
|
|
108
|
+
mapZoomConfig([&]() -> CachedProp<std::optional<RNMapZoomConfig>> {
|
|
109
109
|
try {
|
|
110
|
-
const react::RawValue* rawValue = rawProps.at("
|
|
111
|
-
if (rawValue == nullptr) return sourceProps.
|
|
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<
|
|
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.
|
|
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>> {
|
|
@@ -185,6 +175,16 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
185
175
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.circles: ") + exc.what());
|
|
186
176
|
}
|
|
187
177
|
}()),
|
|
178
|
+
heatmaps([&]() -> CachedProp<std::optional<std::vector<RNHeatmap>>> {
|
|
179
|
+
try {
|
|
180
|
+
const react::RawValue* rawValue = rawProps.at("heatmaps", nullptr, nullptr);
|
|
181
|
+
if (rawValue == nullptr) return sourceProps.heatmaps;
|
|
182
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
183
|
+
return CachedProp<std::optional<std::vector<RNHeatmap>>>::fromRawValue(*runtime, value, sourceProps.heatmaps);
|
|
184
|
+
} catch (const std::exception& exc) {
|
|
185
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.heatmaps: ") + exc.what());
|
|
186
|
+
}
|
|
187
|
+
}()),
|
|
188
188
|
locationConfig([&]() -> CachedProp<std::optional<RNLocationConfig>> {
|
|
189
189
|
try {
|
|
190
190
|
const react::RawValue* rawValue = rawProps.at("locationConfig", nullptr, nullptr);
|
|
@@ -336,14 +336,14 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
336
336
|
indoorEnabled(other.indoorEnabled),
|
|
337
337
|
customMapStyle(other.customMapStyle),
|
|
338
338
|
userInterfaceStyle(other.userInterfaceStyle),
|
|
339
|
-
|
|
340
|
-
maxZoomLevel(other.maxZoomLevel),
|
|
339
|
+
mapZoomConfig(other.mapZoomConfig),
|
|
341
340
|
mapPadding(other.mapPadding),
|
|
342
341
|
mapType(other.mapType),
|
|
343
342
|
markers(other.markers),
|
|
344
343
|
polygons(other.polygons),
|
|
345
344
|
polylines(other.polylines),
|
|
346
345
|
circles(other.circles),
|
|
346
|
+
heatmaps(other.heatmaps),
|
|
347
347
|
locationConfig(other.locationConfig),
|
|
348
348
|
onMapError(other.onMapError),
|
|
349
349
|
onMapReady(other.onMapReady),
|
|
@@ -369,14 +369,14 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
369
369
|
case hashString("indoorEnabled"): return true;
|
|
370
370
|
case hashString("customMapStyle"): return true;
|
|
371
371
|
case hashString("userInterfaceStyle"): return true;
|
|
372
|
-
case hashString("
|
|
373
|
-
case hashString("maxZoomLevel"): return true;
|
|
372
|
+
case hashString("mapZoomConfig"): return true;
|
|
374
373
|
case hashString("mapPadding"): return true;
|
|
375
374
|
case hashString("mapType"): return true;
|
|
376
375
|
case hashString("markers"): return true;
|
|
377
376
|
case hashString("polygons"): return true;
|
|
378
377
|
case hashString("polylines"): return true;
|
|
379
378
|
case hashString("circles"): return true;
|
|
379
|
+
case hashString("heatmaps"): return true;
|
|
380
380
|
case hashString("locationConfig"): return true;
|
|
381
381
|
case hashString("onMapError"): return true;
|
|
382
382
|
case hashString("onMapReady"): 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"
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
#include "RNPolygon.hpp"
|
|
29
30
|
#include "RNPolyline.hpp"
|
|
30
31
|
#include "RNCircle.hpp"
|
|
32
|
+
#include "RNHeatmap.hpp"
|
|
31
33
|
#include "RNLocationConfig.hpp"
|
|
32
34
|
#include "RNMapErrorCode.hpp"
|
|
33
35
|
#include <functional>
|
|
@@ -68,14 +70,14 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
68
70
|
CachedProp<std::optional<bool>> indoorEnabled;
|
|
69
71
|
CachedProp<std::optional<std::string>> customMapStyle;
|
|
70
72
|
CachedProp<std::optional<RNUserInterfaceStyle>> userInterfaceStyle;
|
|
71
|
-
CachedProp<std::optional<
|
|
72
|
-
CachedProp<std::optional<double>> maxZoomLevel;
|
|
73
|
+
CachedProp<std::optional<RNMapZoomConfig>> mapZoomConfig;
|
|
73
74
|
CachedProp<std::optional<RNMapPadding>> mapPadding;
|
|
74
75
|
CachedProp<std::optional<RNMapType>> mapType;
|
|
75
76
|
CachedProp<std::optional<std::vector<RNMarker>>> markers;
|
|
76
77
|
CachedProp<std::optional<std::vector<RNPolygon>>> polygons;
|
|
77
78
|
CachedProp<std::optional<std::vector<RNPolyline>>> polylines;
|
|
78
79
|
CachedProp<std::optional<std::vector<RNCircle>>> circles;
|
|
80
|
+
CachedProp<std::optional<std::vector<RNHeatmap>>> heatmaps;
|
|
79
81
|
CachedProp<std::optional<RNLocationConfig>> locationConfig;
|
|
80
82
|
CachedProp<std::optional<std::function<void(RNMapErrorCode /* error */)>>> onMapError;
|
|
81
83
|
CachedProp<std::optional<std::function<void(bool /* ready */)>>> onMapReady;
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
"indoorEnabled": true,
|
|
13
13
|
"customMapStyle": true,
|
|
14
14
|
"userInterfaceStyle": true,
|
|
15
|
-
"
|
|
16
|
-
"maxZoomLevel": true,
|
|
15
|
+
"mapZoomConfig": true,
|
|
17
16
|
"mapPadding": true,
|
|
18
17
|
"mapType": true,
|
|
19
18
|
"markers": true,
|
|
20
19
|
"polygons": true,
|
|
21
20
|
"polylines": true,
|
|
22
21
|
"circles": true,
|
|
22
|
+
"heatmaps": true,
|
|
23
23
|
"locationConfig": true,
|
|
24
24
|
"onMapError": true,
|
|
25
25
|
"onMapReady": 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.
|
|
3
|
+
"version": "1.1.0-dev.4",
|
|
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.
|
|
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.
|
|
78
|
+
"@eslint/js": "9.37.0",
|
|
79
79
|
"@jamesacarr/eslint-formatter-github-actions": "0.2.0",
|
|
80
|
-
"@react-native/babel-preset": "0.82.0
|
|
81
|
-
"@react-native/eslint-config": "0.82.0
|
|
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.
|
|
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.
|
|
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.
|
|
95
|
+
"lefthook": "1.13.6",
|
|
96
96
|
"nitrogen": "0.29.6",
|
|
97
97
|
"prettier": "3.6.2",
|
|
98
|
-
"react": "19.
|
|
99
|
-
"react-native": "0.82.0
|
|
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.
|
|
101
|
+
"react-native-nitro-modules": "0.29.8",
|
|
102
102
|
"semantic-release": "25.0.0-beta.6",
|
|
103
|
-
"typescript": "5.9.
|
|
103
|
+
"typescript": "5.9.3"
|
|
104
104
|
},
|
|
105
105
|
"overrides": {
|
|
106
106
|
"@semantic-release/npm": "13.0.0-beta.1",
|
|
@@ -21,6 +21,8 @@ import type {
|
|
|
21
21
|
RNCircle,
|
|
22
22
|
RNMapUiSettings,
|
|
23
23
|
RNLocationConfig,
|
|
24
|
+
RNMapZoomConfig,
|
|
25
|
+
RNHeatmap,
|
|
24
26
|
} from './types';
|
|
25
27
|
|
|
26
28
|
export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
|
|
@@ -32,14 +34,14 @@ export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
|
|
|
32
34
|
indoorEnabled?: boolean;
|
|
33
35
|
customMapStyle?: string;
|
|
34
36
|
userInterfaceStyle?: RNUserInterfaceStyle;
|
|
35
|
-
|
|
36
|
-
maxZoomLevel?: number;
|
|
37
|
+
mapZoomConfig?: RNMapZoomConfig;
|
|
37
38
|
mapPadding?: RNMapPadding;
|
|
38
39
|
mapType?: RNMapType;
|
|
39
40
|
markers?: RNMarker[];
|
|
40
41
|
polygons?: RNPolygon[];
|
|
41
42
|
polylines?: RNPolyline[];
|
|
42
43
|
circles?: RNCircle[];
|
|
44
|
+
heatmaps?: RNHeatmap[];
|
|
43
45
|
locationConfig?: RNLocationConfig;
|
|
44
46
|
onMapError?: (error: RNMapErrorCode) => void;
|
|
45
47
|
onMapReady?: (ready: boolean) => void;
|
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
|
|
|
@@ -166,12 +171,34 @@ export type RNCircle = {
|
|
|
166
171
|
pressable?: boolean;
|
|
167
172
|
zIndex?: number;
|
|
168
173
|
center: RNLatLng;
|
|
169
|
-
radius
|
|
174
|
+
radius: number;
|
|
170
175
|
strokeWidth?: number;
|
|
171
176
|
strokeColor?: string;
|
|
172
177
|
fillColor?: string;
|
|
173
178
|
};
|
|
174
179
|
|
|
180
|
+
export type RNHeatmap = {
|
|
181
|
+
id: string;
|
|
182
|
+
pressable?: boolean;
|
|
183
|
+
zIndex?: number;
|
|
184
|
+
weightedData: RNHeatmapPoint[];
|
|
185
|
+
radius?: number;
|
|
186
|
+
opacity?: number;
|
|
187
|
+
gradient?: RNHeatmapGradient;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
export type RNHeatmapPoint = {
|
|
191
|
+
latitude: number;
|
|
192
|
+
longitude: number;
|
|
193
|
+
weight: number;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export type RNHeatmapGradient = {
|
|
197
|
+
colors: string[];
|
|
198
|
+
startPoints: number[];
|
|
199
|
+
colorMapSize: number;
|
|
200
|
+
};
|
|
201
|
+
|
|
175
202
|
export type RNLocationConfig = {
|
|
176
203
|
android?: RNAndroidLocationConfig;
|
|
177
204
|
ios?: RNIOSLocationConfig;
|