rename osmarender theme to 'default'

This commit is contained in:
Hannes Janetzek 2013-01-25 17:45:16 +01:00
parent bb7ca9be08
commit 4990b827d9
3 changed files with 13 additions and 14 deletions

View File

@ -1,5 +1,6 @@
/* /*
* Copyright 2010, 2011, 2012 mapsforge.org * 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 * 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 * 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; import java.io.InputStream;
/** /**
* Enumeration of all internal rendering themes. * Enumeration of all internal rendering themes.
*/ */
public enum InternalRenderTheme implements Theme { public enum InternalRenderTheme implements Theme {
/**
* A rendering theme similar to the OpenStreetMap Osmarender style. DEFAULT("/org/oscim/theme/osmarender/default.xml"),
*
* @see <a href="http://wiki.openstreetmap.org/wiki/Osmarender">Osmarender</a>
*/
OSMARENDER("/org/oscim/theme/osmarender/osmarender.xml"),
TRONRENDER("/org/oscim/theme/osmarender/tronrender.xml"); TRONRENDER("/org/oscim/theme/osmarender/tronrender.xml");

View File

@ -9,7 +9,7 @@
<style-area name="residential" fill="#f0eee8" fade="10"/> <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 --> <!-- "#f0fae7" mint green -->
<style-area name="farmland" fill="#fff8bf" fade="11" /> <style-area name="farmland" fill="#fff8bf" fade="11" />
@ -499,12 +499,12 @@
<area fill="#e9e6e3" fade="15" /> --> <area fill="#e9e6e3" fade="15" /> -->
</rule> </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" <caption k="name" font-style="bold" font-size="10" fill="#4040ff"
stroke="#ffffff" stroke-width="2.0" /> stroke="#ffffff" stroke-width="2.0" />
<caption k="addr:housenumber" font-style="bold" font-size="10" fill="#606060" <caption k="addr:housenumber" font-style="bold" font-size="10" fill="#606060"
stroke="#ffffff" stroke-width="2.0" /> stroke="#ffffff" stroke-width="2.0" />
</rule> --> </rule>
</rule> </rule>
<!-- outline 1 - 4 --> <!-- outline 1 - 4 -->

View File

@ -100,7 +100,6 @@ public abstract class MapActivity extends Activity {
/** /**
* This method is called once by each MapView during its setup process. * This method is called once by each MapView during its setup process.
*
* @param mapView * @param mapView
* the calling MapView. * the calling MapView.
*/ */
@ -131,16 +130,20 @@ public abstract class MapActivity extends Activity {
} }
String theme = sharedPreferences.getString(KEY_THEME, String theme = sharedPreferences.getString(KEY_THEME,
InternalRenderTheme.OSMARENDER.name()); InternalRenderTheme.DEFAULT.name());
if (theme.startsWith("/")) { if (theme.startsWith("/")) {
try { try {
mapView.setRenderTheme(theme); mapView.setRenderTheme(theme);
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
mapView.setRenderTheme(InternalRenderTheme.OSMARENDER); mapView.setRenderTheme(InternalRenderTheme.DEFAULT);
} }
} else { } else {
mapView.setRenderTheme(InternalRenderTheme.valueOf(theme)); try {
mapView.setRenderTheme(InternalRenderTheme.valueOf(theme));
} catch (IllegalArgumentException e) {
mapView.setRenderTheme(InternalRenderTheme.DEFAULT);
}
} }
} }
} }