mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
refactor: change default map source to Mapnik
This commit is contained in:
parent
b3629b6342
commit
4fa9c8f3cb
1 changed files with 2 additions and 2 deletions
|
|
@ -481,7 +481,7 @@ fun MapView(model: UIViewModel = viewModel()) {
|
|||
}
|
||||
|
||||
fun loadOnlineTileSourceBase(): ITileSource {
|
||||
val id = mPrefs.getInt(mapStyleId, 1)
|
||||
val id = mPrefs.getInt(mapStyleId, 0)
|
||||
debug("mapStyleId from prefs: $id")
|
||||
return CustomTileSource.getTileSource(id).also {
|
||||
map.maxZoomLevel = it.maximumZoomLevel.toDouble()
|
||||
|
|
@ -542,7 +542,7 @@ fun MapView(model: UIViewModel = viewModel()) {
|
|||
val builder = MaterialAlertDialogBuilder(context)
|
||||
val mapStyles: Array<CharSequence> = CustomTileSource.mTileSources.values.toTypedArray()
|
||||
|
||||
val mapStyleInt = mPrefs.getInt(mapStyleId, 1)
|
||||
val mapStyleInt = mPrefs.getInt(mapStyleId, 0)
|
||||
builder.setSingleChoiceItems(mapStyles, mapStyleInt) { dialog, which ->
|
||||
debug("Set mapStyleId pref to $which")
|
||||
mPrefs.edit().putInt(mapStyleId, which).apply()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue