Skip to content

Commit 9037f2e

Browse files
committed
chore: minor code quality improvements
1 parent dee296f commit 9037f2e

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

android/src/main/java/com/rngooglemapsplus/GoogleMapsViewImpl.kt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ import java.io.ByteArrayInputStream
5757
import java.nio.charset.StandardCharsets
5858

5959
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,
6565
) : FrameLayout(reactContext),
6666
GoogleMap.OnCameraMoveStartedListener,
6767
GoogleMap.OnCameraMoveListener,
@@ -96,7 +96,7 @@ class GoogleMapsViewImpl(
9696
private val pendingCircles = mutableListOf<Pair<String, CircleOptions>>()
9797
private val pendingHeatmaps = mutableListOf<Pair<String, TileOverlayOptions>>()
9898
private val pendingKmlLayers = mutableListOf<Pair<String, String>>()
99-
private val pendingUrlTilesOverlays = mutableListOf<Pair<String, TileOverlayOptions>>()
99+
private val pendingUrlTileOverlays = mutableListOf<Pair<String, TileOverlayOptions>>()
100100

101101
private val markersById = mutableMapOf<String, Marker>()
102102
private val polylinesById = mutableMapOf<String, Polyline>()
@@ -268,9 +268,9 @@ class GoogleMapsViewImpl(
268268
pendingKmlLayers.forEach { (id, str) -> addKmlLayerInternal(id, str) }
269269
pendingKmlLayers.clear()
270270
}
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()
274274
}
275275
}
276276

@@ -775,7 +775,7 @@ class GoogleMapsViewImpl(
775775
opts: TileOverlayOptions,
776776
) = onUi {
777777
if (googleMap == null) {
778-
pendingUrlTilesOverlays.add(id to opts)
778+
pendingUrlTileOverlays.add(id to opts)
779779
return@onUi
780780
}
781781
urlTileOverlaysById.remove(id)?.remove()
@@ -805,7 +805,7 @@ class GoogleMapsViewImpl(
805805
it.remove()
806806
}
807807
urlTileOverlaysById.clear()
808-
pendingUrlTilesOverlays.clear()
808+
pendingUrlTileOverlays.clear()
809809
}
810810

811811
fun destroyInternal() =

android/src/main/java/com/rngooglemapsplus/LocationHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class LocationHandler(
6868
val activity = context.currentActivity ?: run { return@onUi }
6969

7070
val lr =
71-
if (Build.VERSION.SDK_INT >= 31) {
71+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
7272
LocationRequest.Builder(Priority.PRIORITY_HIGH_ACCURACY, 10_000L).build()
7373
} else {
7474
@Suppress("DEPRECATION")

ios/GoogleMapViewImpl.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ GMSIndoorDisplayDelegate {
322322
}
323323
}
324324

325-
var onMapError: ((RNMapErrorCode) -> Void)?
326325
var onMapReady: ((Bool) -> Void)?
327326
var onMapLoaded: ((RNRegion, RNCamera) -> Void)?
328327
var onLocationUpdate: ((RNLocation) -> Void)?

0 commit comments

Comments
 (0)