react-native-google-maps-plus 1.10.0-dev.2 → 1.10.0-dev.3

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.
@@ -845,7 +845,6 @@ class GoogleMapsViewImpl(
845
845
  mapView?.removeAllViews()
846
846
  super.removeAllViews()
847
847
  reactContext.unregisterComponentCallbacks(componentCallbacks)
848
- mapViewInitialized = false
849
848
  }
850
849
 
851
850
  override fun requestLayout() {
@@ -56,6 +56,8 @@ class LocationHandler(
56
56
  this.interval = interval ?: INTERVAL_DEFAULT
57
57
  this.minUpdateInterval = minUpdateInterval ?: MIN_UPDATE_INTERVAL
58
58
  buildLocationRequest(this.priority, this.interval, this.minUpdateInterval)
59
+
60
+ if (!isActive) return
59
61
  stop()
60
62
  start()
61
63
  }
@@ -173,7 +175,7 @@ class LocationHandler(
173
175
  val error = e.toLocationErrorCode(context)
174
176
  onError?.invoke(error)
175
177
  }
176
- } catch (se: SecurityException) {
178
+ } catch (_: SecurityException) {
177
179
  onError?.invoke(RNLocationErrorCode.PERMISSION_DENIED)
178
180
  } catch (ex: Exception) {
179
181
  val error = ex.toLocationErrorCode(context)
@@ -193,11 +195,9 @@ class LocationHandler(
193
195
 
194
196
  override fun activate(listener: LocationSource.OnLocationChangedListener) {
195
197
  this.listener = listener
196
- start()
197
198
  }
198
199
 
199
200
  override fun deactivate() {
200
201
  listener = null
201
- stop()
202
202
  }
203
203
  }
@@ -10,8 +10,8 @@ GMSIndoorDisplayDelegate {
10
10
  private let locationHandler: LocationHandler
11
11
  private let markerBuilder: MapMarkerBuilder
12
12
  private var mapView: GMSMapView?
13
- private var initialized = false
14
- private var loaded = false
13
+ private var mapViewInitialized = false
14
+ private var mapViewLoaded = false
15
15
  private var deInitialized = false
16
16
 
17
17
  private var pendingMarkers: [(id: String, marker: GMSMarker)] = []
@@ -97,8 +97,8 @@ GMSIndoorDisplayDelegate {
97
97
 
98
98
  @MainActor
99
99
  func initMapView() {
100
- if initialized { return }
101
- initialized = true
100
+ if mapViewInitialized { return }
101
+ mapViewInitialized = true
102
102
  googleMapOptions.frame = bounds
103
103
 
104
104
  mapView = GMSMapView.init(options: googleMapOptions)
@@ -221,7 +221,7 @@ GMSIndoorDisplayDelegate {
221
221
  @MainActor
222
222
  var trafficEnabled: Bool? {
223
223
  didSet {
224
- mapView?.isTrafficEnabled = false
224
+ mapView?.isTrafficEnabled = trafficEnabled ?? false
225
225
  }
226
226
  }
227
227
 
@@ -717,7 +717,6 @@ GMSIndoorDisplayDelegate {
717
717
  self.mapView?.indoorDisplay.delegate = nil
718
718
  self.mapView?.delegate = nil
719
719
  self.mapView = nil
720
- self.initialized = false
721
720
  }
722
721
  }
723
722
 
@@ -752,8 +751,8 @@ GMSIndoorDisplayDelegate {
752
751
  }
753
752
 
754
753
  func mapViewDidFinishTileRendering(_ mapView: GMSMapView) {
755
- guard !loaded else { return }
756
- loaded = true
754
+ guard !mapViewLoaded else { return }
755
+ mapViewLoaded = true
757
756
  let visibleRegion = mapView.projection.visibleRegion().toRNRegion()
758
757
  let camera = mapView.camera.toRNCamera()
759
758
 
@@ -761,7 +760,7 @@ GMSIndoorDisplayDelegate {
761
760
  }
762
761
 
763
762
  func mapView(_ mapView: GMSMapView, willMove gesture: Bool) {
764
- if !loaded { return }
763
+ if !mapViewLoaded { return }
765
764
  onMain {
766
765
  self.cameraMoveReasonIsGesture = gesture
767
766
 
@@ -773,7 +772,7 @@ GMSIndoorDisplayDelegate {
773
772
  }
774
773
 
775
774
  func mapView(_ mapView: GMSMapView, didChange position: GMSCameraPosition) {
776
- if !loaded { return }
775
+ if !mapViewLoaded { return }
777
776
  onMain {
778
777
  let visibleRegion = mapView.projection.visibleRegion().toRNRegion()
779
778
  let camera = mapView.camera.toRNCamera()
@@ -784,7 +783,7 @@ GMSIndoorDisplayDelegate {
784
783
  }
785
784
 
786
785
  func mapView(_ mapView: GMSMapView, idleAt position: GMSCameraPosition) {
787
- if !loaded { return }
786
+ if !mapViewLoaded { return }
788
787
  onMain {
789
788
  let visibleRegion = mapView.projection.visibleRegion().toRNRegion()
790
789
  let camera = mapView.camera.toRNCamera()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-google-maps-plus",
3
- "version": "1.10.0-dev.2",
3
+ "version": "1.10.0-dev.3",
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",