Testing map with custom style pack

This commit is contained in:
Jackson Rosenthal 2022-03-02 18:46:50 -05:00
parent a1a9bb1740
commit cee1b0e9f3

View file

@ -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