react-native-google-maps-plus 1.4.1 → 1.6.0-dev.1

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 (125) hide show
  1. package/README.md +21 -0
  2. package/android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt +41 -144
  3. package/android/src/main/java/com/rngooglemapsplus/LocationHandler.kt +38 -36
  4. package/android/src/main/java/com/rngooglemapsplus/extensions/CameraPositionExtension.kt +12 -0
  5. package/android/src/main/java/com/rngooglemapsplus/extensions/IntExtension.kt +28 -0
  6. package/android/src/main/java/com/rngooglemapsplus/extensions/LatLngBounds.kt +15 -0
  7. package/android/src/main/java/com/rngooglemapsplus/extensions/LocationExtension.kt +59 -0
  8. package/app.plugin.js +1 -0
  9. package/expoConfig/build/android/withAndroidGoogleMapsPlus.js +21 -0
  10. package/expoConfig/build/index.js +17 -0
  11. package/expoConfig/build/ios/withIosGoogleMapsPlus.js +91 -0
  12. package/expoConfig/build/types.js +2 -0
  13. package/ios/GoogleMapViewImpl.swift +28 -138
  14. package/ios/LocationHandler.swift +5 -13
  15. package/ios/MapHelper.swift +20 -0
  16. package/ios/MapMarkerBuilder.swift +44 -69
  17. package/ios/RNGoogleMapsPlusView.swift +12 -8
  18. package/ios/extensions/CLError+Extension.swift +14 -0
  19. package/ios/extensions/CLLocation+Extension.swift +27 -0
  20. package/ios/extensions/GMSCameraPosition+Extension.swift +12 -0
  21. package/ios/extensions/GMSCoordinateBounds+Extension.swift +19 -0
  22. package/ios/extensions/RNMarker+Extension.swift +2 -3
  23. package/lib/module/GoogleMapsPlus.js +7 -0
  24. package/lib/module/GoogleMapsPlus.js.map +1 -0
  25. package/lib/module/index.js +3 -5
  26. package/lib/module/index.js.map +1 -1
  27. package/lib/module/types.js.map +1 -1
  28. package/lib/nitrogen/generated/shared/json/RNGoogleMapsPlusViewConfig.json +44 -0
  29. package/lib/typescript/src/GoogleMapsPlus.d.ts +5 -0
  30. package/lib/typescript/src/GoogleMapsPlus.d.ts.map +1 -0
  31. package/lib/typescript/src/index.d.ts +3 -3
  32. package/lib/typescript/src/index.d.ts.map +1 -1
  33. package/lib/typescript/src/types.d.ts +25 -0
  34. package/lib/typescript/src/types.d.ts.map +1 -1
  35. package/nitrogen/generated/android/c++/JFunc_void_RNLocation.hpp +6 -0
  36. package/nitrogen/generated/android/c++/JHybridRNGoogleMapsPlusViewSpec.cpp +8 -0
  37. package/nitrogen/generated/android/c++/JRNAndroidLocationConfig.hpp +5 -1
  38. package/nitrogen/generated/android/c++/JRNCamera.hpp +5 -1
  39. package/nitrogen/generated/android/c++/JRNCircle.hpp +5 -1
  40. package/nitrogen/generated/android/c++/JRNHeatmap.hpp +5 -1
  41. package/nitrogen/generated/android/c++/JRNHeatmapGradient.hpp +5 -1
  42. package/nitrogen/generated/android/c++/JRNHeatmapPoint.hpp +5 -1
  43. package/nitrogen/generated/android/c++/JRNIOSLocationConfig.hpp +5 -1
  44. package/nitrogen/generated/android/c++/JRNIndoorBuilding.hpp +5 -1
  45. package/nitrogen/generated/android/c++/JRNIndoorLevel.hpp +5 -1
  46. package/nitrogen/generated/android/c++/JRNInitialProps.hpp +5 -1
  47. package/nitrogen/generated/android/c++/JRNKMLayer.hpp +5 -1
  48. package/nitrogen/generated/android/c++/JRNLatLng.hpp +5 -1
  49. package/nitrogen/generated/android/c++/JRNLatLngBounds.hpp +5 -1
  50. package/nitrogen/generated/android/c++/JRNLocation.hpp +37 -3
  51. package/nitrogen/generated/android/c++/JRNLocationAndroid.hpp +86 -0
  52. package/nitrogen/generated/android/c++/JRNLocationConfig.hpp +5 -1
  53. package/nitrogen/generated/android/c++/JRNLocationIOS.hpp +81 -0
  54. package/nitrogen/generated/android/c++/JRNLocationPermissionResult.hpp +5 -1
  55. package/nitrogen/generated/android/c++/JRNMapPadding.hpp +5 -1
  56. package/nitrogen/generated/android/c++/JRNMapUiSettings.hpp +5 -1
  57. package/nitrogen/generated/android/c++/JRNMapZoomConfig.hpp +5 -1
  58. package/nitrogen/generated/android/c++/JRNMarker.hpp +5 -1
  59. package/nitrogen/generated/android/c++/JRNMarkerSvg.hpp +5 -1
  60. package/nitrogen/generated/android/c++/JRNPolygon.hpp +5 -1
  61. package/nitrogen/generated/android/c++/JRNPolygonHole.hpp +5 -1
  62. package/nitrogen/generated/android/c++/JRNPolyline.hpp +5 -1
  63. package/nitrogen/generated/android/c++/JRNPosition.hpp +5 -1
  64. package/nitrogen/generated/android/c++/JRNRegion.hpp +5 -1
  65. package/nitrogen/generated/android/c++/JRNSize.hpp +5 -1
  66. package/nitrogen/generated/android/c++/JRNSnapshotOptions.hpp +5 -1
  67. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusModuleSpec.kt +1 -1
  68. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +1 -1
  69. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNAndroidLocationConfig.kt +19 -11
  70. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCamera.kt +22 -14
  71. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCircle.kt +36 -28
  72. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmap.kt +31 -23
  73. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmapGradient.kt +19 -11
  74. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmapPoint.kt +19 -11
  75. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIOSLocationConfig.kt +16 -8
  76. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIndoorBuilding.kt +22 -14
  77. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIndoorLevel.kt +22 -14
  78. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNInitialProps.kt +19 -11
  79. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNKMLayer.kt +16 -8
  80. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLng.kt +16 -8
  81. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt +16 -8
  82. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocation.kt +34 -8
  83. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationAndroid.kt +58 -0
  84. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationConfig.kt +16 -8
  85. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationIOS.kt +55 -0
  86. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationPermissionResult.kt +16 -8
  87. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapPadding.kt +22 -14
  88. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapUiSettings.kt +43 -35
  89. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapZoomConfig.kt +16 -8
  90. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +49 -41
  91. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarkerSvg.kt +19 -11
  92. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygon.kt +39 -31
  93. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygonHole.kt +13 -5
  94. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolyline.kt +39 -31
  95. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPosition.kt +16 -8
  96. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNRegion.kt +19 -11
  97. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSize.kt +16 -8
  98. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotOptions.kt +22 -14
  99. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/views/HybridRNGoogleMapsPlusViewManager.kt +7 -2
  100. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Bridge.hpp +36 -0
  101. package/nitrogen/generated/ios/RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp +6 -0
  102. package/nitrogen/generated/ios/c++/HybridRNGoogleMapsPlusViewSpecSwift.hpp +6 -0
  103. package/nitrogen/generated/ios/c++/views/HybridRNGoogleMapsPlusViewComponent.mm +8 -0
  104. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +56 -7
  105. package/nitrogen/generated/ios/swift/RNCircle.swift +8 -1
  106. package/nitrogen/generated/ios/swift/RNHeatmap.swift +8 -1
  107. package/nitrogen/generated/ios/swift/RNIndoorBuilding.swift +8 -1
  108. package/nitrogen/generated/ios/swift/RNIndoorLevel.swift +8 -1
  109. package/nitrogen/generated/ios/swift/RNInitialProps.swift +8 -1
  110. package/nitrogen/generated/ios/swift/RNLocation.swift +92 -2
  111. package/nitrogen/generated/ios/swift/RNLocationAndroid.swift +222 -0
  112. package/nitrogen/generated/ios/swift/RNLocationIOS.swift +192 -0
  113. package/nitrogen/generated/ios/swift/RNMapUiSettings.swift +88 -11
  114. package/nitrogen/generated/ios/swift/RNMarker.swift +24 -3
  115. package/nitrogen/generated/ios/swift/RNPolygon.swift +16 -2
  116. package/nitrogen/generated/ios/swift/RNPolyline.swift +16 -2
  117. package/nitrogen/generated/shared/c++/RNLocation.hpp +33 -2
  118. package/nitrogen/generated/shared/c++/RNLocationAndroid.hpp +104 -0
  119. package/nitrogen/generated/shared/c++/RNLocationIOS.hpp +99 -0
  120. package/package.json +20 -17
  121. package/src/GoogleMapsPlus.tsx +20 -0
  122. package/src/index.tsx +6 -14
  123. package/src/types.ts +27 -0
  124. package/lib/module/package.json +0 -1
  125. package/lib/typescript/package.json +0 -1
@@ -17,49 +17,57 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNMarker
20
+ data class RNMarker(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val id: String,
27
- @DoNotStrip
28
- @Keep
29
- val zIndex: Double?,
30
- @DoNotStrip
31
- @Keep
32
- val coordinate: RNLatLng,
33
- @DoNotStrip
34
- @Keep
35
- val anchor: RNPosition?,
36
- @DoNotStrip
37
- @Keep
38
- val showInfoWindow: Boolean?,
39
- @DoNotStrip
40
- @Keep
41
- val title: String?,
42
- @DoNotStrip
43
- @Keep
44
- val snippet: String?,
45
- @DoNotStrip
46
- @Keep
47
- val opacity: Double?,
48
- @DoNotStrip
49
- @Keep
50
- val flat: Boolean?,
51
- @DoNotStrip
52
- @Keep
53
- val draggable: Boolean?,
54
- @DoNotStrip
55
- @Keep
56
- val rotation: Double?,
57
- @DoNotStrip
58
- @Keep
59
- val infoWindowAnchor: RNPosition?,
23
+ val id: String,
24
+ @DoNotStrip
25
+ @Keep
26
+ val zIndex: Double?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val coordinate: RNLatLng,
30
+ @DoNotStrip
31
+ @Keep
32
+ val anchor: RNPosition?,
33
+ @DoNotStrip
34
+ @Keep
35
+ val showInfoWindow: Boolean?,
36
+ @DoNotStrip
37
+ @Keep
38
+ val title: String?,
39
+ @DoNotStrip
40
+ @Keep
41
+ val snippet: String?,
42
+ @DoNotStrip
43
+ @Keep
44
+ val opacity: Double?,
45
+ @DoNotStrip
46
+ @Keep
47
+ val flat: Boolean?,
48
+ @DoNotStrip
49
+ @Keep
50
+ val draggable: Boolean?,
51
+ @DoNotStrip
52
+ @Keep
53
+ val rotation: Double?,
54
+ @DoNotStrip
55
+ @Keep
56
+ val infoWindowAnchor: RNPosition?,
57
+ @DoNotStrip
58
+ @Keep
59
+ val iconSvg: RNMarkerSvg?
60
+ ) {
61
+ private companion object {
62
+ /**
63
+ * Constructor called from C++
64
+ */
60
65
  @DoNotStrip
61
66
  @Keep
62
- val iconSvg: RNMarkerSvg?
63
- ) {
64
- /* main constructor */
67
+ @Suppress("unused")
68
+ @JvmStatic
69
+ private fun fromCpp(id: String, zIndex: Double?, coordinate: RNLatLng, anchor: RNPosition?, showInfoWindow: Boolean?, title: String?, snippet: String?, opacity: Double?, flat: Boolean?, draggable: Boolean?, rotation: Double?, infoWindowAnchor: RNPosition?, iconSvg: RNMarkerSvg?): RNMarker {
70
+ return RNMarker(id, zIndex, coordinate, anchor, showInfoWindow, title, snippet, opacity, flat, draggable, rotation, infoWindowAnchor, iconSvg)
71
+ }
72
+ }
65
73
  }
@@ -17,19 +17,27 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNMarkerSvg
20
+ data class RNMarkerSvg(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val width: Double,
27
- @DoNotStrip
28
- @Keep
29
- val height: Double,
23
+ val width: Double,
24
+ @DoNotStrip
25
+ @Keep
26
+ val height: Double,
27
+ @DoNotStrip
28
+ @Keep
29
+ val svgString: String
30
+ ) {
31
+ private companion object {
32
+ /**
33
+ * Constructor called from C++
34
+ */
30
35
  @DoNotStrip
31
36
  @Keep
32
- val svgString: String
33
- ) {
34
- /* main constructor */
37
+ @Suppress("unused")
38
+ @JvmStatic
39
+ private fun fromCpp(width: Double, height: Double, svgString: String): RNMarkerSvg {
40
+ return RNMarkerSvg(width, height, svgString)
41
+ }
42
+ }
35
43
  }
@@ -17,37 +17,45 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNPolygon
20
+ data class RNPolygon(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val id: String,
27
- @DoNotStrip
28
- @Keep
29
- val zIndex: Double?,
30
- @DoNotStrip
31
- @Keep
32
- val pressable: Boolean?,
33
- @DoNotStrip
34
- @Keep
35
- val coordinates: Array<RNLatLng>,
36
- @DoNotStrip
37
- @Keep
38
- val fillColor: String?,
39
- @DoNotStrip
40
- @Keep
41
- val strokeColor: String?,
42
- @DoNotStrip
43
- @Keep
44
- val strokeWidth: Double?,
45
- @DoNotStrip
46
- @Keep
47
- val holes: Array<RNPolygonHole>?,
48
- @DoNotStrip
49
- @Keep
50
- val geodesic: Boolean?
51
- ) {
52
- /* main constructor */
23
+ val id: String,
24
+ @DoNotStrip
25
+ @Keep
26
+ val zIndex: Double?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val pressable: Boolean?,
30
+ @DoNotStrip
31
+ @Keep
32
+ val coordinates: Array<RNLatLng>,
33
+ @DoNotStrip
34
+ @Keep
35
+ val fillColor: String?,
36
+ @DoNotStrip
37
+ @Keep
38
+ val strokeColor: String?,
39
+ @DoNotStrip
40
+ @Keep
41
+ val strokeWidth: Double?,
42
+ @DoNotStrip
43
+ @Keep
44
+ val holes: Array<RNPolygonHole>?,
45
+ @DoNotStrip
46
+ @Keep
47
+ val geodesic: Boolean?
48
+ ) {
49
+ private companion object {
50
+ /**
51
+ * Constructor called from C++
52
+ */
53
+ @DoNotStrip
54
+ @Keep
55
+ @Suppress("unused")
56
+ @JvmStatic
57
+ private fun fromCpp(id: String, zIndex: Double?, pressable: Boolean?, coordinates: Array<RNLatLng>, fillColor: String?, strokeColor: String?, strokeWidth: Double?, holes: Array<RNPolygonHole>?, geodesic: Boolean?): RNPolygon {
58
+ return RNPolygon(id, zIndex, pressable, coordinates, fillColor, strokeColor, strokeWidth, holes, geodesic)
59
+ }
60
+ }
53
61
  }
@@ -17,13 +17,21 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNPolygonHole
20
+ data class RNPolygonHole(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
23
+ val coordinates: Array<RNLatLng>
24
+ ) {
25
+ private companion object {
26
+ /**
27
+ * Constructor called from C++
28
+ */
24
29
  @DoNotStrip
25
30
  @Keep
26
- val coordinates: Array<RNLatLng>
27
- ) {
28
- /* main constructor */
31
+ @Suppress("unused")
32
+ @JvmStatic
33
+ private fun fromCpp(coordinates: Array<RNLatLng>): RNPolygonHole {
34
+ return RNPolygonHole(coordinates)
35
+ }
36
+ }
29
37
  }
@@ -17,37 +17,45 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNPolyline
20
+ data class RNPolyline(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val id: String,
27
- @DoNotStrip
28
- @Keep
29
- val zIndex: Double?,
30
- @DoNotStrip
31
- @Keep
32
- val pressable: Boolean?,
33
- @DoNotStrip
34
- @Keep
35
- val coordinates: Array<RNLatLng>,
36
- @DoNotStrip
37
- @Keep
38
- val lineCap: RNLineCapType?,
39
- @DoNotStrip
40
- @Keep
41
- val lineJoin: RNLineJoinType?,
42
- @DoNotStrip
43
- @Keep
44
- val geodesic: Boolean?,
45
- @DoNotStrip
46
- @Keep
47
- val color: String?,
48
- @DoNotStrip
49
- @Keep
50
- val width: Double?
51
- ) {
52
- /* main constructor */
23
+ val id: String,
24
+ @DoNotStrip
25
+ @Keep
26
+ val zIndex: Double?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val pressable: Boolean?,
30
+ @DoNotStrip
31
+ @Keep
32
+ val coordinates: Array<RNLatLng>,
33
+ @DoNotStrip
34
+ @Keep
35
+ val lineCap: RNLineCapType?,
36
+ @DoNotStrip
37
+ @Keep
38
+ val lineJoin: RNLineJoinType?,
39
+ @DoNotStrip
40
+ @Keep
41
+ val geodesic: Boolean?,
42
+ @DoNotStrip
43
+ @Keep
44
+ val color: String?,
45
+ @DoNotStrip
46
+ @Keep
47
+ val width: Double?
48
+ ) {
49
+ private companion object {
50
+ /**
51
+ * Constructor called from C++
52
+ */
53
+ @DoNotStrip
54
+ @Keep
55
+ @Suppress("unused")
56
+ @JvmStatic
57
+ private fun fromCpp(id: String, zIndex: Double?, pressable: Boolean?, coordinates: Array<RNLatLng>, lineCap: RNLineCapType?, lineJoin: RNLineJoinType?, geodesic: Boolean?, color: String?, width: Double?): RNPolyline {
58
+ return RNPolyline(id, zIndex, pressable, coordinates, lineCap, lineJoin, geodesic, color, width)
59
+ }
60
+ }
53
61
  }
@@ -17,16 +17,24 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNPosition
20
+ data class RNPosition(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val x: Double,
23
+ val x: Double,
24
+ @DoNotStrip
25
+ @Keep
26
+ val y: Double
27
+ ) {
28
+ private companion object {
29
+ /**
30
+ * Constructor called from C++
31
+ */
27
32
  @DoNotStrip
28
33
  @Keep
29
- val y: Double
30
- ) {
31
- /* main constructor */
34
+ @Suppress("unused")
35
+ @JvmStatic
36
+ private fun fromCpp(x: Double, y: Double): RNPosition {
37
+ return RNPosition(x, y)
38
+ }
39
+ }
32
40
  }
@@ -17,19 +17,27 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNRegion
20
+ data class RNRegion(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val center: RNLatLng,
27
- @DoNotStrip
28
- @Keep
29
- val latitudeDelta: Double,
23
+ val center: RNLatLng,
24
+ @DoNotStrip
25
+ @Keep
26
+ val latitudeDelta: Double,
27
+ @DoNotStrip
28
+ @Keep
29
+ val longitudeDelta: Double
30
+ ) {
31
+ private companion object {
32
+ /**
33
+ * Constructor called from C++
34
+ */
30
35
  @DoNotStrip
31
36
  @Keep
32
- val longitudeDelta: Double
33
- ) {
34
- /* main constructor */
37
+ @Suppress("unused")
38
+ @JvmStatic
39
+ private fun fromCpp(center: RNLatLng, latitudeDelta: Double, longitudeDelta: Double): RNRegion {
40
+ return RNRegion(center, latitudeDelta, longitudeDelta)
41
+ }
42
+ }
35
43
  }
@@ -17,16 +17,24 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNSize
20
+ data class RNSize(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val width: Double,
23
+ val width: Double,
24
+ @DoNotStrip
25
+ @Keep
26
+ val height: Double
27
+ ) {
28
+ private companion object {
29
+ /**
30
+ * Constructor called from C++
31
+ */
27
32
  @DoNotStrip
28
33
  @Keep
29
- val height: Double
30
- ) {
31
- /* main constructor */
34
+ @Suppress("unused")
35
+ @JvmStatic
36
+ private fun fromCpp(width: Double, height: Double): RNSize {
37
+ return RNSize(width, height)
38
+ }
39
+ }
32
40
  }
@@ -17,22 +17,30 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNSnapshotOptions
20
+ data class RNSnapshotOptions(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val size: RNSize?,
27
- @DoNotStrip
28
- @Keep
29
- val format: RNSnapshotFormat,
30
- @DoNotStrip
31
- @Keep
32
- val quality: Double,
23
+ val size: RNSize?,
24
+ @DoNotStrip
25
+ @Keep
26
+ val format: RNSnapshotFormat,
27
+ @DoNotStrip
28
+ @Keep
29
+ val quality: Double,
30
+ @DoNotStrip
31
+ @Keep
32
+ val resultType: RNSnapshotResultType
33
+ ) {
34
+ private companion object {
35
+ /**
36
+ * Constructor called from C++
37
+ */
33
38
  @DoNotStrip
34
39
  @Keep
35
- val resultType: RNSnapshotResultType
36
- ) {
37
- /* main constructor */
40
+ @Suppress("unused")
41
+ @JvmStatic
42
+ private fun fromCpp(size: RNSize?, format: RNSnapshotFormat, quality: Double, resultType: RNSnapshotResultType): RNSnapshotOptions {
43
+ return RNSnapshotOptions(size, format, quality, resultType)
44
+ }
45
+ }
38
46
  }
@@ -31,18 +31,23 @@ open class HybridRNGoogleMapsPlusViewManager: SimpleViewManager<View>() {
31
31
  return view
32
32
  }
33
33
 
34
+
34
35
  override fun onDropViewInstance(view: View) {
35
36
  super.onDropViewInstance(view)
36
37
  views.remove(view)
38
+ /// added by nitrogen-patch.js
39
+ if (view is GoogleMapsViewImpl) {
40
+ view.destroyInternal()
41
+ }
37
42
  }
38
43
 
39
-
40
44
  /// added by nitrogen-patch.js
41
45
  override fun prepareToRecycleView(reactContext: ThemedReactContext, view: View): View? {
42
46
  return null
43
47
  }
44
48
 
45
- override fun updateState(view: View, props: ReactStylesDiffMap, stateWrapper: StateWrapper): Any? {
49
+
50
+ override fun updateState(view: View, props: ReactStylesDiffMap, stateWrapper: StateWrapper): Any? {
46
51
  val hybridView = views[view] ?: throw Error("Couldn't find view $view in local views table!")
47
52
 
48
53
  // 1. Update each prop individually
@@ -50,10 +50,14 @@ namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
50
50
  namespace margelo::nitro::rngooglemapsplus { enum class RNLineCapType; }
51
51
  // Forward declaration of `RNLineJoinType` to properly resolve imports.
52
52
  namespace margelo::nitro::rngooglemapsplus { enum class RNLineJoinType; }
53
+ // Forward declaration of `RNLocationAndroid` to properly resolve imports.
54
+ namespace margelo::nitro::rngooglemapsplus { struct RNLocationAndroid; }
53
55
  // Forward declaration of `RNLocationConfig` to properly resolve imports.
54
56
  namespace margelo::nitro::rngooglemapsplus { struct RNLocationConfig; }
55
57
  // Forward declaration of `RNLocationErrorCode` to properly resolve imports.
56
58
  namespace margelo::nitro::rngooglemapsplus { enum class RNLocationErrorCode; }
59
+ // Forward declaration of `RNLocationIOS` to properly resolve imports.
60
+ namespace margelo::nitro::rngooglemapsplus { struct RNLocationIOS; }
57
61
  // Forward declaration of `RNLocationPermissionResult` to properly resolve imports.
58
62
  namespace margelo::nitro::rngooglemapsplus { struct RNLocationPermissionResult; }
59
63
  // Forward declaration of `RNLocation` to properly resolve imports.
@@ -116,8 +120,10 @@ namespace RNGoogleMapsPlus { class HybridRNGoogleMapsPlusViewSpec_cxx; }
116
120
  #include "RNLineCapType.hpp"
117
121
  #include "RNLineJoinType.hpp"
118
122
  #include "RNLocation.hpp"
123
+ #include "RNLocationAndroid.hpp"
119
124
  #include "RNLocationConfig.hpp"
120
125
  #include "RNLocationErrorCode.hpp"
126
+ #include "RNLocationIOS.hpp"
121
127
  #include "RNLocationPermissionResult.hpp"
122
128
  #include "RNMapErrorCode.hpp"
123
129
  #include "RNMapPadding.hpp"
@@ -891,6 +897,36 @@ namespace margelo::nitro::rngooglemapsplus::bridge::swift {
891
897
  return *optional;
892
898
  }
893
899
 
900
+ // pragma MARK: std::optional<RNLocationAndroid>
901
+ /**
902
+ * Specialized version of `std::optional<RNLocationAndroid>`.
903
+ */
904
+ using std__optional_RNLocationAndroid_ = std::optional<RNLocationAndroid>;
905
+ inline std::optional<RNLocationAndroid> create_std__optional_RNLocationAndroid_(const RNLocationAndroid& value) noexcept {
906
+ return std::optional<RNLocationAndroid>(value);
907
+ }
908
+ inline bool has_value_std__optional_RNLocationAndroid_(const std::optional<RNLocationAndroid>& optional) noexcept {
909
+ return optional.has_value();
910
+ }
911
+ inline RNLocationAndroid get_std__optional_RNLocationAndroid_(const std::optional<RNLocationAndroid>& optional) noexcept {
912
+ return *optional;
913
+ }
914
+
915
+ // pragma MARK: std::optional<RNLocationIOS>
916
+ /**
917
+ * Specialized version of `std::optional<RNLocationIOS>`.
918
+ */
919
+ using std__optional_RNLocationIOS_ = std::optional<RNLocationIOS>;
920
+ inline std::optional<RNLocationIOS> create_std__optional_RNLocationIOS_(const RNLocationIOS& value) noexcept {
921
+ return std::optional<RNLocationIOS>(value);
922
+ }
923
+ inline bool has_value_std__optional_RNLocationIOS_(const std::optional<RNLocationIOS>& optional) noexcept {
924
+ return optional.has_value();
925
+ }
926
+ inline RNLocationIOS get_std__optional_RNLocationIOS_(const std::optional<RNLocationIOS>& optional) noexcept {
927
+ return *optional;
928
+ }
929
+
894
930
  // pragma MARK: std::function<void(const RNLocation& /* location */)>
895
931
  /**
896
932
  * Specialized version of `std::function<void(const RNLocation&)>`.
@@ -50,10 +50,14 @@ namespace margelo::nitro::rngooglemapsplus { struct RNLatLng; }
50
50
  namespace margelo::nitro::rngooglemapsplus { enum class RNLineCapType; }
51
51
  // Forward declaration of `RNLineJoinType` to properly resolve imports.
52
52
  namespace margelo::nitro::rngooglemapsplus { enum class RNLineJoinType; }
53
+ // Forward declaration of `RNLocationAndroid` to properly resolve imports.
54
+ namespace margelo::nitro::rngooglemapsplus { struct RNLocationAndroid; }
53
55
  // Forward declaration of `RNLocationConfig` to properly resolve imports.
54
56
  namespace margelo::nitro::rngooglemapsplus { struct RNLocationConfig; }
55
57
  // Forward declaration of `RNLocationErrorCode` to properly resolve imports.
56
58
  namespace margelo::nitro::rngooglemapsplus { enum class RNLocationErrorCode; }
59
+ // Forward declaration of `RNLocationIOS` to properly resolve imports.
60
+ namespace margelo::nitro::rngooglemapsplus { struct RNLocationIOS; }
57
61
  // Forward declaration of `RNLocationPermissionResult` to properly resolve imports.
58
62
  namespace margelo::nitro::rngooglemapsplus { struct RNLocationPermissionResult; }
59
63
  // Forward declaration of `RNLocation` to properly resolve imports.
@@ -116,8 +120,10 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNUserInterfaceStyle; }
116
120
  #include "RNLineCapType.hpp"
117
121
  #include "RNLineJoinType.hpp"
118
122
  #include "RNLocation.hpp"
123
+ #include "RNLocationAndroid.hpp"
119
124
  #include "RNLocationConfig.hpp"
120
125
  #include "RNLocationErrorCode.hpp"
126
+ #include "RNLocationIOS.hpp"
121
127
  #include "RNLocationPermissionResult.hpp"
122
128
  #include "RNMapErrorCode.hpp"
123
129
  #include "RNMapPadding.hpp"
@@ -68,6 +68,10 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNIOSLocationAccuracy; }
68
68
  namespace margelo::nitro::rngooglemapsplus { enum class RNMapErrorCode; }
69
69
  // Forward declaration of `RNLocation` to properly resolve imports.
70
70
  namespace margelo::nitro::rngooglemapsplus { struct RNLocation; }
71
+ // Forward declaration of `RNLocationAndroid` to properly resolve imports.
72
+ namespace margelo::nitro::rngooglemapsplus { struct RNLocationAndroid; }
73
+ // Forward declaration of `RNLocationIOS` to properly resolve imports.
74
+ namespace margelo::nitro::rngooglemapsplus { struct RNLocationIOS; }
71
75
  // Forward declaration of `RNLocationErrorCode` to properly resolve imports.
72
76
  namespace margelo::nitro::rngooglemapsplus { enum class RNLocationErrorCode; }
73
77
  // Forward declaration of `RNIndoorBuilding` to properly resolve imports.
@@ -125,6 +129,8 @@ namespace margelo::nitro::rngooglemapsplus { enum class RNIOSPermissionResult; }
125
129
  #include "RNMapErrorCode.hpp"
126
130
  #include <functional>
127
131
  #include "RNLocation.hpp"
132
+ #include "RNLocationAndroid.hpp"
133
+ #include "RNLocationIOS.hpp"
128
134
  #include "RNLocationErrorCode.hpp"
129
135
  #include "RNIndoorBuilding.hpp"
130
136
  #include "RNIndoorLevel.hpp"
@@ -55,6 +55,14 @@ using namespace margelo::nitro::rngooglemapsplus::views;
55
55
  return NO;
56
56
  }
57
57
 
58
+ /// added by nitrogen-patch.js
59
+ - (void)dealloc {
60
+ if (_hybridView) {
61
+ RNGoogleMapsPlus::HybridRNGoogleMapsPlusViewSpec_cxx& swiftPart = _hybridView->getSwiftPart();
62
+ swiftPart.dispose();
63
+ _hybridView.reset();
64
+ }
65
+ }
58
66
 
59
67
  - (void) updateView {
60
68
  // 1. Get Swift part