From 4fa9c8f3cb9f7462487b5ab081a43830f289b3e4 Mon Sep 17 00:00:00 2001 From: andrekir Date: Mon, 11 Sep 2023 21:39:55 -0300 Subject: [PATCH] refactor: change default map source to `Mapnik` --- app/src/main/java/com/geeksville/mesh/ui/map/MapFragment.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/geeksville/mesh/ui/map/MapFragment.kt b/app/src/main/java/com/geeksville/mesh/ui/map/MapFragment.kt index b8bd1b4fe..506e7425f 100644 --- a/app/src/main/java/com/geeksville/mesh/ui/map/MapFragment.kt +++ b/app/src/main/java/com/geeksville/mesh/ui/map/MapFragment.kt @@ -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 = 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()