react-native-google-maps-plus 1.8.4-dev.2 → 1.8.4-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 +107 -129
- package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +8 -1
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNUserInterfaceExtension.kt +1 -1
- package/ios/extensions/RNUserInterface+Extension.swift +1 -1
- package/lib/typescript/src/types.d.ts +1 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JRNUserInterfaceStyle.hpp +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNUserInterfaceStyle.kt +1 -1
- package/nitrogen/generated/ios/swift/RNUserInterfaceStyle.swift +4 -4
- package/nitrogen/generated/shared/c++/RNUserInterfaceStyle.hpp +4 -4
- package/package.json +1 -1
- package/src/types.ts +1 -1
package/README.md
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
# react-native-google-maps-plus
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/react-native-google-maps-plus)
|
|
4
|
-
[](https://www.typescriptlang.org/)
|
|
10
|
-
[](https://eslint.org/)
|
|
11
|
-
[](https://reactnative.dev/)
|
|
12
|
-
[](https://developer.android.com/)
|
|
13
|
-
[](https://developer.apple.com/ios/)
|
|
4
|
+
[](https://www.npmjs.com/package/react-native-google-maps-plus)
|
|
5
|
+
[](https://github.com/pinpong/react-native-google-maps-plus/actions/workflows/release.yml)
|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
14
9
|
|
|
15
10
|
React Native wrapper for Android & iOS Google Maps SDK.
|
|
16
11
|
|
|
@@ -22,6 +17,58 @@ React Native wrapper for Android & iOS Google Maps SDK.
|
|
|
22
17
|
yarn add react-native-google-maps-plus react-native-nitro-modules
|
|
23
18
|
```
|
|
24
19
|
|
|
20
|
+
**iOS**
|
|
21
|
+
|
|
22
|
+
Add this to your Podfile only for bare React Native apps.
|
|
23
|
+
(Not required for Expo, handled by the config plugin.)
|
|
24
|
+
|
|
25
|
+
```ruby
|
|
26
|
+
post_install do |installer|
|
|
27
|
+
react_native_post_install(
|
|
28
|
+
installer,
|
|
29
|
+
config[:reactNativePath],
|
|
30
|
+
:mac_catalyst_enabled => false,
|
|
31
|
+
)
|
|
32
|
+
# Force iOS 16+ to avoid deployment target warnings
|
|
33
|
+
installer.pods_project.targets.each do |target|
|
|
34
|
+
target.build_configurations.each do |config|
|
|
35
|
+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# --- SVGKit Patch ---
|
|
40
|
+
require 'fileutils'
|
|
41
|
+
svgkit_path = File.join(installer.sandbox.pod_dir('SVGKit'), 'Source')
|
|
42
|
+
|
|
43
|
+
# node fix
|
|
44
|
+
Dir.glob(File.join(svgkit_path, '**', '*.{h,m}')).each do |file|
|
|
45
|
+
FileUtils.chmod("u+w", file)
|
|
46
|
+
text = File.read(file)
|
|
47
|
+
new_contents = text.gsub('#import "Node.h"', '#import "SVGKit/Node.h"')
|
|
48
|
+
File.open(file, 'w') { |f| f.write(new_contents) }
|
|
49
|
+
# puts "Patched Node import in: #{file}"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# import CSSValue.h
|
|
53
|
+
Dir.glob(File.join(svgkit_path, '**', '*.{h,m}')).each do |file|
|
|
54
|
+
FileUtils.chmod("u+w", file)
|
|
55
|
+
text = File.read(file)
|
|
56
|
+
new_contents = text.gsub('#import "CSSValue.h"', '#import "SVGKit/CSSValue.h"')
|
|
57
|
+
File.open(file, 'w') { |f| f.write(new_contents) }
|
|
58
|
+
# puts "Patched CSSValue import in: #{file}"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# import SVGLength.h
|
|
62
|
+
Dir.glob(File.join(svgkit_path, '**', '*.{h,m}')).each do |file|
|
|
63
|
+
FileUtils.chmod("u+w", file)
|
|
64
|
+
text = File.read(file)
|
|
65
|
+
new_contents = text.gsub('#import "SVGLength.h"', '#import "SVGKit/SVGLength.h"')
|
|
66
|
+
File.open(file, 'w') { |f| f.write(new_contents) }
|
|
67
|
+
# puts "Patched SVGLength import in: #{file}"
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
```
|
|
71
|
+
|
|
25
72
|
### Expo Projects
|
|
26
73
|
|
|
27
74
|
Add your keys to the `app.json`.
|
|
@@ -43,148 +90,79 @@ The config plugin automatically injects them into your native Android and iOS bu
|
|
|
43
90
|
}
|
|
44
91
|
```
|
|
45
92
|
|
|
46
|
-
# Dependencies
|
|
47
|
-
|
|
48
|
-
This package builds on native libraries for SVG rendering and Google Maps integration:
|
|
49
|
-
|
|
50
|
-
- **iOS**: [SVGKit](https://github.com/SVGKit/SVGKit)
|
|
51
|
-
- **Android**: [AndroidSVG](https://bigbadaboom.github.io/androidsvg/)
|
|
52
|
-
- **iOS Maps SDK**: [Google Maps SDK for iOS](https://developers.google.com/maps/documentation/ios-sdk)
|
|
53
|
-
- **Android Maps SDK**: [Google Maps SDK for Android](https://developers.google.com/maps/documentation/android-sdk)
|
|
54
|
-
- **Maps Utility Libraries**: [Google Maps Utils for iOS](https://developers.google.com/maps/documentation/ios-sdk/utility) and [Google Maps Utils for Android](https://developers.google.com/maps/documentation/android-sdk/utility)
|
|
55
|
-
|
|
56
|
-
These are automatically linked when you install the package, but you may need to clean/rebuild your native projects after first install.
|
|
57
|
-
|
|
58
93
|
## Setup API Key
|
|
59
94
|
|
|
60
95
|
You will need a valid **Google Maps API Key** from the [Google Cloud Console](https://console.cloud.google.com/).
|
|
61
96
|
|
|
62
97
|
### Android
|
|
63
98
|
|
|
64
|
-
|
|
99
|
+
**Note:** These instructions apply to **bare React Native apps only**.
|
|
100
|
+
Expo projects should use the config plugin instead (see Expo section above).
|
|
65
101
|
|
|
66
|
-
|
|
102
|
+
See the official [Google Maps Android SDK configuration guide](https://developers.google.com/maps/documentation/android-sdk/config#step_3_add_your_api_key_to_the_project) for more details.
|
|
67
103
|
|
|
68
104
|
### iOS
|
|
69
105
|
|
|
70
|
-
|
|
106
|
+
**Note:** These instructions apply to **bare React Native apps only**.
|
|
107
|
+
Expo projects should use the config plugin instead (see Expo section above).
|
|
71
108
|
|
|
72
|
-
|
|
109
|
+
See the official [Google Maps iOS SDK configuration guide](https://developers.google.com/maps/documentation/ios-sdk/config#get-key) for more details.
|
|
73
110
|
|
|
74
|
-
|
|
75
|
-
MAPS_API_KEY=YOUR_IOS_MAPS_API_KEY
|
|
76
|
-
```
|
|
111
|
+
## Dependencies & Native Documentation
|
|
77
112
|
|
|
78
|
-
|
|
113
|
+
This package is React Native wrapper around the official Google Maps SDKs.
|
|
114
|
+
For full API behavior, configuration options, and feature reference, please consult the native documentation:
|
|
79
115
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
```
|
|
116
|
+
- **iOS Google Maps SDK**
|
|
117
|
+
https://developers.google.com/maps/documentation/ios-sdk
|
|
83
118
|
|
|
84
|
-
|
|
119
|
+
- **Android Google Maps SDK**
|
|
120
|
+
https://developers.google.com/maps/documentation/android-sdk
|
|
85
121
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
```
|
|
122
|
+
- **Maps Utility Libraries (iOS & Android)**
|
|
123
|
+
https://developers.google.com/maps/documentation/ios-sdk/utility
|
|
124
|
+
https://developers.google.com/maps/documentation/android-sdk/utility
|
|
90
125
|
|
|
91
|
-
|
|
126
|
+
- **SVG Rendering** (used for custom marker icons)
|
|
127
|
+
- iOS: https://github.com/SVGKit/SVGKit
|
|
128
|
+
- Android: https://bigbadaboom.github.io/androidsvg/
|
|
92
129
|
|
|
93
|
-
|
|
94
|
-
|
|
130
|
+
These libraries are automatically linked during installation.
|
|
131
|
+
If you encounter build issues, try cleaning and rebuilding your native project.
|
|
95
132
|
|
|
96
|
-
|
|
97
|
-
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
98
|
-
func application(_ application: UIApplication,
|
|
99
|
-
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
|
100
|
-
if let apiKey = Bundle.main.object(forInfoDictionaryKey: "MAPS_API_KEY") as? String {
|
|
101
|
-
GMSServices.provideAPIKey(apiKey)
|
|
102
|
-
}
|
|
103
|
-
return true
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
---
|
|
133
|
+
> **Note:** This package follows the native SDKs closely. Props and behavior match the underlying Google Maps APIs whenever possible.
|
|
109
134
|
|
|
110
135
|
## Usage
|
|
111
136
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
# Force iOS 16+ to avoid deployment target warnings
|
|
140
|
-
installer.pods_project.targets.each do |target|
|
|
141
|
-
target.build_configurations.each do |config|
|
|
142
|
-
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
|
|
143
|
-
end
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
# --- SVGKit Patch ---
|
|
147
|
-
require 'fileutils'
|
|
148
|
-
svgkit_path = File.join(installer.sandbox.pod_dir('SVGKit'), 'Source')
|
|
149
|
-
|
|
150
|
-
# node fix
|
|
151
|
-
Dir.glob(File.join(svgkit_path, '**', '*.{h,m}')).each do |file|
|
|
152
|
-
FileUtils.chmod("u+w", file)
|
|
153
|
-
text = File.read(file)
|
|
154
|
-
new_contents = text.gsub('#import "Node.h"', '#import "SVGKit/Node.h"')
|
|
155
|
-
File.open(file, 'w') { |f| f.write(new_contents) }
|
|
156
|
-
# puts "Patched Node import in: #{file}"
|
|
157
|
-
end
|
|
158
|
-
|
|
159
|
-
# import CSSValue.h
|
|
160
|
-
Dir.glob(File.join(svgkit_path, '**', '*.{h,m}')).each do |file|
|
|
161
|
-
FileUtils.chmod("u+w", file)
|
|
162
|
-
text = File.read(file)
|
|
163
|
-
new_contents = text.gsub('#import "CSSValue.h"', '#import "SVGKit/CSSValue.h"')
|
|
164
|
-
File.open(file, 'w') { |f| f.write(new_contents) }
|
|
165
|
-
# puts "Patched CSSValue import in: #{file}"
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
# import SVGLength.h
|
|
169
|
-
Dir.glob(File.join(svgkit_path, '**', '*.{h,m}')).each do |file|
|
|
170
|
-
FileUtils.chmod("u+w", file)
|
|
171
|
-
text = File.read(file)
|
|
172
|
-
new_contents = text.gsub('#import "SVGLength.h"', '#import "SVGKit/SVGLength.h"')
|
|
173
|
-
File.open(file, 'w') { |f| f.write(new_contents) }
|
|
174
|
-
# puts "Patched SVGLength import in: #{file}"
|
|
175
|
-
end
|
|
176
|
-
end
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
After applying this, run:
|
|
180
|
-
|
|
181
|
-
```sh
|
|
182
|
-
cd ios && pod install --repo-update
|
|
183
|
-
```
|
|
137
|
+
Basic map:
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
import React from 'react';
|
|
141
|
+
import { GoogleMapsView } from 'react-native-google-maps-plus';
|
|
142
|
+
|
|
143
|
+
export default function App() {
|
|
144
|
+
return (
|
|
145
|
+
<GoogleMapsView
|
|
146
|
+
style={{ flex: 1 }}
|
|
147
|
+
initialProps={{
|
|
148
|
+
camera: {
|
|
149
|
+
center: { latitude: 37.7749, longitude: -122.4194 },
|
|
150
|
+
zoom: 12,
|
|
151
|
+
},
|
|
152
|
+
}}
|
|
153
|
+
markers={[
|
|
154
|
+
{
|
|
155
|
+
id: '1',
|
|
156
|
+
zIndex: 1,
|
|
157
|
+
coordinate: { latitude: 37.7749, longitude: -122.4194 },
|
|
158
|
+
},
|
|
159
|
+
]}
|
|
160
|
+
/>
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
```
|
|
184
164
|
|
|
185
|
-
|
|
186
|
-
- Check that your API key has **Maps SDK for Android/iOS** enabled in Google Cloud Console.
|
|
187
|
-
- Make sure the key is not restricted to wrong bundle IDs or SHA1 fingerprints.
|
|
165
|
+
Check out the example app in the [example](./example) folder.
|
|
188
166
|
|
|
189
167
|
## Contributing
|
|
190
168
|
|
|
@@ -345,7 +345,14 @@ class GoogleMapsViewImpl(
|
|
|
345
345
|
var userInterfaceStyle: Int? = null
|
|
346
346
|
set(value) {
|
|
347
347
|
field = value
|
|
348
|
-
onUi {
|
|
348
|
+
onUi {
|
|
349
|
+
try {
|
|
350
|
+
// / not supported when liteMode enabled on latest renderer
|
|
351
|
+
googleMap?.mapColorScheme = value ?: MapColorScheme.FOLLOW_SYSTEM
|
|
352
|
+
} catch (_: UnsupportedOperationException) {
|
|
353
|
+
// / ignore
|
|
354
|
+
}
|
|
355
|
+
}
|
|
349
356
|
}
|
|
350
357
|
|
|
351
358
|
var mapZoomConfig: RNMapZoomConfig? = null
|
|
@@ -7,6 +7,6 @@ fun RNUserInterfaceStyle?.toMapColorScheme(): Int? =
|
|
|
7
7
|
when (this) {
|
|
8
8
|
RNUserInterfaceStyle.LIGHT -> MapColorScheme.LIGHT
|
|
9
9
|
RNUserInterfaceStyle.DARK -> MapColorScheme.DARK
|
|
10
|
-
RNUserInterfaceStyle.
|
|
10
|
+
RNUserInterfaceStyle.SYSTEM -> MapColorScheme.FOLLOW_SYSTEM
|
|
11
11
|
null -> null
|
|
12
12
|
}
|
|
@@ -49,7 +49,7 @@ export type RNMapPadding = {
|
|
|
49
49
|
right: number;
|
|
50
50
|
};
|
|
51
51
|
export type RNMapType = 'none' | 'normal' | 'hybrid' | 'satellite' | 'terrain';
|
|
52
|
-
export type RNUserInterfaceStyle = 'light' | 'dark' | '
|
|
52
|
+
export type RNUserInterfaceStyle = 'light' | 'dark' | 'system';
|
|
53
53
|
export type RNFeatureType = string;
|
|
54
54
|
export type RNElementType = string;
|
|
55
55
|
export type RNVisibility = string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAE7D,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,2BAA2B,CAAC,CAAC;AAExE,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,QAAQ,GAA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,CAAC,EAAE,MAAM,CAAC;IAC9B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AACF,MAAM,MAAM,aAAa,GAAG;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,mBAAmB;IAC7B,iBAAiB,IAAI;IACrB,oBAAoB,IAAI;IACxB,OAAO,IAAI;IACX,0BAA0B,IAAI;IAC9B,sBAAsB,IAAI;IAC1B,cAAc,KAAK;CACpB;AAED,oBAAY,cAAc;IACxB,qBAAqB,IAAI;IACzB,qBAAqB,IAAI;IACzB,sBAAsB,IAAI;IAC1B,sBAAsB,IAAI;IAC1B,6BAA6B,IAAI;IACjC,qBAAqB,IAAI;IACzB,OAAO,IAAI;CACZ"}
|
|
@@ -43,15 +43,15 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
43
43
|
static const auto clazz = javaClassStatic();
|
|
44
44
|
static const auto fieldLIGHT = clazz->getStaticField<JRNUserInterfaceStyle>("LIGHT");
|
|
45
45
|
static const auto fieldDARK = clazz->getStaticField<JRNUserInterfaceStyle>("DARK");
|
|
46
|
-
static const auto
|
|
46
|
+
static const auto fieldSYSTEM = clazz->getStaticField<JRNUserInterfaceStyle>("SYSTEM");
|
|
47
47
|
|
|
48
48
|
switch (value) {
|
|
49
49
|
case RNUserInterfaceStyle::LIGHT:
|
|
50
50
|
return clazz->getStaticFieldValue(fieldLIGHT);
|
|
51
51
|
case RNUserInterfaceStyle::DARK:
|
|
52
52
|
return clazz->getStaticFieldValue(fieldDARK);
|
|
53
|
-
case RNUserInterfaceStyle::
|
|
54
|
-
return clazz->getStaticFieldValue(
|
|
53
|
+
case RNUserInterfaceStyle::SYSTEM:
|
|
54
|
+
return clazz->getStaticFieldValue(fieldSYSTEM);
|
|
55
55
|
default:
|
|
56
56
|
std::string stringValue = std::to_string(static_cast<int>(value));
|
|
57
57
|
throw std::invalid_argument("Invalid enum value (" + stringValue + "!");
|
|
@@ -21,8 +21,8 @@ public extension RNUserInterfaceStyle {
|
|
|
21
21
|
self = .light
|
|
22
22
|
case "dark":
|
|
23
23
|
self = .dark
|
|
24
|
-
case "
|
|
25
|
-
self = .
|
|
24
|
+
case "system":
|
|
25
|
+
self = .system
|
|
26
26
|
default:
|
|
27
27
|
return nil
|
|
28
28
|
}
|
|
@@ -37,8 +37,8 @@ public extension RNUserInterfaceStyle {
|
|
|
37
37
|
return "light"
|
|
38
38
|
case .dark:
|
|
39
39
|
return "dark"
|
|
40
|
-
case .
|
|
41
|
-
return "
|
|
40
|
+
case .system:
|
|
41
|
+
return "system"
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -31,7 +31,7 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
31
31
|
enum class RNUserInterfaceStyle {
|
|
32
32
|
LIGHT SWIFT_NAME(light) = 0,
|
|
33
33
|
DARK SWIFT_NAME(dark) = 1,
|
|
34
|
-
|
|
34
|
+
SYSTEM SWIFT_NAME(system) = 2,
|
|
35
35
|
} CLOSED_ENUM;
|
|
36
36
|
|
|
37
37
|
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -46,7 +46,7 @@ namespace margelo::nitro {
|
|
|
46
46
|
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
47
|
case hashString("light"): return margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle::LIGHT;
|
|
48
48
|
case hashString("dark"): return margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle::DARK;
|
|
49
|
-
case hashString("
|
|
49
|
+
case hashString("system"): return margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle::SYSTEM;
|
|
50
50
|
default: [[unlikely]]
|
|
51
51
|
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum RNUserInterfaceStyle - invalid value!");
|
|
52
52
|
}
|
|
@@ -55,7 +55,7 @@ namespace margelo::nitro {
|
|
|
55
55
|
switch (arg) {
|
|
56
56
|
case margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle::LIGHT: return JSIConverter<std::string>::toJSI(runtime, "light");
|
|
57
57
|
case margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle::DARK: return JSIConverter<std::string>::toJSI(runtime, "dark");
|
|
58
|
-
case margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle::
|
|
58
|
+
case margelo::nitro::rngooglemapsplus::RNUserInterfaceStyle::SYSTEM: return JSIConverter<std::string>::toJSI(runtime, "system");
|
|
59
59
|
default: [[unlikely]]
|
|
60
60
|
throw std::invalid_argument("Cannot convert RNUserInterfaceStyle to JS - invalid value: "
|
|
61
61
|
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
@@ -69,7 +69,7 @@ namespace margelo::nitro {
|
|
|
69
69
|
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
70
70
|
case hashString("light"):
|
|
71
71
|
case hashString("dark"):
|
|
72
|
-
case hashString("
|
|
72
|
+
case hashString("system"):
|
|
73
73
|
return true;
|
|
74
74
|
default:
|
|
75
75
|
return false;
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -61,7 +61,7 @@ export type RNMapPadding = {
|
|
|
61
61
|
|
|
62
62
|
export type RNMapType = 'none' | 'normal' | 'hybrid' | 'satellite' | 'terrain';
|
|
63
63
|
|
|
64
|
-
export type RNUserInterfaceStyle = 'light' | 'dark' | '
|
|
64
|
+
export type RNUserInterfaceStyle = 'light' | 'dark' | 'system';
|
|
65
65
|
|
|
66
66
|
export type RNFeatureType = string;
|
|
67
67
|
|