aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx/trackermap/TrackerMap
diff options
context:
space:
mode:
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
index cfb59a0..b8ce350 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
@@ -81,9 +81,9 @@ class MapFragment : GlobeMapFragment() {
loader = QuadImageLoader(params, tileInfo, baseControl)
loader?.setImageFormat(RenderController.ImageFormat.MaplyImageUShort565)
- val latitude = 23.191
- val longitude = -100.36
- focusOn(latitude, longitude, height = 0.4, animated = false)
+ val latitude = 23.191 * Math.PI / 180
+ val longitude = -100.36 * Math.PI / 180
+ mapControl.setPositionGeo(latitude, longitude, 0.4)
}
override fun mapDidStopMoving(
@@ -235,9 +235,9 @@ class MapFragment : GlobeMapFragment() {
}
mbr.expandByFraction(0.1)
- mapControl.addPostSurfaceRunnable {
- val zoom = mapControl.zoomLimitMax.coerceAtLeast(
- mapControl.findHeightToViewBounds(mbr, mbr.middle()))
+ mapControl?.addPostSurfaceRunnable {
+ val zoom = mapControl.findHeightToViewBounds(mbr, mbr.middle())
+ .coerceAtLeast(mapControl.zoomLimitMin)
mapControl.setPositionGeo(mbr.middle(), zoom)
}
}