react-native-google-maps-plus 1.7.0-dev.4 → 1.7.0-dev.6
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 +54 -23
- package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +3 -8
- package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +25 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngBoundsExtension.kt +10 -0
- package/android/src/main/java/com/rngooglemapsplus/extensions/RNLatLngBoundsExtension.kt +2 -8
- package/android/src/main/java/com/rngooglemapsplus/extensions/VisibleRegionExtension.kt +13 -0
- package/ios/GoogleMapViewImpl.swift +59 -27
- package/ios/RNGoogleMapsPlusView.swift +20 -0
- package/ios/extensions/GMSCoordinateBounds+Extension.swift +4 -13
- package/ios/extensions/GMSVisibleRegion+Extension.swift +14 -0
- package/ios/extensions/RNLatLngBounds+Extension.swift +4 -4
- package/lib/module/types.js.map +1 -1
- package/lib/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +5 -0
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts +5 -0
- package/lib/typescript/src/RNGoogleMapsPlusView.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +7 -5
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +2 -0
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +99 -4
- package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.hpp +10 -0
- package/nitrogen/generated/android/c++/JRNLatLngBounds.hpp +8 -8
- package/nitrogen/generated/android/c++/JRNRegion.hpp +23 -13
- package/nitrogen/generated/android/c++/views/JHybridRNGoogleMapsPlusViewStateUpdater.cpp +20 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +70 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt +4 -4
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNRegion.kt +11 -5
- package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +15 -0
- package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +35 -0
- package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +25 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec.swift +5 -0
- package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +178 -0
- package/nitrogen/generated/ios/swift/RNLatLngBounds.swift +8 -8
- package/nitrogen/generated/ios/swift/RNRegion.swift +33 -11
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.cpp +10 -0
- package/nitrogen/generated/shared/c++/HybridRNGoogleMapsPlusViewSpec.hpp +10 -0
- package/nitrogen/generated/shared/c++/RNLatLngBounds.hpp +9 -9
- package/nitrogen/generated/shared/c++/RNRegion.hpp +24 -13
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.cpp +60 -0
- package/nitrogen/generated/shared/c++/views/HybridRNGoogleMapsPlusViewComponent.hpp +5 -0
- package/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +5 -0
- package/package.json +1 -1
- package/src/RNGoogleMapsPlusView.nitro.ts +5 -0
- package/src/types.ts +7 -5
- package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngBounds.kt +0 -15
- /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSize.kt → RNSizeExtension.kt} +0 -0
- /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSnapshotFormat.kt → RNSnapshotFormatExtension.kt} +0 -0
- /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSnapshotResultType.kt → RNSnapshotResultTypeExtension.kt} +0 -0
|
@@ -1141,6 +1141,184 @@ open class HybridRNGoogleMapsPlusViewSpec_cxx {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
1143
|
|
|
1144
|
+
public final var onInfoWindowPress: bridge.std__optional_std__function_void_const_std__optional_std__string______id______ {
|
|
1145
|
+
@inline(__always)
|
|
1146
|
+
get {
|
|
1147
|
+
return { () -> bridge.std__optional_std__function_void_const_std__optional_std__string______id______ in
|
|
1148
|
+
if let __unwrappedValue = self.__implementation.onInfoWindowPress {
|
|
1149
|
+
return bridge.create_std__optional_std__function_void_const_std__optional_std__string______id______({ () -> bridge.Func_void_std__optional_std__string_ in
|
|
1150
|
+
let __closureWrapper = Func_void_std__optional_std__string_(__unwrappedValue)
|
|
1151
|
+
return bridge.create_Func_void_std__optional_std__string_(__closureWrapper.toUnsafe())
|
|
1152
|
+
}())
|
|
1153
|
+
} else {
|
|
1154
|
+
return .init()
|
|
1155
|
+
}
|
|
1156
|
+
}()
|
|
1157
|
+
}
|
|
1158
|
+
@inline(__always)
|
|
1159
|
+
set {
|
|
1160
|
+
self.__implementation.onInfoWindowPress = { () -> ((_ id: String?) -> Void)? in
|
|
1161
|
+
if bridge.has_value_std__optional_std__function_void_const_std__optional_std__string______id______(newValue) {
|
|
1162
|
+
let __unwrapped = bridge.get_std__optional_std__function_void_const_std__optional_std__string______id______(newValue)
|
|
1163
|
+
return { () -> (String?) -> Void in
|
|
1164
|
+
let __wrappedFunction = bridge.wrap_Func_void_std__optional_std__string_(__unwrapped)
|
|
1165
|
+
return { (__id: String?) -> Void in
|
|
1166
|
+
__wrappedFunction.call({ () -> bridge.std__optional_std__string_ in
|
|
1167
|
+
if let __unwrappedValue = __id {
|
|
1168
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
1169
|
+
} else {
|
|
1170
|
+
return .init()
|
|
1171
|
+
}
|
|
1172
|
+
}())
|
|
1173
|
+
}
|
|
1174
|
+
}()
|
|
1175
|
+
} else {
|
|
1176
|
+
return nil
|
|
1177
|
+
}
|
|
1178
|
+
}()
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
public final var onInfoWindowClose: bridge.std__optional_std__function_void_const_std__optional_std__string______id______ {
|
|
1183
|
+
@inline(__always)
|
|
1184
|
+
get {
|
|
1185
|
+
return { () -> bridge.std__optional_std__function_void_const_std__optional_std__string______id______ in
|
|
1186
|
+
if let __unwrappedValue = self.__implementation.onInfoWindowClose {
|
|
1187
|
+
return bridge.create_std__optional_std__function_void_const_std__optional_std__string______id______({ () -> bridge.Func_void_std__optional_std__string_ in
|
|
1188
|
+
let __closureWrapper = Func_void_std__optional_std__string_(__unwrappedValue)
|
|
1189
|
+
return bridge.create_Func_void_std__optional_std__string_(__closureWrapper.toUnsafe())
|
|
1190
|
+
}())
|
|
1191
|
+
} else {
|
|
1192
|
+
return .init()
|
|
1193
|
+
}
|
|
1194
|
+
}()
|
|
1195
|
+
}
|
|
1196
|
+
@inline(__always)
|
|
1197
|
+
set {
|
|
1198
|
+
self.__implementation.onInfoWindowClose = { () -> ((_ id: String?) -> Void)? in
|
|
1199
|
+
if bridge.has_value_std__optional_std__function_void_const_std__optional_std__string______id______(newValue) {
|
|
1200
|
+
let __unwrapped = bridge.get_std__optional_std__function_void_const_std__optional_std__string______id______(newValue)
|
|
1201
|
+
return { () -> (String?) -> Void in
|
|
1202
|
+
let __wrappedFunction = bridge.wrap_Func_void_std__optional_std__string_(__unwrapped)
|
|
1203
|
+
return { (__id: String?) -> Void in
|
|
1204
|
+
__wrappedFunction.call({ () -> bridge.std__optional_std__string_ in
|
|
1205
|
+
if let __unwrappedValue = __id {
|
|
1206
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
1207
|
+
} else {
|
|
1208
|
+
return .init()
|
|
1209
|
+
}
|
|
1210
|
+
}())
|
|
1211
|
+
}
|
|
1212
|
+
}()
|
|
1213
|
+
} else {
|
|
1214
|
+
return nil
|
|
1215
|
+
}
|
|
1216
|
+
}()
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
public final var onInfoWindowLongPress: bridge.std__optional_std__function_void_const_std__optional_std__string______id______ {
|
|
1221
|
+
@inline(__always)
|
|
1222
|
+
get {
|
|
1223
|
+
return { () -> bridge.std__optional_std__function_void_const_std__optional_std__string______id______ in
|
|
1224
|
+
if let __unwrappedValue = self.__implementation.onInfoWindowLongPress {
|
|
1225
|
+
return bridge.create_std__optional_std__function_void_const_std__optional_std__string______id______({ () -> bridge.Func_void_std__optional_std__string_ in
|
|
1226
|
+
let __closureWrapper = Func_void_std__optional_std__string_(__unwrappedValue)
|
|
1227
|
+
return bridge.create_Func_void_std__optional_std__string_(__closureWrapper.toUnsafe())
|
|
1228
|
+
}())
|
|
1229
|
+
} else {
|
|
1230
|
+
return .init()
|
|
1231
|
+
}
|
|
1232
|
+
}()
|
|
1233
|
+
}
|
|
1234
|
+
@inline(__always)
|
|
1235
|
+
set {
|
|
1236
|
+
self.__implementation.onInfoWindowLongPress = { () -> ((_ id: String?) -> Void)? in
|
|
1237
|
+
if bridge.has_value_std__optional_std__function_void_const_std__optional_std__string______id______(newValue) {
|
|
1238
|
+
let __unwrapped = bridge.get_std__optional_std__function_void_const_std__optional_std__string______id______(newValue)
|
|
1239
|
+
return { () -> (String?) -> Void in
|
|
1240
|
+
let __wrappedFunction = bridge.wrap_Func_void_std__optional_std__string_(__unwrapped)
|
|
1241
|
+
return { (__id: String?) -> Void in
|
|
1242
|
+
__wrappedFunction.call({ () -> bridge.std__optional_std__string_ in
|
|
1243
|
+
if let __unwrappedValue = __id {
|
|
1244
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
1245
|
+
} else {
|
|
1246
|
+
return .init()
|
|
1247
|
+
}
|
|
1248
|
+
}())
|
|
1249
|
+
}
|
|
1250
|
+
}()
|
|
1251
|
+
} else {
|
|
1252
|
+
return nil
|
|
1253
|
+
}
|
|
1254
|
+
}()
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
public final var onMyLocationPress: bridge.std__optional_std__function_void_const_RNLocation_____location______ {
|
|
1259
|
+
@inline(__always)
|
|
1260
|
+
get {
|
|
1261
|
+
return { () -> bridge.std__optional_std__function_void_const_RNLocation_____location______ in
|
|
1262
|
+
if let __unwrappedValue = self.__implementation.onMyLocationPress {
|
|
1263
|
+
return bridge.create_std__optional_std__function_void_const_RNLocation_____location______({ () -> bridge.Func_void_RNLocation in
|
|
1264
|
+
let __closureWrapper = Func_void_RNLocation(__unwrappedValue)
|
|
1265
|
+
return bridge.create_Func_void_RNLocation(__closureWrapper.toUnsafe())
|
|
1266
|
+
}())
|
|
1267
|
+
} else {
|
|
1268
|
+
return .init()
|
|
1269
|
+
}
|
|
1270
|
+
}()
|
|
1271
|
+
}
|
|
1272
|
+
@inline(__always)
|
|
1273
|
+
set {
|
|
1274
|
+
self.__implementation.onMyLocationPress = { () -> ((_ location: RNLocation) -> Void)? in
|
|
1275
|
+
if bridge.has_value_std__optional_std__function_void_const_RNLocation_____location______(newValue) {
|
|
1276
|
+
let __unwrapped = bridge.get_std__optional_std__function_void_const_RNLocation_____location______(newValue)
|
|
1277
|
+
return { () -> (RNLocation) -> Void in
|
|
1278
|
+
let __wrappedFunction = bridge.wrap_Func_void_RNLocation(__unwrapped)
|
|
1279
|
+
return { (__location: RNLocation) -> Void in
|
|
1280
|
+
__wrappedFunction.call(__location)
|
|
1281
|
+
}
|
|
1282
|
+
}()
|
|
1283
|
+
} else {
|
|
1284
|
+
return nil
|
|
1285
|
+
}
|
|
1286
|
+
}()
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
public final var onMyLocationButtonPress: bridge.std__optional_std__function_void_bool____pressed______ {
|
|
1291
|
+
@inline(__always)
|
|
1292
|
+
get {
|
|
1293
|
+
return { () -> bridge.std__optional_std__function_void_bool____pressed______ in
|
|
1294
|
+
if let __unwrappedValue = self.__implementation.onMyLocationButtonPress {
|
|
1295
|
+
return bridge.create_std__optional_std__function_void_bool____pressed______({ () -> bridge.Func_void_bool in
|
|
1296
|
+
let __closureWrapper = Func_void_bool(__unwrappedValue)
|
|
1297
|
+
return bridge.create_Func_void_bool(__closureWrapper.toUnsafe())
|
|
1298
|
+
}())
|
|
1299
|
+
} else {
|
|
1300
|
+
return .init()
|
|
1301
|
+
}
|
|
1302
|
+
}()
|
|
1303
|
+
}
|
|
1304
|
+
@inline(__always)
|
|
1305
|
+
set {
|
|
1306
|
+
self.__implementation.onMyLocationButtonPress = { () -> ((_ pressed: Bool) -> Void)? in
|
|
1307
|
+
if bridge.has_value_std__optional_std__function_void_bool____pressed______(newValue) {
|
|
1308
|
+
let __unwrapped = bridge.get_std__optional_std__function_void_bool____pressed______(newValue)
|
|
1309
|
+
return { () -> (Bool) -> Void in
|
|
1310
|
+
let __wrappedFunction = bridge.wrap_Func_void_bool(__unwrapped)
|
|
1311
|
+
return { (__pressed: Bool) -> Void in
|
|
1312
|
+
__wrappedFunction.call(__pressed)
|
|
1313
|
+
}
|
|
1314
|
+
}()
|
|
1315
|
+
} else {
|
|
1316
|
+
return nil
|
|
1317
|
+
}
|
|
1318
|
+
}()
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1144
1322
|
public final var onCameraChangeStart: bridge.std__optional_std__function_void_const_RNRegion_____region_____const_RNCamera_____camera_____bool____isGesture______ {
|
|
1145
1323
|
@inline(__always)
|
|
1146
1324
|
get {
|
|
@@ -18,29 +18,29 @@ public extension RNLatLngBounds {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `RNLatLngBounds`.
|
|
20
20
|
*/
|
|
21
|
-
init(
|
|
22
|
-
self.init(
|
|
21
|
+
init(southwest: RNLatLng, northeast: RNLatLng) {
|
|
22
|
+
self.init(southwest, northeast)
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var southwest: RNLatLng {
|
|
26
26
|
@inline(__always)
|
|
27
27
|
get {
|
|
28
|
-
return self.
|
|
28
|
+
return self.__southwest
|
|
29
29
|
}
|
|
30
30
|
@inline(__always)
|
|
31
31
|
set {
|
|
32
|
-
self.
|
|
32
|
+
self.__southwest = newValue
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var northeast: RNLatLng {
|
|
37
37
|
@inline(__always)
|
|
38
38
|
get {
|
|
39
|
-
return self.
|
|
39
|
+
return self.__northeast
|
|
40
40
|
}
|
|
41
41
|
@inline(__always)
|
|
42
42
|
set {
|
|
43
|
-
self.
|
|
43
|
+
self.__northeast = newValue
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -18,40 +18,62 @@ public extension RNRegion {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `RNRegion`.
|
|
20
20
|
*/
|
|
21
|
-
init(
|
|
22
|
-
self.init(
|
|
21
|
+
init(nearLeft: RNLatLng, nearRight: RNLatLng, farLeft: RNLatLng, farRight: RNLatLng, latLngBounds: RNLatLngBounds) {
|
|
22
|
+
self.init(nearLeft, nearRight, farLeft, farRight, latLngBounds)
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var nearLeft: RNLatLng {
|
|
26
26
|
@inline(__always)
|
|
27
27
|
get {
|
|
28
|
-
return self.
|
|
28
|
+
return self.__nearLeft
|
|
29
29
|
}
|
|
30
30
|
@inline(__always)
|
|
31
31
|
set {
|
|
32
|
-
self.
|
|
32
|
+
self.__nearLeft = newValue
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var nearRight: RNLatLng {
|
|
37
37
|
@inline(__always)
|
|
38
38
|
get {
|
|
39
|
-
return self.
|
|
39
|
+
return self.__nearRight
|
|
40
40
|
}
|
|
41
41
|
@inline(__always)
|
|
42
42
|
set {
|
|
43
|
-
self.
|
|
43
|
+
self.__nearRight = newValue
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var farLeft: RNLatLng {
|
|
48
48
|
@inline(__always)
|
|
49
49
|
get {
|
|
50
|
-
return self.
|
|
50
|
+
return self.__farLeft
|
|
51
51
|
}
|
|
52
52
|
@inline(__always)
|
|
53
53
|
set {
|
|
54
|
-
self.
|
|
54
|
+
self.__farLeft = newValue
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var farRight: RNLatLng {
|
|
59
|
+
@inline(__always)
|
|
60
|
+
get {
|
|
61
|
+
return self.__farRight
|
|
62
|
+
}
|
|
63
|
+
@inline(__always)
|
|
64
|
+
set {
|
|
65
|
+
self.__farRight = newValue
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
var latLngBounds: RNLatLngBounds {
|
|
70
|
+
@inline(__always)
|
|
71
|
+
get {
|
|
72
|
+
return self.__latLngBounds
|
|
73
|
+
}
|
|
74
|
+
@inline(__always)
|
|
75
|
+
set {
|
|
76
|
+
self.__latLngBounds = newValue
|
|
55
77
|
}
|
|
56
78
|
}
|
|
57
79
|
}
|
|
@@ -86,6 +86,16 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
86
86
|
prototype.registerHybridSetter("onIndoorBuildingFocused", &HybridRNGoogleMapsPlusViewSpec::setOnIndoorBuildingFocused);
|
|
87
87
|
prototype.registerHybridGetter("onIndoorLevelActivated", &HybridRNGoogleMapsPlusViewSpec::getOnIndoorLevelActivated);
|
|
88
88
|
prototype.registerHybridSetter("onIndoorLevelActivated", &HybridRNGoogleMapsPlusViewSpec::setOnIndoorLevelActivated);
|
|
89
|
+
prototype.registerHybridGetter("onInfoWindowPress", &HybridRNGoogleMapsPlusViewSpec::getOnInfoWindowPress);
|
|
90
|
+
prototype.registerHybridSetter("onInfoWindowPress", &HybridRNGoogleMapsPlusViewSpec::setOnInfoWindowPress);
|
|
91
|
+
prototype.registerHybridGetter("onInfoWindowClose", &HybridRNGoogleMapsPlusViewSpec::getOnInfoWindowClose);
|
|
92
|
+
prototype.registerHybridSetter("onInfoWindowClose", &HybridRNGoogleMapsPlusViewSpec::setOnInfoWindowClose);
|
|
93
|
+
prototype.registerHybridGetter("onInfoWindowLongPress", &HybridRNGoogleMapsPlusViewSpec::getOnInfoWindowLongPress);
|
|
94
|
+
prototype.registerHybridSetter("onInfoWindowLongPress", &HybridRNGoogleMapsPlusViewSpec::setOnInfoWindowLongPress);
|
|
95
|
+
prototype.registerHybridGetter("onMyLocationPress", &HybridRNGoogleMapsPlusViewSpec::getOnMyLocationPress);
|
|
96
|
+
prototype.registerHybridSetter("onMyLocationPress", &HybridRNGoogleMapsPlusViewSpec::setOnMyLocationPress);
|
|
97
|
+
prototype.registerHybridGetter("onMyLocationButtonPress", &HybridRNGoogleMapsPlusViewSpec::getOnMyLocationButtonPress);
|
|
98
|
+
prototype.registerHybridSetter("onMyLocationButtonPress", &HybridRNGoogleMapsPlusViewSpec::setOnMyLocationButtonPress);
|
|
89
99
|
prototype.registerHybridGetter("onCameraChangeStart", &HybridRNGoogleMapsPlusViewSpec::getOnCameraChangeStart);
|
|
90
100
|
prototype.registerHybridSetter("onCameraChangeStart", &HybridRNGoogleMapsPlusViewSpec::setOnCameraChangeStart);
|
|
91
101
|
prototype.registerHybridGetter("onCameraChange", &HybridRNGoogleMapsPlusViewSpec::getOnCameraChange);
|
|
@@ -194,6 +194,16 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
194
194
|
virtual void setOnIndoorBuildingFocused(const std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>& onIndoorBuildingFocused) = 0;
|
|
195
195
|
virtual std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>> getOnIndoorLevelActivated() = 0;
|
|
196
196
|
virtual void setOnIndoorLevelActivated(const std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>& onIndoorLevelActivated) = 0;
|
|
197
|
+
virtual std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnInfoWindowPress() = 0;
|
|
198
|
+
virtual void setOnInfoWindowPress(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowPress) = 0;
|
|
199
|
+
virtual std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnInfoWindowClose() = 0;
|
|
200
|
+
virtual void setOnInfoWindowClose(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowClose) = 0;
|
|
201
|
+
virtual std::optional<std::function<void(const std::optional<std::string>& /* id */)>> getOnInfoWindowLongPress() = 0;
|
|
202
|
+
virtual void setOnInfoWindowLongPress(const std::optional<std::function<void(const std::optional<std::string>& /* id */)>>& onInfoWindowLongPress) = 0;
|
|
203
|
+
virtual std::optional<std::function<void(const RNLocation& /* location */)>> getOnMyLocationPress() = 0;
|
|
204
|
+
virtual void setOnMyLocationPress(const std::optional<std::function<void(const RNLocation& /* location */)>>& onMyLocationPress) = 0;
|
|
205
|
+
virtual std::optional<std::function<void(bool /* pressed */)>> getOnMyLocationButtonPress() = 0;
|
|
206
|
+
virtual void setOnMyLocationButtonPress(const std::optional<std::function<void(bool /* pressed */)>>& onMyLocationButtonPress) = 0;
|
|
197
207
|
virtual std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChangeStart() = 0;
|
|
198
208
|
virtual void setOnCameraChangeStart(const std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>& onCameraChangeStart) = 0;
|
|
199
209
|
virtual std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>> getOnCameraChange() = 0;
|
|
@@ -35,12 +35,12 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
35
35
|
*/
|
|
36
36
|
struct RNLatLngBounds {
|
|
37
37
|
public:
|
|
38
|
-
RNLatLng
|
|
39
|
-
RNLatLng
|
|
38
|
+
RNLatLng southwest SWIFT_PRIVATE;
|
|
39
|
+
RNLatLng northeast SWIFT_PRIVATE;
|
|
40
40
|
|
|
41
41
|
public:
|
|
42
42
|
RNLatLngBounds() = default;
|
|
43
|
-
explicit RNLatLngBounds(RNLatLng
|
|
43
|
+
explicit RNLatLngBounds(RNLatLng southwest, RNLatLng northeast): southwest(southwest), northeast(northeast) {}
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -53,14 +53,14 @@ namespace margelo::nitro {
|
|
|
53
53
|
static inline margelo::nitro::rngooglemapsplus::RNLatLngBounds fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
54
54
|
jsi::Object obj = arg.asObject(runtime);
|
|
55
55
|
return margelo::nitro::rngooglemapsplus::RNLatLngBounds(
|
|
56
|
-
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "
|
|
57
|
-
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "
|
|
56
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "southwest")),
|
|
57
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "northeast"))
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNLatLngBounds& arg) {
|
|
61
61
|
jsi::Object obj(runtime);
|
|
62
|
-
obj.setProperty(runtime, "
|
|
63
|
-
obj.setProperty(runtime, "
|
|
62
|
+
obj.setProperty(runtime, "southwest", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.southwest));
|
|
63
|
+
obj.setProperty(runtime, "northeast", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.northeast));
|
|
64
64
|
return obj;
|
|
65
65
|
}
|
|
66
66
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -71,8 +71,8 @@ namespace margelo::nitro {
|
|
|
71
71
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
72
72
|
return false;
|
|
73
73
|
}
|
|
74
|
-
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "
|
|
75
|
-
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "
|
|
74
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "southwest"))) return false;
|
|
75
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "northeast"))) return false;
|
|
76
76
|
return true;
|
|
77
77
|
}
|
|
78
78
|
};
|
|
@@ -25,8 +25,11 @@
|
|
|
25
25
|
|
|
26
26
|
// Forward declaration of `RNLatLng` to properly resolve imports.
|
|
27
27
|
namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
|
|
28
|
+
// Forward declaration of `RNLatLngBounds` to properly resolve imports.
|
|
29
|
+
namespace margelo::nitro::rngooglemapsplus { struct RNLatLngBounds; }
|
|
28
30
|
|
|
29
31
|
#include "RNLatLng.hpp"
|
|
32
|
+
#include "RNLatLngBounds.hpp"
|
|
30
33
|
|
|
31
34
|
namespace margelo::nitro::rngooglemapsplus {
|
|
32
35
|
|
|
@@ -35,13 +38,15 @@ namespace margelo::nitro::rngooglemapsplus {
|
|
|
35
38
|
*/
|
|
36
39
|
struct RNRegion {
|
|
37
40
|
public:
|
|
38
|
-
RNLatLng
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
RNLatLng nearLeft SWIFT_PRIVATE;
|
|
42
|
+
RNLatLng nearRight SWIFT_PRIVATE;
|
|
43
|
+
RNLatLng farLeft SWIFT_PRIVATE;
|
|
44
|
+
RNLatLng farRight SWIFT_PRIVATE;
|
|
45
|
+
RNLatLngBounds latLngBounds SWIFT_PRIVATE;
|
|
41
46
|
|
|
42
47
|
public:
|
|
43
48
|
RNRegion() = default;
|
|
44
|
-
explicit RNRegion(RNLatLng
|
|
49
|
+
explicit RNRegion(RNLatLng nearLeft, RNLatLng nearRight, RNLatLng farLeft, RNLatLng farRight, RNLatLngBounds latLngBounds): nearLeft(nearLeft), nearRight(nearRight), farLeft(farLeft), farRight(farRight), latLngBounds(latLngBounds) {}
|
|
45
50
|
};
|
|
46
51
|
|
|
47
52
|
} // namespace margelo::nitro::rngooglemapsplus
|
|
@@ -54,16 +59,20 @@ namespace margelo::nitro {
|
|
|
54
59
|
static inline margelo::nitro::rngooglemapsplus::RNRegion fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
60
|
jsi::Object obj = arg.asObject(runtime);
|
|
56
61
|
return margelo::nitro::rngooglemapsplus::RNRegion(
|
|
57
|
-
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "
|
|
58
|
-
JSIConverter<
|
|
59
|
-
JSIConverter<
|
|
62
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "nearLeft")),
|
|
63
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "nearRight")),
|
|
64
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "farLeft")),
|
|
65
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "farRight")),
|
|
66
|
+
JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLngBounds>::fromJSI(runtime, obj.getProperty(runtime, "latLngBounds"))
|
|
60
67
|
);
|
|
61
68
|
}
|
|
62
69
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::rngooglemapsplus::RNRegion& arg) {
|
|
63
70
|
jsi::Object obj(runtime);
|
|
64
|
-
obj.setProperty(runtime, "
|
|
65
|
-
obj.setProperty(runtime, "
|
|
66
|
-
obj.setProperty(runtime, "
|
|
71
|
+
obj.setProperty(runtime, "nearLeft", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.nearLeft));
|
|
72
|
+
obj.setProperty(runtime, "nearRight", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.nearRight));
|
|
73
|
+
obj.setProperty(runtime, "farLeft", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.farLeft));
|
|
74
|
+
obj.setProperty(runtime, "farRight", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.farRight));
|
|
75
|
+
obj.setProperty(runtime, "latLngBounds", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLngBounds>::toJSI(runtime, arg.latLngBounds));
|
|
67
76
|
return obj;
|
|
68
77
|
}
|
|
69
78
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -74,9 +83,11 @@ namespace margelo::nitro {
|
|
|
74
83
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
75
84
|
return false;
|
|
76
85
|
}
|
|
77
|
-
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "
|
|
78
|
-
if (!JSIConverter<
|
|
79
|
-
if (!JSIConverter<
|
|
86
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "nearLeft"))) return false;
|
|
87
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "nearRight"))) return false;
|
|
88
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "farLeft"))) return false;
|
|
89
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "farRight"))) return false;
|
|
90
|
+
if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLngBounds>::canConvert(runtime, obj.getProperty(runtime, "latLngBounds"))) return false;
|
|
80
91
|
return true;
|
|
81
92
|
}
|
|
82
93
|
};
|
|
@@ -385,6 +385,56 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
385
385
|
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onIndoorLevelActivated: ") + exc.what());
|
|
386
386
|
}
|
|
387
387
|
}()),
|
|
388
|
+
onInfoWindowPress([&]() -> CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> {
|
|
389
|
+
try {
|
|
390
|
+
const react::RawValue* rawValue = rawProps.at("onInfoWindowPress", nullptr, nullptr);
|
|
391
|
+
if (rawValue == nullptr) return sourceProps.onInfoWindowPress;
|
|
392
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
393
|
+
return CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onInfoWindowPress);
|
|
394
|
+
} catch (const std::exception& exc) {
|
|
395
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onInfoWindowPress: ") + exc.what());
|
|
396
|
+
}
|
|
397
|
+
}()),
|
|
398
|
+
onInfoWindowClose([&]() -> CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> {
|
|
399
|
+
try {
|
|
400
|
+
const react::RawValue* rawValue = rawProps.at("onInfoWindowClose", nullptr, nullptr);
|
|
401
|
+
if (rawValue == nullptr) return sourceProps.onInfoWindowClose;
|
|
402
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
403
|
+
return CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onInfoWindowClose);
|
|
404
|
+
} catch (const std::exception& exc) {
|
|
405
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onInfoWindowClose: ") + exc.what());
|
|
406
|
+
}
|
|
407
|
+
}()),
|
|
408
|
+
onInfoWindowLongPress([&]() -> CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> {
|
|
409
|
+
try {
|
|
410
|
+
const react::RawValue* rawValue = rawProps.at("onInfoWindowLongPress", nullptr, nullptr);
|
|
411
|
+
if (rawValue == nullptr) return sourceProps.onInfoWindowLongPress;
|
|
412
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
413
|
+
return CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onInfoWindowLongPress);
|
|
414
|
+
} catch (const std::exception& exc) {
|
|
415
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onInfoWindowLongPress: ") + exc.what());
|
|
416
|
+
}
|
|
417
|
+
}()),
|
|
418
|
+
onMyLocationPress([&]() -> CachedProp<std::optional<std::function<void(const RNLocation& /* location */)>>> {
|
|
419
|
+
try {
|
|
420
|
+
const react::RawValue* rawValue = rawProps.at("onMyLocationPress", nullptr, nullptr);
|
|
421
|
+
if (rawValue == nullptr) return sourceProps.onMyLocationPress;
|
|
422
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
423
|
+
return CachedProp<std::optional<std::function<void(const RNLocation& /* location */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMyLocationPress);
|
|
424
|
+
} catch (const std::exception& exc) {
|
|
425
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMyLocationPress: ") + exc.what());
|
|
426
|
+
}
|
|
427
|
+
}()),
|
|
428
|
+
onMyLocationButtonPress([&]() -> CachedProp<std::optional<std::function<void(bool /* pressed */)>>> {
|
|
429
|
+
try {
|
|
430
|
+
const react::RawValue* rawValue = rawProps.at("onMyLocationButtonPress", nullptr, nullptr);
|
|
431
|
+
if (rawValue == nullptr) return sourceProps.onMyLocationButtonPress;
|
|
432
|
+
const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
|
|
433
|
+
return CachedProp<std::optional<std::function<void(bool /* pressed */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMyLocationButtonPress);
|
|
434
|
+
} catch (const std::exception& exc) {
|
|
435
|
+
throw std::runtime_error(std::string("RNGoogleMapsPlusView.onMyLocationButtonPress: ") + exc.what());
|
|
436
|
+
}
|
|
437
|
+
}()),
|
|
388
438
|
onCameraChangeStart([&]() -> CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> {
|
|
389
439
|
try {
|
|
390
440
|
const react::RawValue* rawValue = rawProps.at("onCameraChangeStart", nullptr, nullptr);
|
|
@@ -464,6 +514,11 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
464
514
|
onMarkerDragEnd(other.onMarkerDragEnd),
|
|
465
515
|
onIndoorBuildingFocused(other.onIndoorBuildingFocused),
|
|
466
516
|
onIndoorLevelActivated(other.onIndoorLevelActivated),
|
|
517
|
+
onInfoWindowPress(other.onInfoWindowPress),
|
|
518
|
+
onInfoWindowClose(other.onInfoWindowClose),
|
|
519
|
+
onInfoWindowLongPress(other.onInfoWindowLongPress),
|
|
520
|
+
onMyLocationPress(other.onMyLocationPress),
|
|
521
|
+
onMyLocationButtonPress(other.onMyLocationButtonPress),
|
|
467
522
|
onCameraChangeStart(other.onCameraChangeStart),
|
|
468
523
|
onCameraChange(other.onCameraChange),
|
|
469
524
|
onCameraChangeComplete(other.onCameraChangeComplete),
|
|
@@ -507,6 +562,11 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
507
562
|
case hashString("onMarkerDragEnd"): return true;
|
|
508
563
|
case hashString("onIndoorBuildingFocused"): return true;
|
|
509
564
|
case hashString("onIndoorLevelActivated"): return true;
|
|
565
|
+
case hashString("onInfoWindowPress"): return true;
|
|
566
|
+
case hashString("onInfoWindowClose"): return true;
|
|
567
|
+
case hashString("onInfoWindowLongPress"): return true;
|
|
568
|
+
case hashString("onMyLocationPress"): return true;
|
|
569
|
+
case hashString("onMyLocationButtonPress"): return true;
|
|
510
570
|
case hashString("onCameraChangeStart"): return true;
|
|
511
571
|
case hashString("onCameraChange"): return true;
|
|
512
572
|
case hashString("onCameraChangeComplete"): return true;
|
|
@@ -102,6 +102,11 @@ namespace margelo::nitro::rngooglemapsplus::views {
|
|
|
102
102
|
CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */, const RNLatLng& /* location */)>>> onMarkerDragEnd;
|
|
103
103
|
CachedProp<std::optional<std::function<void(const RNIndoorBuilding& /* indoorBuilding */)>>> onIndoorBuildingFocused;
|
|
104
104
|
CachedProp<std::optional<std::function<void(const RNIndoorLevel& /* indoorLevel */)>>> onIndoorLevelActivated;
|
|
105
|
+
CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> onInfoWindowPress;
|
|
106
|
+
CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> onInfoWindowClose;
|
|
107
|
+
CachedProp<std::optional<std::function<void(const std::optional<std::string>& /* id */)>>> onInfoWindowLongPress;
|
|
108
|
+
CachedProp<std::optional<std::function<void(const RNLocation& /* location */)>>> onMyLocationPress;
|
|
109
|
+
CachedProp<std::optional<std::function<void(bool /* pressed */)>>> onMyLocationButtonPress;
|
|
105
110
|
CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChangeStart;
|
|
106
111
|
CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChange;
|
|
107
112
|
CachedProp<std::optional<std::function<void(const RNRegion& /* region */, const RNCamera& /* camera */, bool /* isGesture */)>>> onCameraChangeComplete;
|
|
@@ -40,6 +40,11 @@
|
|
|
40
40
|
"onMarkerDragEnd": true,
|
|
41
41
|
"onIndoorBuildingFocused": true,
|
|
42
42
|
"onIndoorLevelActivated": true,
|
|
43
|
+
"onInfoWindowPress": true,
|
|
44
|
+
"onInfoWindowClose": true,
|
|
45
|
+
"onInfoWindowLongPress": true,
|
|
46
|
+
"onMyLocationPress": true,
|
|
47
|
+
"onMyLocationButtonPress": true,
|
|
43
48
|
"onCameraChangeStart": true,
|
|
44
49
|
"onCameraChange": true,
|
|
45
50
|
"onCameraChangeComplete": true,
|
package/package.json
CHANGED
|
@@ -68,6 +68,11 @@ export interface RNGoogleMapsPlusViewProps extends HybridViewProps {
|
|
|
68
68
|
onMarkerDragEnd?: (id: string | undefined, location: RNLatLng) => void;
|
|
69
69
|
onIndoorBuildingFocused?: (indoorBuilding: RNIndoorBuilding) => void;
|
|
70
70
|
onIndoorLevelActivated?: (indoorLevel: RNIndoorLevel) => void;
|
|
71
|
+
onInfoWindowPress?: (id?: string) => void;
|
|
72
|
+
onInfoWindowClose?: (id?: string) => void;
|
|
73
|
+
onInfoWindowLongPress?: (id?: string) => void;
|
|
74
|
+
onMyLocationPress?: (location: RNLocation) => void;
|
|
75
|
+
onMyLocationButtonPress?: (pressed: boolean) => void;
|
|
71
76
|
onCameraChangeStart?: (
|
|
72
77
|
region: RNRegion,
|
|
73
78
|
camera: RNCamera,
|
package/src/types.ts
CHANGED
|
@@ -29,8 +29,8 @@ export type RNLatLng = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export type RNLatLngBounds = {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
southwest: RNLatLng;
|
|
33
|
+
northeast: RNLatLng;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
export type RNSnapshotOptions = {
|
|
@@ -135,9 +135,11 @@ export type RNCamera = {
|
|
|
135
135
|
};
|
|
136
136
|
|
|
137
137
|
export type RNRegion = {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
nearLeft: RNLatLng;
|
|
139
|
+
nearRight: RNLatLng;
|
|
140
|
+
farLeft: RNLatLng;
|
|
141
|
+
farRight: RNLatLng;
|
|
142
|
+
latLngBounds: RNLatLngBounds;
|
|
141
143
|
};
|
|
142
144
|
|
|
143
145
|
export type RNPosition = {
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
package com.rngooglemapsplus.extensions
|
|
2
|
-
|
|
3
|
-
import com.google.android.gms.maps.model.LatLngBounds
|
|
4
|
-
import com.rngooglemapsplus.RNRegion
|
|
5
|
-
|
|
6
|
-
fun LatLngBounds.toRnRegion(): RNRegion {
|
|
7
|
-
val latDelta = northeast.latitude - southwest.latitude
|
|
8
|
-
val lngDelta = northeast.longitude - southwest.longitude
|
|
9
|
-
|
|
10
|
-
return RNRegion(
|
|
11
|
-
center = center.toRnLatLng(),
|
|
12
|
-
latitudeDelta = latDelta,
|
|
13
|
-
longitudeDelta = lngDelta,
|
|
14
|
-
)
|
|
15
|
-
}
|
/package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSize.kt → RNSizeExtension.kt}
RENAMED
|
File without changes
|
|
File without changes
|