Implement MapStyle abstraction
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user