react-native-google-maps-plus 1.7.0-dev.5 → 1.7.0-dev.7

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 (40) hide show
  1. package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +336 -494
  2. package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +3 -8
  3. package/android/src/main/java/com/rngooglemapsplus/MapCircleBuilder.kt +2 -1
  4. package/android/src/main/java/com/rngooglemapsplus/MapHelper.kt +22 -0
  5. package/android/src/main/java/com/rngooglemapsplus/MapMarkerBuilder.kt +4 -2
  6. package/android/src/main/java/com/rngooglemapsplus/MapPolygonBuilder.kt +2 -1
  7. package/android/src/main/java/com/rngooglemapsplus/MapPolylineBuilder.kt.kt +2 -1
  8. package/android/src/main/java/com/rngooglemapsplus/RNGoogleMapsPlusView.kt +10 -21
  9. package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngBoundsExtension.kt +10 -0
  10. package/android/src/main/java/com/rngooglemapsplus/extensions/RNLatLngBoundsExtension.kt +2 -8
  11. package/android/src/main/java/com/rngooglemapsplus/extensions/VisibleRegionExtension.kt +13 -0
  12. package/ios/GoogleMapViewImpl.swift +14 -26
  13. package/ios/MapCircleBuilder.swift +2 -0
  14. package/ios/MapHeatmapBuilder.swift +1 -0
  15. package/ios/MapMarkerBuilder.swift +4 -0
  16. package/ios/MapPolygonBuilder.swift +2 -0
  17. package/ios/MapPolylineBuilder.swift +2 -0
  18. package/ios/MapUrlTileOverlayBuilder.swift +1 -0
  19. package/ios/extensions/GMSCoordinateBounds+Extension.swift +4 -13
  20. package/ios/extensions/GMSVisibleRegion+Extension.swift +14 -0
  21. package/ios/extensions/RNLatLngBounds+Extension.swift +4 -4
  22. package/lib/module/types.js.map +1 -1
  23. package/lib/typescript/src/types.d.ts +7 -5
  24. package/lib/typescript/src/types.d.ts.map +1 -1
  25. package/nitrogen/generated/android/c++/JFunc_void_RNRegion_RNCamera_bool.hpp +2 -0
  26. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +4 -4
  27. package/nitrogen/generated/android/c++/JRNLatLngBounds.hpp +8 -8
  28. package/nitrogen/generated/android/c++/JRNRegion.hpp +23 -13
  29. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt +4 -4
  30. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNRegion.kt +11 -5
  31. package/nitrogen/generated/ios/swift/RNLatLngBounds.swift +8 -8
  32. package/nitrogen/generated/ios/swift/RNRegion.swift +33 -11
  33. package/nitrogen/generated/shared/c++/RNLatLngBounds.hpp +9 -9
  34. package/nitrogen/generated/shared/c++/RNRegion.hpp +24 -13
  35. package/package.json +1 -1
  36. package/src/types.ts +7 -5
  37. package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngBounds.kt +0 -15
  38. /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSize.kt → RNSizeExtension.kt} +0 -0
  39. /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSnapshotFormat.kt → RNSnapshotFormatExtension.kt} +0 -0
  40. /package/android/src/main/java/com/rngooglemapsplus/extensions/{RNSnapshotResultType.kt → RNSnapshotResultTypeExtension.kt} +0 -0
@@ -11,7 +11,9 @@
11
11
  #include "RNRegion.hpp"
12
12
 
13
13
  #include "JRNLatLng.hpp"
14
+ #include "JRNLatLngBounds.hpp"
14
15
  #include "RNLatLng.hpp"
16
+ #include "RNLatLngBounds.hpp"
15
17
 
16
18
  namespace margelo::nitro::rngooglemapsplus {
17
19
 
@@ -32,16 +34,22 @@ namespace margelo::nitro::rngooglemapsplus {
32
34
  [[nodiscard]]
33
35
  RNRegion toCpp() const {
34
36
  static const auto clazz = javaClassStatic();
35
- static const auto fieldCenter = clazz->getField<JRNLatLng>("center");
36
- jni::local_ref<JRNLatLng> center = this->getFieldValue(fieldCenter);
37
- static const auto fieldLatitudeDelta = clazz->getField<double>("latitudeDelta");
38
- double latitudeDelta = this->getFieldValue(fieldLatitudeDelta);
39
- static const auto fieldLongitudeDelta = clazz->getField<double>("longitudeDelta");
40
- double longitudeDelta = this->getFieldValue(fieldLongitudeDelta);
37
+ static const auto fieldNearLeft = clazz->getField<JRNLatLng>("nearLeft");
38
+ jni::local_ref<JRNLatLng> nearLeft = this->getFieldValue(fieldNearLeft);
39
+ static const auto fieldNearRight = clazz->getField<JRNLatLng>("nearRight");
40
+ jni::local_ref<JRNLatLng> nearRight = this->getFieldValue(fieldNearRight);
41
+ static const auto fieldFarLeft = clazz->getField<JRNLatLng>("farLeft");
42
+ jni::local_ref<JRNLatLng> farLeft = this->getFieldValue(fieldFarLeft);
43
+ static const auto fieldFarRight = clazz->getField<JRNLatLng>("farRight");
44
+ jni::local_ref<JRNLatLng> farRight = this->getFieldValue(fieldFarRight);
45
+ static const auto fieldLatLngBounds = clazz->getField<JRNLatLngBounds>("latLngBounds");
46
+ jni::local_ref<JRNLatLngBounds> latLngBounds = this->getFieldValue(fieldLatLngBounds);
41
47
  return RNRegion(
42
- center->toCpp(),
43
- latitudeDelta,
44
- longitudeDelta
48
+ nearLeft->toCpp(),
49
+ nearRight->toCpp(),
50
+ farLeft->toCpp(),
51
+ farRight->toCpp(),
52
+ latLngBounds->toCpp()
45
53
  );
46
54
  }
47
55
 
@@ -51,14 +59,16 @@ namespace margelo::nitro::rngooglemapsplus {
51
59
  */
52
60
  [[maybe_unused]]
53
61
  static jni::local_ref<JRNRegion::javaobject> fromCpp(const RNRegion& value) {
54
- using JSignature = JRNRegion(jni::alias_ref<JRNLatLng>, double, double);
62
+ using JSignature = JRNRegion(jni::alias_ref<JRNLatLng>, jni::alias_ref<JRNLatLng>, jni::alias_ref<JRNLatLng>, jni::alias_ref<JRNLatLng>, jni::alias_ref<JRNLatLngBounds>);
55
63
  static const auto clazz = javaClassStatic();
56
64
  static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
57
65
  return create(
58
66
  clazz,
59
- JRNLatLng::fromCpp(value.center),
60
- value.latitudeDelta,
61
- value.longitudeDelta
67
+ JRNLatLng::fromCpp(value.nearLeft),
68
+ JRNLatLng::fromCpp(value.nearRight),
69
+ JRNLatLng::fromCpp(value.farLeft),
70
+ JRNLatLng::fromCpp(value.farRight),
71
+ JRNLatLngBounds::fromCpp(value.latLngBounds)
62
72
  );
63
73
  }
64
74
  };
@@ -20,10 +20,10 @@ import com.margelo.nitro.core.*
20
20
  data class RNLatLngBounds(
21
21
  @DoNotStrip
22
22
  @Keep
23
- val northEast: RNLatLng,
23
+ val southwest: RNLatLng,
24
24
  @DoNotStrip
25
25
  @Keep
26
- val southWest: RNLatLng
26
+ val northeast: RNLatLng
27
27
  ) {
28
28
  private companion object {
29
29
  /**
@@ -33,8 +33,8 @@ data class RNLatLngBounds(
33
33
  @Keep
34
34
  @Suppress("unused")
35
35
  @JvmStatic
36
- private fun fromCpp(northEast: RNLatLng, southWest: RNLatLng): RNLatLngBounds {
37
- return RNLatLngBounds(northEast, southWest)
36
+ private fun fromCpp(southwest: RNLatLng, northeast: RNLatLng): RNLatLngBounds {
37
+ return RNLatLngBounds(southwest, northeast)
38
38
  }
39
39
  }
40
40
  }
@@ -20,13 +20,19 @@ import com.margelo.nitro.core.*
20
20
  data class RNRegion(
21
21
  @DoNotStrip
22
22
  @Keep
23
- val center: RNLatLng,
23
+ val nearLeft: RNLatLng,
24
24
  @DoNotStrip
25
25
  @Keep
26
- val latitudeDelta: Double,
26
+ val nearRight: RNLatLng,
27
27
  @DoNotStrip
28
28
  @Keep
29
- val longitudeDelta: Double
29
+ val farLeft: RNLatLng,
30
+ @DoNotStrip
31
+ @Keep
32
+ val farRight: RNLatLng,
33
+ @DoNotStrip
34
+ @Keep
35
+ val latLngBounds: RNLatLngBounds
30
36
  ) {
31
37
  private companion object {
32
38
  /**
@@ -36,8 +42,8 @@ data class RNRegion(
36
42
  @Keep
37
43
  @Suppress("unused")
38
44
  @JvmStatic
39
- private fun fromCpp(center: RNLatLng, latitudeDelta: Double, longitudeDelta: Double): RNRegion {
40
- return RNRegion(center, latitudeDelta, longitudeDelta)
45
+ private fun fromCpp(nearLeft: RNLatLng, nearRight: RNLatLng, farLeft: RNLatLng, farRight: RNLatLng, latLngBounds: RNLatLngBounds): RNRegion {
46
+ return RNRegion(nearLeft, nearRight, farLeft, farRight, latLngBounds)
41
47
  }
42
48
  }
43
49
  }
@@ -18,29 +18,29 @@ public extension RNLatLngBounds {
18
18
  /**
19
19
  * Create a new instance of `RNLatLngBounds`.
20
20
  */
21
- init(northEast: RNLatLng, southWest: RNLatLng) {
22
- self.init(northEast, southWest)
21
+ init(southwest: RNLatLng, northeast: RNLatLng) {
22
+ self.init(southwest, northeast)
23
23
  }
24
24
 
25
- var northEast: RNLatLng {
25
+ var southwest: RNLatLng {
26
26
  @inline(__always)
27
27
  get {
28
- return self.__northEast
28
+ return self.__southwest
29
29
  }
30
30
  @inline(__always)
31
31
  set {
32
- self.__northEast = newValue
32
+ self.__southwest = newValue
33
33
  }
34
34
  }
35
35
 
36
- var southWest: RNLatLng {
36
+ var northeast: RNLatLng {
37
37
  @inline(__always)
38
38
  get {
39
- return self.__southWest
39
+ return self.__northeast
40
40
  }
41
41
  @inline(__always)
42
42
  set {
43
- self.__southWest = newValue
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(center: RNLatLng, latitudeDelta: Double, longitudeDelta: Double) {
22
- self.init(center, latitudeDelta, longitudeDelta)
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 center: RNLatLng {
25
+ var nearLeft: RNLatLng {
26
26
  @inline(__always)
27
27
  get {
28
- return self.__center
28
+ return self.__nearLeft
29
29
  }
30
30
  @inline(__always)
31
31
  set {
32
- self.__center = newValue
32
+ self.__nearLeft = newValue
33
33
  }
34
34
  }
35
35
 
36
- var latitudeDelta: Double {
36
+ var nearRight: RNLatLng {
37
37
  @inline(__always)
38
38
  get {
39
- return self.__latitudeDelta
39
+ return self.__nearRight
40
40
  }
41
41
  @inline(__always)
42
42
  set {
43
- self.__latitudeDelta = newValue
43
+ self.__nearRight = newValue
44
44
  }
45
45
  }
46
46
 
47
- var longitudeDelta: Double {
47
+ var farLeft: RNLatLng {
48
48
  @inline(__always)
49
49
  get {
50
- return self.__longitudeDelta
50
+ return self.__farLeft
51
51
  }
52
52
  @inline(__always)
53
53
  set {
54
- self.__longitudeDelta = newValue
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
  }
@@ -35,12 +35,12 @@ namespace margelo::nitro::rngooglemapsplus {
35
35
  */
36
36
  struct RNLatLngBounds {
37
37
  public:
38
- RNLatLng northEast SWIFT_PRIVATE;
39
- RNLatLng southWest SWIFT_PRIVATE;
38
+ RNLatLng southwest SWIFT_PRIVATE;
39
+ RNLatLng northeast SWIFT_PRIVATE;
40
40
 
41
41
  public:
42
42
  RNLatLngBounds() = default;
43
- explicit RNLatLngBounds(RNLatLng northEast, RNLatLng southWest): northEast(northEast), southWest(southWest) {}
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, "northEast")),
57
- JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::fromJSI(runtime, obj.getProperty(runtime, "southWest"))
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, "northEast", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.northEast));
63
- obj.setProperty(runtime, "southWest", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.southWest));
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, "northEast"))) return false;
75
- if (!JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::canConvert(runtime, obj.getProperty(runtime, "southWest"))) return false;
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 center SWIFT_PRIVATE;
39
- double latitudeDelta SWIFT_PRIVATE;
40
- double longitudeDelta SWIFT_PRIVATE;
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 center, double latitudeDelta, double longitudeDelta): center(center), latitudeDelta(latitudeDelta), longitudeDelta(longitudeDelta) {}
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, "center")),
58
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "latitudeDelta")),
59
- JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "longitudeDelta"))
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, "center", JSIConverter<margelo::nitro::rngooglemapsplus::RNLatLng>::toJSI(runtime, arg.center));
65
- obj.setProperty(runtime, "latitudeDelta", JSIConverter<double>::toJSI(runtime, arg.latitudeDelta));
66
- obj.setProperty(runtime, "longitudeDelta", JSIConverter<double>::toJSI(runtime, arg.longitudeDelta));
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, "center"))) return false;
78
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "latitudeDelta"))) return false;
79
- if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "longitudeDelta"))) return false;
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-maps-plus",
3
- "version": "1.7.0-dev.5",
3
+ "version": "1.7.0-dev.7",
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",
package/src/types.ts CHANGED
@@ -29,8 +29,8 @@ export type RNLatLng = {
29
29
  };
30
30
 
31
31
  export type RNLatLngBounds = {
32
- northEast: RNLatLng;
33
- southWest: RNLatLng;
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
- center: RNLatLng;
139
- latitudeDelta: number;
140
- longitudeDelta: number;
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
- }