rename osmarender theme to 'default'
This commit is contained in:
parent
bb7ca9be08
commit
4990b827d9
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright 2010, 2011, 2012 mapsforge.org
|
||||
* Copyright 2013 OpenScienceMap.org
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
@ -16,17 +17,12 @@ package org.oscim.theme;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
|
||||
/**
|
||||
* Enumeration of all internal rendering themes.
|
||||
*/
|
||||
public enum InternalRenderTheme implements Theme {
|
||||
/**
|
||||
* A rendering theme similar to the OpenStreetMap Osmarender style.
|
||||
*
|
||||
* @see <a href="http://wiki.openstreetmap.org/wiki/Osmarender">Osmarender</a>
|
||||
*/
|
||||
OSMARENDER("/org/oscim/theme/osmarender/osmarender.xml"),
|
||||
|
||||
DEFAULT("/org/oscim/theme/osmarender/default.xml"),
|
||||
|
||||
TRONRENDER("/org/oscim/theme/osmarender/tronrender.xml");
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<style-area name="residential" fill="#f0eee8" fade="10"/>
|
||||
|
||||
<style-area name="railway|industrial" fill="#e6e1e4" fade="10"/>
|
||||
<style-area name="railway|industrial" fill="#e6e3e5" fade="10"/>
|
||||
<!-- "#f0fae7" mint green -->
|
||||
<style-area name="farmland" fill="#fff8bf" fade="11" />
|
||||
|
||||
@ -499,12 +499,12 @@
|
||||
<area fill="#e9e6e3" fade="15" /> -->
|
||||
</rule>
|
||||
|
||||
<!-- <rule e="way" k="*" v="*" zoom-min="17">
|
||||
<rule e="way" k="*" v="*" zoom-min="17">
|
||||
<caption k="name" font-style="bold" font-size="10" fill="#4040ff"
|
||||
stroke="#ffffff" stroke-width="2.0" />
|
||||
<caption k="addr:housenumber" font-style="bold" font-size="10" fill="#606060"
|
||||
stroke="#ffffff" stroke-width="2.0" />
|
||||
</rule> -->
|
||||
</rule>
|
||||
</rule>
|
||||
|
||||
<!-- outline 1 - 4 -->
|
@ -100,7 +100,6 @@ public abstract class MapActivity extends Activity {
|
||||
|
||||
/**
|
||||
* This method is called once by each MapView during its setup process.
|
||||
*
|
||||
* @param mapView
|
||||
* the calling MapView.
|
||||
*/
|
||||
@ -131,16 +130,20 @@ public abstract class MapActivity extends Activity {
|
||||
}
|
||||
|
||||
String theme = sharedPreferences.getString(KEY_THEME,
|
||||
InternalRenderTheme.OSMARENDER.name());
|
||||
InternalRenderTheme.DEFAULT.name());
|
||||
|
||||
if (theme.startsWith("/")) {
|
||||
try {
|
||||
mapView.setRenderTheme(theme);
|
||||
} catch (FileNotFoundException e) {
|
||||
mapView.setRenderTheme(InternalRenderTheme.OSMARENDER);
|
||||
mapView.setRenderTheme(InternalRenderTheme.DEFAULT);
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
mapView.setRenderTheme(InternalRenderTheme.valueOf(theme));
|
||||
} catch (IllegalArgumentException e) {
|
||||
mapView.setRenderTheme(InternalRenderTheme.DEFAULT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user