react-native-google-maps-plus 1.12.0-dev.5 → 1.12.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.
@@ -57,11 +57,11 @@ import java.io.ByteArrayInputStream
57
57
  import java.nio.charset.StandardCharsets
58
58
 
59
59
  class GoogleMapsViewImpl(
60
- val reactContext: ThemedReactContext,
61
- val locationHandler: LocationHandler,
62
- val playServiceHandler: PlayServicesHandler,
63
- val markerBuilder: MapMarkerBuilder,
64
- val mapErrorHandler: MapErrorHandler,
60
+ private val reactContext: ThemedReactContext,
61
+ private val locationHandler: LocationHandler,
62
+ private val playServiceHandler: PlayServicesHandler,
63
+ private val markerBuilder: MapMarkerBuilder,
64
+ private val mapErrorHandler: MapErrorHandler,
65
65
  ) : FrameLayout(reactContext),
66
66
  GoogleMap.OnCameraMoveStartedListener,
67
67
  GoogleMap.OnCameraMoveListener,
@@ -96,7 +96,7 @@ class GoogleMapsViewImpl(
96
96
  private val pendingCircles = mutableListOf<Pair<String, CircleOptions>>()
97
97
  private val pendingHeatmaps = mutableListOf<Pair<String, TileOverlayOptions>>()
98
98
  private val pendingKmlLayers = mutableListOf<Pair<String, String>>()
99
- private val pendingUrlTilesOverlays = mutableListOf<Pair<String, TileOverlayOptions>>()
99
+ private val pendingUrlTileOverlays = mutableListOf<Pair<String, TileOverlayOptions>>()
100
100
 
101
101
  private val markersById = mutableMapOf<String, Marker>()
102
102
  private val polylinesById = mutableMapOf<String, Polyline>()
@@ -268,9 +268,9 @@ class GoogleMapsViewImpl(
268
268
  pendingKmlLayers.forEach { (id, str) -> addKmlLayerInternal(id, str) }
269
269
  pendingKmlLayers.clear()
270
270
  }
271
- if (pendingUrlTilesOverlays.isNotEmpty()) {
272
- pendingUrlTilesOverlays.forEach { (id, opts) -> addUrlTileOverlayInternal(id, opts) }
273
- pendingUrlTilesOverlays.clear()
271
+ if (pendingUrlTileOverlays.isNotEmpty()) {
272
+ pendingUrlTileOverlays.forEach { (id, opts) -> addUrlTileOverlayInternal(id, opts) }
273
+ pendingUrlTileOverlays.clear()
274
274
  }
275
275
  }
276
276
 
@@ -775,7 +775,7 @@ class GoogleMapsViewImpl(
775
775
  opts: TileOverlayOptions,
776
776
  ) = onUi {
777
777
  if (googleMap == null) {
778
- pendingUrlTilesOverlays.add(id to opts)
778
+ pendingUrlTileOverlays.add(id to opts)
779
779
  return@onUi
780
780
  }
781
781
  urlTileOverlaysById.remove(id)?.remove()
@@ -805,7 +805,7 @@ class GoogleMapsViewImpl(
805
805
  it.remove()
806
806
  }
807
807
  urlTileOverlaysById.clear()
808
- pendingUrlTilesOverlays.clear()
808
+ pendingUrlTileOverlays.clear()
809
809
  }
810
810
 
811
811
  fun destroyInternal() =
@@ -27,7 +27,7 @@ private const val INTERVAL_DEFAULT = 600000L
27
27
  private const val MIN_UPDATE_INTERVAL = 3600000L
28
28
 
29
29
  class LocationHandler(
30
- val context: ReactContext,
30
+ private val context: ReactContext,
31
31
  ) : LocationSource {
32
32
  private val fusedLocationClientProviderClient: FusedLocationProviderClient =
33
33
  LocationServices.getFusedLocationProviderClient(context)
@@ -68,7 +68,7 @@ class LocationHandler(
68
68
  val activity = context.currentActivity ?: run { return@onUi }
69
69
 
70
70
  val lr =
71
- if (Build.VERSION.SDK_INT >= 31) {
71
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
72
72
  LocationRequest.Builder(Priority.PRIORITY_HIGH_ACCURACY, 10_000L).build()
73
73
  } else {
74
74
  @Suppress("DEPRECATION")
@@ -42,7 +42,7 @@ import java.util.concurrent.ConcurrentHashMap
42
42
  import kotlin.coroutines.cancellation.CancellationException
43
43
 
44
44
  class MapMarkerBuilder(
45
- val context: ThemedReactContext,
45
+ private val context: ThemedReactContext,
46
46
  private val mapErrorHandler: MapErrorHandler,
47
47
  private val scope: CoroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Default),
48
48
  ) {
@@ -5,7 +5,7 @@ import com.google.android.gms.common.ConnectionResult
5
5
  import com.google.android.gms.common.GoogleApiAvailability
6
6
 
7
7
  class PlayServicesHandler(
8
- val context: ReactContext,
8
+ private val context: ReactContext,
9
9
  ) {
10
10
  fun playServicesAvailability(): Int {
11
11
  val availability = GoogleApiAvailability.getInstance()
@@ -22,7 +22,7 @@ import com.rngooglemapsplus.extensions.toSize
22
22
 
23
23
  @DoNotStrip
24
24
  class RNGoogleMapsPlusView(
25
- val context: ThemedReactContext,
25
+ private val context: ThemedReactContext,
26
26
  ) : HybridRNGoogleMapsPlusViewSpec() {
27
27
  private val mapErrorHandler = MapErrorHandler()
28
28
 
@@ -322,7 +322,6 @@ GMSIndoorDisplayDelegate {
322
322
  }
323
323
  }
324
324
 
325
- var onMapError: ((RNMapErrorCode) -> Void)?
326
325
  var onMapReady: ((Bool) -> Void)?
327
326
  var onMapLoaded: ((RNRegion, RNCamera) -> Void)?
328
327
  var onLocationUpdate: ((RNLocation) -> Void)?
@@ -17,6 +17,13 @@
17
17
  #import "HybridRNGoogleMapsPlusViewSpecSwift.hpp"
18
18
  #import "RNGoogleMapsPlus-Swift-Cxx-Umbrella.hpp"
19
19
 
20
+ #if __has_include(<cxxreact/ReactNativeVersion.h>)
21
+ #include <cxxreact/ReactNativeVersion.h>
22
+ #if REACT_NATIVE_VERSION_MINOR >= 82
23
+ #define ENABLE_RCT_COMPONENT_VIEW_INVALIDATE
24
+ #endif
25
+ #endif
26
+
20
27
  using namespace facebook;
21
28
  using namespace margelo::nitro::rngooglemapsplus;
22
29
  using namespace margelo::nitro::rngooglemapsplus::views;
@@ -324,10 +331,12 @@ using namespace margelo::nitro::rngooglemapsplus::views;
324
331
  swiftPart.maybePrepareForRecycle();
325
332
  }
326
333
 
334
+ #ifdef ENABLE_RCT_COMPONENT_VIEW_INVALIDATE
327
335
  - (void)invalidate {
328
336
  RNGoogleMapsPlus::HybridRNGoogleMapsPlusViewSpec_cxx& swiftPart = _hybridView->getSwiftPart();
329
337
  swiftPart.onDropView();
330
338
  [super invalidate];
331
339
  }
340
+ #endif
332
341
 
333
342
  @end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-maps-plus",
3
- "version": "1.12.0-dev.5",
3
+ "version": "1.12.0",
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",
@@ -77,12 +77,12 @@
77
77
  "provenance": true
78
78
  },
79
79
  "devDependencies": {
80
- "@commitlint/cli": "20.4.4",
81
- "@commitlint/config-conventional": "20.4.4",
80
+ "@commitlint/cli": "20.5.0",
81
+ "@commitlint/config-conventional": "20.5.0",
82
82
  "@eslint/compat": "2.0.3",
83
83
  "@eslint/eslintrc": "3.3.5",
84
84
  "@eslint/js": "9.39.4",
85
- "@expo/config-plugins": "55.0.6",
85
+ "@expo/config-plugins": "55.0.7",
86
86
  "@react-native/babel-preset": "0.84.1",
87
87
  "@react-native/eslint-config": "0.84.1",
88
88
  "@semantic-release/changelog": "6.0.3",
@@ -91,26 +91,26 @@
91
91
  "@semantic-release/npm": "13.1.5",
92
92
  "@types/jest": "30.0.0",
93
93
  "@types/react": "19.2.14",
94
- "conventional-changelog-conventionalcommits": "9.3.0",
94
+ "conventional-changelog-conventionalcommits": "9.3.1",
95
95
  "del-cli": "7.0.0",
96
96
  "eslint": "9.39.4",
97
97
  "eslint-config-prettier": "10.1.8",
98
98
  "eslint-import-resolver-typescript": "4.4.4",
99
99
  "eslint-plugin-import": "2.32.0",
100
- "eslint-plugin-jsdoc": "62.8.0",
100
+ "eslint-plugin-jsdoc": "62.9.0",
101
101
  "eslint-plugin-prettier": "5.5.5",
102
102
  "eslint-plugin-tsdoc": "0.5.2",
103
103
  "eslint-plugin-unused-imports": "4.4.1",
104
104
  "jest": "30.3.0",
105
105
  "lefthook": "2.1.4",
106
- "nitrogen": "0.35.1",
106
+ "nitrogen": "0.35.2",
107
107
  "prettier": "3.8.1",
108
108
  "react": "19.2.3",
109
109
  "react-native": "0.84.1",
110
- "react-native-builder-bob": "0.40.18",
111
- "react-native-nitro-modules": "0.35.1",
110
+ "react-native-builder-bob": "0.41.0",
111
+ "react-native-nitro-modules": "0.35.2",
112
112
  "semantic-release": "25.0.3",
113
- "typedoc": "0.28.17",
113
+ "typedoc": "0.28.18",
114
114
  "typescript": "5.9.3"
115
115
  },
116
116
  "peerDependencies": {