react-native-google-maps-plus 1.1.0-dev.2 → 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.
- package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +37 -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/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 +46 -72
- package/ios/GoogleMapViewImpl.swift +94 -212
- package/ios/LocationHandler.swift +2 -10
- package/ios/MapCircleBuilder.swift +23 -8
- 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 +9 -14
- package/ios/extensions/RNCircle+Extension.swift +0 -13
- 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 +2 -3
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +5 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +10 -15
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +2 -4
- package/nitrogen/generated/android/c++/JRNCircle.hpp +4 -4
- package/nitrogen/generated/android/c++/JRNMapZoomConfig.hpp +57 -0
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +2 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +1 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCircle.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapZoomConfig.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewManager.kt +1 -1
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.cpp +13 -13
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +57 -33
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +8 -12
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +4 -9
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +1 -2
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +46 -94
- package/nitrogen/generated/ios/swift/RNCamera.swift +1 -8
- package/nitrogen/generated/ios/swift/RNCircle.swift +5 -17
- package/nitrogen/generated/ios/swift/RNInitialProps.swift +1 -8
- package/nitrogen/generated/ios/swift/RNLocationConfig.swift +2 -16
- package/nitrogen/generated/ios/swift/RNMapZoomConfig.swift +70 -0
- package/nitrogen/generated/ios/swift/RNMarker.swift +2 -16
- package/nitrogen/generated/ios/swift/RNPolygon.swift +11 -15
- package/nitrogen/generated/ios/swift/RNPolyline.swift +11 -15
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +2 -4
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +5 -4
- package/nitrogen/generated/shared/c++/RNCircle.hpp +5 -5
- package/nitrogen/generated/shared/c++/RNMapZoomConfig.hpp +71 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +7 -19
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +2 -2
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +1 -2
- package/package.json +13 -13
- package/src/RNGoogleMapsPlusView.nitro.ts +2 -2
- package/src/types.ts +6 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RNMapZoomConfig.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 <optional>
|
|
24
|
+
|
|
25
|
+
namespace margelo::nitro::rngooglemapsplus {
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A struct which can be represented as a JavaScript object (RNMapZoomConfig).
|
|
29
|
+
*/
|
|
30
|
+
struct RNMapZoomConfig {
|
|
31
|
+
public:
|
|
32
|
+
std::optional<double> min SWIFT_PRIVATE;
|
|
33
|
+
std::optional<double> max SWIFT_PRIVATE;
|
|
34
|
+
|
|
35
|
+
public:
|
|
36
|
+
RNMapZoomConfig() = default;
|
|
37
|
+
explicit RNMapZoomConfig(std::optional<double> min, std::optional<double> max): min(min), max(max) {}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
} // namespace margelo::nitro::rngooglemapsplus
|
|
41
|
+
|
|
42
|
+
namespace margelo::nitro {
|
|
43
|
+
|
|
44
|
+
// C++ RNMapZoomConfig <> JS RNMapZoomConfig (object)
|
|
45
|
+
template <>
|
|
46
|
+
struct JSIConverter<margelo::nitro::rngooglemapsplus::RNMapZoomConfig> final {
|
|
47
|
+
static inline margelo::nitro::rngooglemapsplus::RNMapZoomConfig fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
48
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
49
|
+
return margelo::nitro::rngooglemapsplus::RNMapZoomConfig(
|
|
50
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "min")),
|
|
51
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "max"))
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNMapZoomConfig& arg) {
|
|
55
|
+
jsi::Object obj(runtime);
|
|
56
|
+
obj.setProperty(runtime, "min", JSIConverter<std::optional<double>>::toJSI(runtime, arg.min));
|
|
57
|
+
obj.setProperty(runtime, "max", JSIConverter<std::optional<double>>::toJSI(runtime, arg.max));
|
|
58
|
+
return obj;
|
|
59
|
+
}
|
|
60
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
61
|
+
if (!value.isObject()) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
jsi::Object obj = value.getObject(runtime);
|
|
65
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "min"))) return false;
|
|
66
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "max"))) return false;
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
} // 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
|
-
|
|
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>> {
|
|
@@ -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
|
-
|
|
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("
|
|
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<
|
|
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;
|
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.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.
|
|
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.
|
|
96
|
-
"nitrogen": "0.29.
|
|
95
|
+
"lefthook": "1.13.6",
|
|
96
|
+
"nitrogen": "0.29.8",
|
|
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,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
|
-
|
|
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
|
|
|
@@ -166,7 +171,7 @@ 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;
|