Fix CameraUpdateFactory#zoomOut (#1035)

This commit is contained in:
Robin
2023-04-20 09:43:16 +02:00
committed by GitHub
parent 5d03d08e2c
commit f03deb7032
3 changed files with 5 additions and 2 deletions

View File

@@ -10,6 +10,8 @@ MapLibre welcomes participation and contributions from everyone. Please read [`C
### 🐞 Bug fixes
* Fix regression in CameraUpdateFactory#zoomOut ([#1035](https://github.com/maplibre/maplibre-gl-native/pull/1035))
### ⛵ Dependencies
## 10.0.2 - February 23, 2023

View File

@@ -7,7 +7,7 @@ import com.mapbox.mapboxsdk.geometry.LatLng
import com.mapbox.mapboxsdk.geometry.LatLngBounds
import com.mapbox.mapboxsdk.maps.MapboxMap
import timber.log.Timber
import java.lang.Double.min
import java.lang.Double.max
import java.util.Arrays
/**
@@ -448,7 +448,7 @@ object CameraUpdateFactory {
return when (type) {
ZOOM_IN -> currentZoomArg + 1
ZOOM_OUT -> {
min(currentZoomArg - 1, 0.0)
max(currentZoomArg - 1, 0.0)
}
ZOOM_TO -> zoom

View File

@@ -630,6 +630,7 @@ class OfflineManager private constructor(context: Context) {
* @return the single instance of offline manager
*/
@Synchronized
@JvmStatic
fun getInstance(context: Context): OfflineManager {
if (instance == null) {
instance = OfflineManager(context)