mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Testing map with custom style pack
This commit is contained in:
parent
a1a9bb1740
commit
cee1b0e9f3
1 changed files with 17 additions and 14 deletions
|
|
@ -578,22 +578,25 @@ class MapFragment : ScreenFragment("Map"), Logging {
|
|||
"Save", null
|
||||
)
|
||||
.setNeutralButton("View Regions") { _, _ ->
|
||||
val regions = layoutInflater.inflate(R.layout.adapter_region_layout, null)
|
||||
val regionFragment = AlertDialog.Builder(context)
|
||||
regionFragment.setView(regions)
|
||||
regionFragment.create()
|
||||
regionFragment.show()
|
||||
|
||||
// val regions = layoutInflater.inflate(R.layout.adapter_region_layout, null)
|
||||
// val regionFragment = AlertDialog.Builder(context)
|
||||
// regionFragment.setView(regions)
|
||||
// regionFragment.create()
|
||||
// regionFragment.show()
|
||||
|
||||
// Open up Downloaded Region managers
|
||||
// mapView?.getMapboxMap().also {
|
||||
// it?.flyTo(
|
||||
// CameraOptions.Builder()
|
||||
// .zoom(ZOOM)
|
||||
// .center(point)
|
||||
// .build(), MapAnimationOptions.mapAnimationOptions { duration(1000) })
|
||||
// it?.loadStyleUri(mapView?.getMapboxMap()?.getStyle()?.styleURI.toString())
|
||||
// }
|
||||
mapView?.getMapboxMap().also {
|
||||
it?.flyTo(
|
||||
CameraOptions.Builder()
|
||||
.zoom(ZOOM)
|
||||
.center(point)
|
||||
.build(), MapAnimationOptions.mapAnimationOptions { duration(1000) })
|
||||
if (userStyleURI != null) {
|
||||
it?.loadStyleUri(userStyleURI.toString())
|
||||
} else {
|
||||
it?.loadStyleUri(mapView?.getMapboxMap()?.getStyle()?.styleURI.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
.setNegativeButton(
|
||||
R.string.cancel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue