Implement MapStyle abstraction

This commit is contained in:
2026-04-14 18:12:09 +02:00
parent 31c92aeae9
commit baccc6bc1b
11 changed files with 451 additions and 54 deletions
@@ -18,8 +18,9 @@ public class MapComponent implements Component {
MapRenderer mapRenderer;
AppController app;
public String style;
public MapStyle currentStyle;
public Map<Class<? extends MapOverlay>, MapOverlay> overlays = new HashMap<>();
public MapComponent(AppController ref) {
this.app = ref;
switch(UserPrefsHelper.mapRenderer(app.getPrefs())) {
@@ -37,9 +38,9 @@ public class MapComponent implements Component {
return new FragmentLayoutContentMap(mapRenderer.getView());
}
public void setStyle(String style) {
public void setStyle(MapStyle style) {
this.style = style;
mapRenderer.reload();
update();
}
public void switchOverlay(MapOverlay overlay) {