react-native-google-maps-plus 1.5.0 → 1.6.0

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 (81) hide show
  1. package/README.md +21 -0
  2. package/app.plugin.js +1 -0
  3. package/expoConfig/build/android/withAndroidGoogleMapsPlus.js +21 -0
  4. package/expoConfig/build/index.js +17 -0
  5. package/expoConfig/build/ios/withIosGoogleMapsPlus.js +91 -0
  6. package/expoConfig/build/types.js +2 -0
  7. package/nitrogen/generated/android/c++/JRNAndroidLocationConfig.hpp +5 -1
  8. package/nitrogen/generated/android/c++/JRNCamera.hpp +5 -1
  9. package/nitrogen/generated/android/c++/JRNCircle.hpp +5 -1
  10. package/nitrogen/generated/android/c++/JRNHeatmap.hpp +5 -1
  11. package/nitrogen/generated/android/c++/JRNHeatmapGradient.hpp +5 -1
  12. package/nitrogen/generated/android/c++/JRNHeatmapPoint.hpp +5 -1
  13. package/nitrogen/generated/android/c++/JRNIOSLocationConfig.hpp +5 -1
  14. package/nitrogen/generated/android/c++/JRNIndoorBuilding.hpp +5 -1
  15. package/nitrogen/generated/android/c++/JRNIndoorLevel.hpp +5 -1
  16. package/nitrogen/generated/android/c++/JRNInitialProps.hpp +5 -1
  17. package/nitrogen/generated/android/c++/JRNKMLayer.hpp +5 -1
  18. package/nitrogen/generated/android/c++/JRNLatLng.hpp +5 -1
  19. package/nitrogen/generated/android/c++/JRNLatLngBounds.hpp +5 -1
  20. package/nitrogen/generated/android/c++/JRNLocation.hpp +5 -1
  21. package/nitrogen/generated/android/c++/JRNLocationAndroid.hpp +5 -1
  22. package/nitrogen/generated/android/c++/JRNLocationConfig.hpp +5 -1
  23. package/nitrogen/generated/android/c++/JRNLocationIOS.hpp +5 -1
  24. package/nitrogen/generated/android/c++/JRNLocationPermissionResult.hpp +5 -1
  25. package/nitrogen/generated/android/c++/JRNMapPadding.hpp +5 -1
  26. package/nitrogen/generated/android/c++/JRNMapUiSettings.hpp +5 -1
  27. package/nitrogen/generated/android/c++/JRNMapZoomConfig.hpp +5 -1
  28. package/nitrogen/generated/android/c++/JRNMarker.hpp +5 -1
  29. package/nitrogen/generated/android/c++/JRNMarkerSvg.hpp +5 -1
  30. package/nitrogen/generated/android/c++/JRNPolygon.hpp +5 -1
  31. package/nitrogen/generated/android/c++/JRNPolygonHole.hpp +5 -1
  32. package/nitrogen/generated/android/c++/JRNPolyline.hpp +5 -1
  33. package/nitrogen/generated/android/c++/JRNPosition.hpp +5 -1
  34. package/nitrogen/generated/android/c++/JRNRegion.hpp +5 -1
  35. package/nitrogen/generated/android/c++/JRNSize.hpp +5 -1
  36. package/nitrogen/generated/android/c++/JRNSnapshotOptions.hpp +5 -1
  37. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusModuleSpec.kt +1 -1
  38. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/HybridRNGoogleMapsPlusViewSpec.kt +1 -1
  39. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNAndroidLocationConfig.kt +19 -11
  40. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCamera.kt +22 -14
  41. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNCircle.kt +36 -28
  42. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmap.kt +31 -23
  43. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmapGradient.kt +19 -11
  44. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNHeatmapPoint.kt +19 -11
  45. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIOSLocationConfig.kt +16 -8
  46. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIndoorBuilding.kt +22 -14
  47. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNIndoorLevel.kt +22 -14
  48. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNInitialProps.kt +19 -11
  49. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNKMLayer.kt +16 -8
  50. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLng.kt +16 -8
  51. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLatLngBounds.kt +16 -8
  52. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocation.kt +36 -28
  53. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationAndroid.kt +36 -28
  54. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationConfig.kt +16 -8
  55. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationIOS.kt +31 -23
  56. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNLocationPermissionResult.kt +16 -8
  57. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapPadding.kt +22 -14
  58. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapUiSettings.kt +43 -35
  59. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMapZoomConfig.kt +16 -8
  60. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarker.kt +49 -41
  61. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNMarkerSvg.kt +19 -11
  62. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygon.kt +39 -31
  63. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolygonHole.kt +13 -5
  64. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPolyline.kt +39 -31
  65. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNPosition.kt +16 -8
  66. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNRegion.kt +19 -11
  67. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSize.kt +16 -8
  68. package/nitrogen/generated/android/kotlin/com/margelo/nitro/rngooglemapsplus/RNSnapshotOptions.kt +22 -14
  69. package/nitrogen/generated/ios/swift/HybridRNGoogleMapsPlusViewSpec_cxx.swift +56 -7
  70. package/nitrogen/generated/ios/swift/RNCircle.swift +8 -1
  71. package/nitrogen/generated/ios/swift/RNHeatmap.swift +8 -1
  72. package/nitrogen/generated/ios/swift/RNIndoorBuilding.swift +8 -1
  73. package/nitrogen/generated/ios/swift/RNIndoorLevel.swift +8 -1
  74. package/nitrogen/generated/ios/swift/RNInitialProps.swift +8 -1
  75. package/nitrogen/generated/ios/swift/RNLocationAndroid.swift +8 -1
  76. package/nitrogen/generated/ios/swift/RNLocationIOS.swift +8 -1
  77. package/nitrogen/generated/ios/swift/RNMapUiSettings.swift +88 -11
  78. package/nitrogen/generated/ios/swift/RNMarker.swift +24 -3
  79. package/nitrogen/generated/ios/swift/RNPolygon.swift +16 -2
  80. package/nitrogen/generated/ios/swift/RNPolyline.swift +16 -2
  81. package/package.json +15 -5
@@ -17,19 +17,27 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNAndroidLocationConfig
20
+ data class RNAndroidLocationConfig(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val priority: RNAndroidLocationPriority?,
27
- @DoNotStrip
28
- @Keep
29
- val interval: Double?,
23
+ val priority: RNAndroidLocationPriority?,
24
+ @DoNotStrip
25
+ @Keep
26
+ val interval: Double?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val minUpdateInterval: Double?
30
+ ) {
31
+ private companion object {
32
+ /**
33
+ * Constructor called from C++
34
+ */
30
35
  @DoNotStrip
31
36
  @Keep
32
- val minUpdateInterval: Double?
33
- ) {
34
- /* main constructor */
37
+ @Suppress("unused")
38
+ @JvmStatic
39
+ private fun fromCpp(priority: RNAndroidLocationPriority?, interval: Double?, minUpdateInterval: Double?): RNAndroidLocationConfig {
40
+ return RNAndroidLocationConfig(priority, interval, minUpdateInterval)
41
+ }
42
+ }
35
43
  }
@@ -17,22 +17,30 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNCamera
20
+ data class RNCamera(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val center: RNLatLng?,
27
- @DoNotStrip
28
- @Keep
29
- val zoom: Double?,
30
- @DoNotStrip
31
- @Keep
32
- val bearing: Double?,
23
+ val center: RNLatLng?,
24
+ @DoNotStrip
25
+ @Keep
26
+ val zoom: Double?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val bearing: Double?,
30
+ @DoNotStrip
31
+ @Keep
32
+ val tilt: Double?
33
+ ) {
34
+ private companion object {
35
+ /**
36
+ * Constructor called from C++
37
+ */
33
38
  @DoNotStrip
34
39
  @Keep
35
- val tilt: Double?
36
- ) {
37
- /* main constructor */
40
+ @Suppress("unused")
41
+ @JvmStatic
42
+ private fun fromCpp(center: RNLatLng?, zoom: Double?, bearing: Double?, tilt: Double?): RNCamera {
43
+ return RNCamera(center, zoom, bearing, tilt)
44
+ }
45
+ }
38
46
  }
@@ -17,34 +17,42 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNCircle
20
+ data class RNCircle(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val id: String,
27
- @DoNotStrip
28
- @Keep
29
- val pressable: Boolean?,
30
- @DoNotStrip
31
- @Keep
32
- val zIndex: Double?,
33
- @DoNotStrip
34
- @Keep
35
- val center: RNLatLng,
36
- @DoNotStrip
37
- @Keep
38
- val radius: Double,
39
- @DoNotStrip
40
- @Keep
41
- val strokeWidth: Double?,
42
- @DoNotStrip
43
- @Keep
44
- val strokeColor: String?,
45
- @DoNotStrip
46
- @Keep
47
- val fillColor: String?
48
- ) {
49
- /* main constructor */
23
+ val id: String,
24
+ @DoNotStrip
25
+ @Keep
26
+ val pressable: Boolean?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val zIndex: Double?,
30
+ @DoNotStrip
31
+ @Keep
32
+ val center: RNLatLng,
33
+ @DoNotStrip
34
+ @Keep
35
+ val radius: Double,
36
+ @DoNotStrip
37
+ @Keep
38
+ val strokeWidth: Double?,
39
+ @DoNotStrip
40
+ @Keep
41
+ val strokeColor: String?,
42
+ @DoNotStrip
43
+ @Keep
44
+ val fillColor: String?
45
+ ) {
46
+ private companion object {
47
+ /**
48
+ * Constructor called from C++
49
+ */
50
+ @DoNotStrip
51
+ @Keep
52
+ @Suppress("unused")
53
+ @JvmStatic
54
+ private fun fromCpp(id: String, pressable: Boolean?, zIndex: Double?, center: RNLatLng, radius: Double, strokeWidth: Double?, strokeColor: String?, fillColor: String?): RNCircle {
55
+ return RNCircle(id, pressable, zIndex, center, radius, strokeWidth, strokeColor, fillColor)
56
+ }
57
+ }
50
58
  }
@@ -17,31 +17,39 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNHeatmap
20
+ data class RNHeatmap(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val id: String,
27
- @DoNotStrip
28
- @Keep
29
- val pressable: Boolean?,
30
- @DoNotStrip
31
- @Keep
32
- val zIndex: Double?,
33
- @DoNotStrip
34
- @Keep
35
- val weightedData: Array<RNHeatmapPoint>,
36
- @DoNotStrip
37
- @Keep
38
- val radius: Double?,
39
- @DoNotStrip
40
- @Keep
41
- val opacity: Double?,
23
+ val id: String,
24
+ @DoNotStrip
25
+ @Keep
26
+ val pressable: Boolean?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val zIndex: Double?,
30
+ @DoNotStrip
31
+ @Keep
32
+ val weightedData: Array<RNHeatmapPoint>,
33
+ @DoNotStrip
34
+ @Keep
35
+ val radius: Double?,
36
+ @DoNotStrip
37
+ @Keep
38
+ val opacity: Double?,
39
+ @DoNotStrip
40
+ @Keep
41
+ val gradient: RNHeatmapGradient?
42
+ ) {
43
+ private companion object {
44
+ /**
45
+ * Constructor called from C++
46
+ */
42
47
  @DoNotStrip
43
48
  @Keep
44
- val gradient: RNHeatmapGradient?
45
- ) {
46
- /* main constructor */
49
+ @Suppress("unused")
50
+ @JvmStatic
51
+ private fun fromCpp(id: String, pressable: Boolean?, zIndex: Double?, weightedData: Array<RNHeatmapPoint>, radius: Double?, opacity: Double?, gradient: RNHeatmapGradient?): RNHeatmap {
52
+ return RNHeatmap(id, pressable, zIndex, weightedData, radius, opacity, gradient)
53
+ }
54
+ }
47
55
  }
@@ -17,19 +17,27 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNHeatmapGradient
20
+ data class RNHeatmapGradient(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val colors: Array<String>,
27
- @DoNotStrip
28
- @Keep
29
- val startPoints: DoubleArray,
23
+ val colors: Array<String>,
24
+ @DoNotStrip
25
+ @Keep
26
+ val startPoints: DoubleArray,
27
+ @DoNotStrip
28
+ @Keep
29
+ val colorMapSize: Double
30
+ ) {
31
+ private companion object {
32
+ /**
33
+ * Constructor called from C++
34
+ */
30
35
  @DoNotStrip
31
36
  @Keep
32
- val colorMapSize: Double
33
- ) {
34
- /* main constructor */
37
+ @Suppress("unused")
38
+ @JvmStatic
39
+ private fun fromCpp(colors: Array<String>, startPoints: DoubleArray, colorMapSize: Double): RNHeatmapGradient {
40
+ return RNHeatmapGradient(colors, startPoints, colorMapSize)
41
+ }
42
+ }
35
43
  }
@@ -17,19 +17,27 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNHeatmapPoint
20
+ data class RNHeatmapPoint(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val latitude: Double,
27
- @DoNotStrip
28
- @Keep
29
- val longitude: Double,
23
+ val latitude: Double,
24
+ @DoNotStrip
25
+ @Keep
26
+ val longitude: Double,
27
+ @DoNotStrip
28
+ @Keep
29
+ val weight: Double
30
+ ) {
31
+ private companion object {
32
+ /**
33
+ * Constructor called from C++
34
+ */
30
35
  @DoNotStrip
31
36
  @Keep
32
- val weight: Double
33
- ) {
34
- /* main constructor */
37
+ @Suppress("unused")
38
+ @JvmStatic
39
+ private fun fromCpp(latitude: Double, longitude: Double, weight: Double): RNHeatmapPoint {
40
+ return RNHeatmapPoint(latitude, longitude, weight)
41
+ }
42
+ }
35
43
  }
@@ -17,16 +17,24 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNIOSLocationConfig
20
+ data class RNIOSLocationConfig(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val desiredAccuracy: RNIOSLocationAccuracy?,
23
+ val desiredAccuracy: RNIOSLocationAccuracy?,
24
+ @DoNotStrip
25
+ @Keep
26
+ val distanceFilterMeters: Double?
27
+ ) {
28
+ private companion object {
29
+ /**
30
+ * Constructor called from C++
31
+ */
27
32
  @DoNotStrip
28
33
  @Keep
29
- val distanceFilterMeters: Double?
30
- ) {
31
- /* main constructor */
34
+ @Suppress("unused")
35
+ @JvmStatic
36
+ private fun fromCpp(desiredAccuracy: RNIOSLocationAccuracy?, distanceFilterMeters: Double?): RNIOSLocationConfig {
37
+ return RNIOSLocationConfig(desiredAccuracy, distanceFilterMeters)
38
+ }
39
+ }
32
40
  }
@@ -17,22 +17,30 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNIndoorBuilding
20
+ data class RNIndoorBuilding(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val activeLevelIndex: Double?,
27
- @DoNotStrip
28
- @Keep
29
- val defaultLevelIndex: Double?,
30
- @DoNotStrip
31
- @Keep
32
- val levels: Array<RNIndoorLevel>,
23
+ val activeLevelIndex: Double?,
24
+ @DoNotStrip
25
+ @Keep
26
+ val defaultLevelIndex: Double?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val levels: Array<RNIndoorLevel>,
30
+ @DoNotStrip
31
+ @Keep
32
+ val underground: Boolean?
33
+ ) {
34
+ private companion object {
35
+ /**
36
+ * Constructor called from C++
37
+ */
33
38
  @DoNotStrip
34
39
  @Keep
35
- val underground: Boolean?
36
- ) {
37
- /* main constructor */
40
+ @Suppress("unused")
41
+ @JvmStatic
42
+ private fun fromCpp(activeLevelIndex: Double?, defaultLevelIndex: Double?, levels: Array<RNIndoorLevel>, underground: Boolean?): RNIndoorBuilding {
43
+ return RNIndoorBuilding(activeLevelIndex, defaultLevelIndex, levels, underground)
44
+ }
45
+ }
38
46
  }
@@ -17,22 +17,30 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNIndoorLevel
20
+ data class RNIndoorLevel(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val index: Double,
27
- @DoNotStrip
28
- @Keep
29
- val name: String?,
30
- @DoNotStrip
31
- @Keep
32
- val shortName: String?,
23
+ val index: Double,
24
+ @DoNotStrip
25
+ @Keep
26
+ val name: String?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val shortName: String?,
30
+ @DoNotStrip
31
+ @Keep
32
+ val active: Boolean?
33
+ ) {
34
+ private companion object {
35
+ /**
36
+ * Constructor called from C++
37
+ */
33
38
  @DoNotStrip
34
39
  @Keep
35
- val active: Boolean?
36
- ) {
37
- /* main constructor */
40
+ @Suppress("unused")
41
+ @JvmStatic
42
+ private fun fromCpp(index: Double, name: String?, shortName: String?, active: Boolean?): RNIndoorLevel {
43
+ return RNIndoorLevel(index, name, shortName, active)
44
+ }
45
+ }
38
46
  }
@@ -17,19 +17,27 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNInitialProps
20
+ data class RNInitialProps(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val mapId: String?,
27
- @DoNotStrip
28
- @Keep
29
- val liteMode: Boolean?,
23
+ val mapId: String?,
24
+ @DoNotStrip
25
+ @Keep
26
+ val liteMode: Boolean?,
27
+ @DoNotStrip
28
+ @Keep
29
+ val camera: RNCamera?
30
+ ) {
31
+ private companion object {
32
+ /**
33
+ * Constructor called from C++
34
+ */
30
35
  @DoNotStrip
31
36
  @Keep
32
- val camera: RNCamera?
33
- ) {
34
- /* main constructor */
37
+ @Suppress("unused")
38
+ @JvmStatic
39
+ private fun fromCpp(mapId: String?, liteMode: Boolean?, camera: RNCamera?): RNInitialProps {
40
+ return RNInitialProps(mapId, liteMode, camera)
41
+ }
42
+ }
35
43
  }
@@ -17,16 +17,24 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNKMLayer
20
+ data class RNKMLayer(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val id: String,
23
+ val id: String,
24
+ @DoNotStrip
25
+ @Keep
26
+ val kmlString: String
27
+ ) {
28
+ private companion object {
29
+ /**
30
+ * Constructor called from C++
31
+ */
27
32
  @DoNotStrip
28
33
  @Keep
29
- val kmlString: String
30
- ) {
31
- /* main constructor */
34
+ @Suppress("unused")
35
+ @JvmStatic
36
+ private fun fromCpp(id: String, kmlString: String): RNKMLayer {
37
+ return RNKMLayer(id, kmlString)
38
+ }
39
+ }
32
40
  }
@@ -17,16 +17,24 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNLatLng
20
+ data class RNLatLng(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val latitude: Double,
23
+ val latitude: Double,
24
+ @DoNotStrip
25
+ @Keep
26
+ val longitude: Double
27
+ ) {
28
+ private companion object {
29
+ /**
30
+ * Constructor called from C++
31
+ */
27
32
  @DoNotStrip
28
33
  @Keep
29
- val longitude: Double
30
- ) {
31
- /* main constructor */
34
+ @Suppress("unused")
35
+ @JvmStatic
36
+ private fun fromCpp(latitude: Double, longitude: Double): RNLatLng {
37
+ return RNLatLng(latitude, longitude)
38
+ }
39
+ }
32
40
  }
@@ -17,16 +17,24 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNLatLngBounds
20
+ data class RNLatLngBounds(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val northEast: RNLatLng,
23
+ val northEast: RNLatLng,
24
+ @DoNotStrip
25
+ @Keep
26
+ val southWest: RNLatLng
27
+ ) {
28
+ private companion object {
29
+ /**
30
+ * Constructor called from C++
31
+ */
27
32
  @DoNotStrip
28
33
  @Keep
29
- val southWest: RNLatLng
30
- ) {
31
- /* main constructor */
34
+ @Suppress("unused")
35
+ @JvmStatic
36
+ private fun fromCpp(northEast: RNLatLng, southWest: RNLatLng): RNLatLngBounds {
37
+ return RNLatLngBounds(northEast, southWest)
38
+ }
39
+ }
32
40
  }
@@ -17,34 +17,42 @@ import com.margelo.nitro.core.*
17
17
  */
18
18
  @DoNotStrip
19
19
  @Keep
20
- data class RNLocation
20
+ data class RNLocation(
21
21
  @DoNotStrip
22
22
  @Keep
23
- constructor(
24
- @DoNotStrip
25
- @Keep
26
- val center: RNLatLng,
27
- @DoNotStrip
28
- @Keep
29
- val altitude: Double,
30
- @DoNotStrip
31
- @Keep
32
- val accuracy: Double,
33
- @DoNotStrip
34
- @Keep
35
- val bearing: Double,
36
- @DoNotStrip
37
- @Keep
38
- val speed: Double,
39
- @DoNotStrip
40
- @Keep
41
- val time: Double,
42
- @DoNotStrip
43
- @Keep
44
- val android: RNLocationAndroid?,
45
- @DoNotStrip
46
- @Keep
47
- val ios: RNLocationIOS?
48
- ) {
49
- /* main constructor */
23
+ val center: RNLatLng,
24
+ @DoNotStrip
25
+ @Keep
26
+ val altitude: Double,
27
+ @DoNotStrip
28
+ @Keep
29
+ val accuracy: Double,
30
+ @DoNotStrip
31
+ @Keep
32
+ val bearing: Double,
33
+ @DoNotStrip
34
+ @Keep
35
+ val speed: Double,
36
+ @DoNotStrip
37
+ @Keep
38
+ val time: Double,
39
+ @DoNotStrip
40
+ @Keep
41
+ val android: RNLocationAndroid?,
42
+ @DoNotStrip
43
+ @Keep
44
+ val ios: RNLocationIOS?
45
+ ) {
46
+ private companion object {
47
+ /**
48
+ * Constructor called from C++
49
+ */
50
+ @DoNotStrip
51
+ @Keep
52
+ @Suppress("unused")
53
+ @JvmStatic
54
+ private fun fromCpp(center: RNLatLng, altitude: Double, accuracy: Double, bearing: Double, speed: Double, time: Double, android: RNLocationAndroid?, ios: RNLocationIOS?): RNLocation {
55
+ return RNLocation(center, altitude, accuracy, bearing, speed, time, android, ios)
56
+ }
57
+ }
50
58
  }