mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-02-06 22:02:37 -05:00
Added zoom for multiple GeoPoints
This commit is contained in:
@@ -20,6 +20,7 @@ import org.osmdroid.api.IMapController
|
||||
import org.osmdroid.config.Configuration
|
||||
import org.osmdroid.tileprovider.tilesource.OnlineTileSourceBase
|
||||
import org.osmdroid.tileprovider.tilesource.TileSourceFactory
|
||||
import org.osmdroid.util.BoundingBox
|
||||
import org.osmdroid.util.GeoPoint
|
||||
import org.osmdroid.views.CustomZoomButtonsController
|
||||
import org.osmdroid.views.MapView
|
||||
@@ -141,8 +142,7 @@ class MapFragment : ScreenFragment("Map"), Logging {
|
||||
)
|
||||
)
|
||||
}
|
||||
// TODO: zoom to the middle of all points
|
||||
controller.animateTo(points[0])
|
||||
map.zoomToBoundingBox(BoundingBox.fromGeoPoints(points), true)
|
||||
} else {
|
||||
// Only one node, just zoom in on it
|
||||
val it = nodesWithPosition[0].position!!
|
||||
|
||||
Reference in New Issue
Block a user