Fix colors for highway roads and fix cocolors in rendering
This commit is contained in:
parent
e254a2491c
commit
00473cea80
11 changed files with 118 additions and 124 deletions
|
@ -51,6 +51,7 @@ public class RenderingRulesStorage {
|
|||
protected TIntObjectHashMap<RenderingRule>[] tagValueGlobalRules = new TIntObjectHashMap[LENGTH_RULES];
|
||||
|
||||
protected Map<String, RenderingRule> renderingAttributes = new LinkedHashMap<String, RenderingRule>();
|
||||
protected Map<String, String> renderingConstants= new LinkedHashMap<String, String>();
|
||||
|
||||
private String renderingName;
|
||||
|
||||
|
@ -311,6 +312,8 @@ public class RenderingRulesStorage {
|
|||
prop.setPossibleValues(attributes.getValue("possibleValues").split(","));
|
||||
}
|
||||
PROPS.registerRule(prop);
|
||||
} else if("renderingConstant".equals(name)){ //$NON-NLS-1$
|
||||
renderingConstants.put(attributes.getValue("name"), attributes.getValue("value"));
|
||||
} else if("renderingStyle".equals(name)){ //$NON-NLS-1$
|
||||
String depends = attributes.getValue("depends");
|
||||
if(depends != null && depends.length()> 0){
|
||||
|
@ -340,7 +343,15 @@ public class RenderingRulesStorage {
|
|||
private Map<String, String> parseAttributes(Attributes attributes, Map<String, String> m) {
|
||||
for (int i = 0; i < attributes.getLength(); i++) {
|
||||
String name = parser.isNamespaceAware() ? attributes.getLocalName(i) : attributes.getQName(i);
|
||||
m.put(name, attributes.getValue(i));
|
||||
String vl = attributes.getValue(i);
|
||||
if(vl != null && vl.startsWith("$")) {
|
||||
String cv = vl.substring(1);
|
||||
if(!renderingConstants.containsKey(cv)){
|
||||
throw new IllegalStateException("Rendering constant '" + cv + "' was not specified.");
|
||||
}
|
||||
vl = renderingConstants.get(cv);
|
||||
}
|
||||
m.put(name, vl);
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
|
|
@ -12,8 +12,12 @@
|
|||
<!-- Types : string, int, boolean; possibleValues comma separated possible values for int/string -->
|
||||
<renderingProperty attr="hmRendered" name="Show more map detail" description="Increase amount of map detail shown"
|
||||
type="boolean" possibleValues=""/>
|
||||
<renderingProperty attr="viRendered" name="Trial road colors" description="Experiment with road colors"
|
||||
<!-- Make all colors aligned in the whole application and configurable for normal user (only via custom.render.xml)
|
||||
<renderingProperty attr="defMapnikRoads" name="Previous road colors" description="Default Mapnik road colors"
|
||||
type="boolean" possibleValues=""/>
|
||||
<renderingProperty attr="hmRoadColor" name="Hm road colors" description="Default Mapnik road colors"
|
||||
type="boolean" possibleValues=""/>
|
||||
-->
|
||||
<renderingProperty attr="contourLines" name="Show contour lines" description="Select minimum zoom level to display in map if available. Separate SRTM-file may be needed."
|
||||
type="string" possibleValues="--,13,12,11"/>
|
||||
<renderingProperty attr="appMode" name="Rendering mode" description="Map optimization for respective User Profile"
|
||||
|
@ -35,7 +39,27 @@
|
|||
<filter nightMode="true" attrColorValue="#003333"/>
|
||||
<filter attrColorValue="#f1eae4"/>
|
||||
</renderingAttribute>
|
||||
|
||||
|
||||
<!-- The last will be used by default -->
|
||||
<!-- HM road colors -->
|
||||
<renderingConstant name="secondaryRoadColor" value="#ffd080" valuePale="#fdd6a4"/>
|
||||
<renderingConstant name="motorwayRoadColor" value="#809bff" valuePale="#809bff"/>
|
||||
<renderingConstant name="trunkRoadColor" value="#ed154b" valuePale="#df1346"/> //
|
||||
<renderingConstant name="primaryRoadColor" value="#ff80a0" valuePale="#eb989a"/>
|
||||
<renderingConstant name="tertiaryRoadColor" value="#ffff80" valuePale="#fefeb3"/>
|
||||
<!-- vi color -->
|
||||
<renderingConstant name="secondaryRoadColor" value="#F7D131"/>
|
||||
<renderingConstant name="motorwayRoadColor" value="#6666CC"/>
|
||||
<renderingConstant name="trunkRoadColor" value="#A02067"/>
|
||||
<renderingConstant name="primaryRoadColor" value="#C04D61"/>
|
||||
<renderingConstant name="tertiaryRoadColor" value="#F0CE30"/>
|
||||
<!-- Default mapnik colors with changed trunk -->
|
||||
<renderingConstant name="secondaryRoadColor" value="#ffd080"/>
|
||||
<renderingConstant name="motorwayRoadColor" value="#809bff"/>
|
||||
<renderingConstant name="trunkRoadColor" value="#E62E6B"/>
|
||||
<renderingConstant name="primaryRoadColor" value="#ff80a0"/>
|
||||
<renderingConstant name="tertiaryRoadColor" value="#ffff80"/>
|
||||
|
||||
<!--
|
||||
All-Purpose Renderer (with attr="hmRendered" name="Show more map detail") (by Hardy Mueller), v023:
|
||||
- some roads already rendered at lower zooms (travel/orienteering)
|
||||
|
@ -1019,22 +1043,10 @@
|
|||
<filter minzoom="1" tag="natural" value="coastline_broken" color="#111111" strokeWidth="1"/>
|
||||
<filter minzoom="11" tag="natural" value="coastline_line" color="#cc999999" strokeWidth="1"/>
|
||||
<group>
|
||||
<filter viRendered="true" tag="highway" value="motorway" maxzoom="13" color="#6666CC"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="motorway" maxzoom="13" color="#809bff"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="motorway" maxzoom="13" color="#809bff"/>
|
||||
<filter tag="highway" value="motorway" maxzoom="13" color="#809bff"/>
|
||||
<filter viRendered="true" tag="highway" value="motorway_link" maxzoom="13" color="#6666CC"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="motorway_link" maxzoom="13" color="#809bff"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="motorway_link" maxzoom="13" color="#809bff"/>
|
||||
<filter tag="highway" value="motorway_link" maxzoom="13" color="#809bff"/>
|
||||
<filter viRendered="true" tag="highway" value="trunk" maxzoom="13" color="#A02067"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="trunk" maxzoom="13" color="#df1346"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="trunk" maxzoom="13" color="#ed154b"/>
|
||||
<filter tag="highway" value="trunk" maxzoom="13" color="#ed154b"/>
|
||||
<filter viRendered="true" tag="highway" value="trunk_link" maxzoom="13" color="#A02067"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="trunk_link" maxzoom="13" color="#df1346"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="trunk_link" maxzoom="13" color="#ed154b"/>
|
||||
<filter tag="highway" value="trunk_link" maxzoom="13" color="#ed154b"/>
|
||||
<filter tag="highway" value="motorway" maxzoom="13" color="$motorwayRoadColor"/>
|
||||
<filter tag="highway" value="motorway_link" maxzoom="13" color="$motorwayRoadColor"/>
|
||||
<filter tag="highway" value="trunk" maxzoom="13" color="$trunkRoadColor"/>
|
||||
<filter tag="highway" value="trunk_link" maxzoom="13" color="$trunkRoadColor"/>
|
||||
<groupFilter cap="ROUND">
|
||||
<filter minzoom="5" maxzoom="9" strokeWidth="5"/>
|
||||
<filter minzoom="10" maxzoom="10" strokeWidth="6"/>
|
||||
|
@ -1045,14 +1057,8 @@
|
|||
</group>
|
||||
|
||||
<group>
|
||||
<filter viRendered="true" tag="highway" value="primary" maxzoom="13" color="#C04D61"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="primary" maxzoom="13" color="#eb989a"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="primary" maxzoom="13" color="#ff80a0"/>
|
||||
<filter tag="highway" value="primary" maxzoom="13" color="#ff80a0"/>
|
||||
<filter viRendered="true" tag="highway" value="primary_link" maxzoom="13" color="#C04D61"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="primary_link" maxzoom="13" color="#eb989a"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="primary_link" maxzoom="13" color="#ff80a0"/>
|
||||
<filter tag="highway" value="primary_link" maxzoom="13" color="#ff80a0"/>
|
||||
<filter tag="highway" value="primary" maxzoom="13" color="$primaryRoadColor"/>
|
||||
<filter tag="highway" value="primary_link" maxzoom="13" color="$primaryRoadColor"/>
|
||||
<groupFilter cap="ROUND">
|
||||
<filter minzoom="7" maxzoom="9" strokeWidth="4"/>
|
||||
<filter minzoom="10" maxzoom="10" strokeWidth="5"/>
|
||||
|
@ -1063,14 +1069,8 @@
|
|||
</group>
|
||||
|
||||
<group>
|
||||
<filter viRendered="true" tag="highway" value="secondary" maxzoom="13" color="#F7D131"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="secondary" maxzoom="13" color="#fdd6a4"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="secondary" maxzoom="13" color="#ffd080"/>
|
||||
<filter tag="highway" value="secondary" maxzoom="13" color="#ffd080"/>
|
||||
<filter viRendered="true" tag="highway" value="secondary_link" maxzoom="13" color="#F7D131"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="secondary_link" maxzoom="13" color="#fdd6a4"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="secondary_link" maxzoom="13" color="#ffd080"/>
|
||||
<filter tag="highway" value="secondary_link" maxzoom="13" color="#ffd080"/>
|
||||
<filter tag="highway" value="secondary" maxzoom="13" color="$secondaryRoadColor"/>
|
||||
<filter tag="highway" value="secondary_link" maxzoom="13" color="$secondaryRoadColor"/>
|
||||
<groupFilter shadowRadius="1" cap="ROUND">
|
||||
<filter minzoom="9" maxzoom="9" strokeWidth="3"/>
|
||||
<filter minzoom="10" maxzoom="10" strokeWidth="4"/>
|
||||
|
@ -1081,38 +1081,14 @@
|
|||
</group>
|
||||
|
||||
<group>
|
||||
<filter viRendered="true" tag="highway" value="motorway" color="#6666CC"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="motorway" color="#809bff"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="motorway" color="#809bff"/>
|
||||
<filter tag="highway" value="motorway" color="#809bff"/>
|
||||
<filter viRendered="true" tag="highway" value="motorway_link" color="#6666CC"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="motorway_link" color="#809bff"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="motorway_link" color="#809bff"/>
|
||||
<filter tag="highway" value="motorway_link" color="#809bff"/>
|
||||
<filter viRendered="true" tag="highway" value="trunk" color="#A02067"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="trunk" color="#df1346"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="trunk" color="#ed154b"/>
|
||||
<filter tag="highway" value="trunk" color="#ed154b"/>
|
||||
<filter viRendered="true" tag="highway" value="trunk_link" color="#A02067"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="trunk_link" color="#df1346"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="trunk_link" color="#ed154b"/>
|
||||
<filter tag="highway" value="trunk_link" color="#ed154b"/>
|
||||
<filter viRendered="true" tag="highway" value="primary" color="#C04D61"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="primary" color="#eb989a"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="primary" color="#ff80a0"/>
|
||||
<filter tag="highway" value="primary" color="#ff80a0"/>
|
||||
<filter viRendered="true" tag="highway" value="primary_link" color="#C04D61"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="primary_link" color="#eb989a"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="primary_link" color="#ff80a0"/>
|
||||
<filter tag="highway" value="primary_link" color="#ff80a0"/>
|
||||
<filter viRendered="true" tag="highway" value="secondary" color="#F7D131"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="secondary" color="#fdd6a4"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="secondary" color="#ffd080"/>
|
||||
<filter tag="highway" value="secondary" color="#ffd080"/>
|
||||
<filter viRendered="true" tag="highway" value="secondary_link" color="#F7D131"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="secondary_link" color="#fdd6a4"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="secondary_link" color="#ffd080"/>
|
||||
<filter tag="highway" value="secondary_link" color="#ffd080"/>
|
||||
<filter tag="highway" value="motorway" color="$motorwayRoadColor"/>
|
||||
<filter tag="highway" value="motorway_link" color="$motorwayRoadColor"/>
|
||||
<filter tag="highway" value="trunk" color="$trunkRoadColor"/>
|
||||
<filter tag="highway" value="trunk_link" color="$trunkRoadColor"/>
|
||||
<filter tag="highway" value="primary" color="$primaryRoadColor"/>
|
||||
<filter tag="highway" value="primary_link" color="$primaryRoadColor"/>
|
||||
<filter tag="highway" value="secondary" color="$secondaryRoadColor"/>
|
||||
<filter tag="highway" value="secondary_link" color="$secondaryRoadColor"/>
|
||||
|
||||
<groupFilter shadowRadius="1" cap="ROUND">
|
||||
<filter>
|
||||
|
@ -1136,14 +1112,8 @@
|
|||
</group>
|
||||
|
||||
<group>
|
||||
<filter viRendered="true" tag="highway" value="tertiary" color="#F0CE30"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="tertiary" color="#fefeb3"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="tertiary" color="#ffff80"/>
|
||||
<filter tag="highway" value="tertiary" color="#ffff80"/>
|
||||
<filter viRendered="true" tag="highway" value="tertiary_link" color="#F0CE30"/>
|
||||
<!-- PALE-SCHEME filter hmRendered="true" tag="highway" value="tertiary_link" color="#fefeb3"/ -->
|
||||
<filter hmRendered="true" tag="highway" value="tertiary_link" color="#ffff80"/>
|
||||
<filter tag="highway" value="tertiary_link" color="#ffff80"/>
|
||||
<filter tag="highway" value="tertiary" color="$tertiaryRoadColor"/>
|
||||
<filter tag="highway" value="tertiary_link" color="$tertiaryRoadColor"/>
|
||||
<groupFilter shadowRadius="1" cap="ROUND">
|
||||
<filter minzoom="10" maxzoom="10" strokeWidth="3"/>
|
||||
<filter minzoom="11" maxzoom="11" strokeWidth="4"/>
|
||||
|
|
|
@ -75,23 +75,23 @@
|
|||
<filter tag="highway" value="secondary" color="#FF8000"/>
|
||||
<filter tag="highway" value="secondary_link" color="#FF8000"/>
|
||||
<groupFilter shadowRadius="1" cap="ROUND">
|
||||
<!-- Bridges -->
|
||||
<filter layer="1" color_0="#000000" shadowRadius="0" cap_0="BUTT" cap="SQUARE">
|
||||
<filter minzoom="14" maxzoom="14" strokeWidth_0="12"/>
|
||||
<filter minzoom="15" maxzoom="15" strokeWidth_0="14"/>
|
||||
<filter minzoom="16" maxzoom="16" strokeWidth_0="17"/>
|
||||
<filter minzoom="17" maxzoom="17" strokeWidth_0="21"/>
|
||||
<filter minzoom="18" strokeWidth_0="26"/>
|
||||
<groupFilter nightMode="true" color_0="#ffffff"/>
|
||||
</filter>
|
||||
<filter>
|
||||
<filter minzoom="14" maxzoom="14" strokeWidth="10"/>
|
||||
<filter minzoom="15" maxzoom="15" strokeWidth="12"/>
|
||||
<filter minzoom="16" maxzoom="16" strokeWidth="15"/>
|
||||
<filter minzoom="17" maxzoom="17" strokeWidth="19"/>
|
||||
<filter minzoom="18" strokeWidth="24"/>
|
||||
<groupFilter layer="-1" pathEffect="4_4" cap="BUTT"/>
|
||||
</filter>
|
||||
<groupFilter layer="-1" pathEffect="4_4" cap="BUTT"/>
|
||||
<!-- Bridges -->
|
||||
<groupFilter layer="1" color_0="#000000" shadowRadius="0" cap_0="BUTT" cap="SQUARE">
|
||||
<filter minzoom="14" maxzoom="14" strokeWidth_0="12"/>
|
||||
<filter minzoom="15" maxzoom="15" strokeWidth_0="14"/>
|
||||
<filter minzoom="16" maxzoom="16" strokeWidth_0="17"/>
|
||||
<filter minzoom="17" maxzoom="17" strokeWidth_0="21"/>
|
||||
<filter minzoom="18" strokeWidth_0="26"/>
|
||||
<groupFilter nightMode="true" color_0="#ffffff"/>
|
||||
</groupFilter>
|
||||
</groupFilter>
|
||||
</group>
|
||||
|
||||
|
@ -103,22 +103,22 @@
|
|||
<filter minzoom="11" maxzoom="11" strokeWidth="4"/>
|
||||
<filter minzoom="12" maxzoom="12" strokeWidth="5"/>
|
||||
<filter minzoom="13" maxzoom="13" strokeWidth="6"/>
|
||||
<!-- Bridges -->
|
||||
<filter layer="1" color_0="#000000" shadowRadius="0" cap_0="BUTT" cap="SQUARE">
|
||||
<filter minzoom="13" maxzoom="14" strokeWidth="8"/>
|
||||
<filter minzoom="15" maxzoom="15" strokeWidth="10"/>
|
||||
<filter minzoom="16" maxzoom="16" strokeWidth="12"/>
|
||||
<filter minzoom="17" maxzoom="17" strokeWidth="15"/>
|
||||
<filter minzoom="18" strokeWidth="20"/>
|
||||
<groupFilter nightMode="true" color_0="#ffffff"/>
|
||||
</filter>
|
||||
<filter>
|
||||
<filter color_0="#000000">
|
||||
<filter minzoom="14" maxzoom="14" strokeWidth="6"/>
|
||||
<filter minzoom="15" maxzoom="15" strokeWidth="8"/>
|
||||
<filter minzoom="16" maxzoom="16" strokeWidth="10"/>
|
||||
<filter minzoom="17" maxzoom="17" strokeWidth="13"/>
|
||||
<filter minzoom="18" strokeWidth="18"/>
|
||||
<groupFilter layer="-1" pathEffect="4_4" cap="BUTT"/>
|
||||
<groupFilter nightMode="true" color_0="#ffffff"/>
|
||||
<!-- Bridges -->
|
||||
<groupFilter layer="1" shadowRadius="0" cap_0="BUTT" cap="SQUARE">
|
||||
<filter minzoom="14" maxzoom="14" strokeWidth_0="8"/>
|
||||
<filter minzoom="15" maxzoom="15" strokeWidth_0="10"/>
|
||||
<filter minzoom="16" maxzoom="16" strokeWidth_0="12"/>
|
||||
<filter minzoom="17" maxzoom="17" strokeWidth_0="15"/>
|
||||
<filter minzoom="18" strokeWidth_0="20"/>
|
||||
</groupFilter>
|
||||
</filter>
|
||||
</groupFilter>
|
||||
</group>
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
\nЧтобы получить дополнительную информацию о карте, выделите её в списке. Удерживайте карту, если вы хотите удалить или деактивировать.
|
||||
\nДанные на устройстве (%1$s свободно):</string>
|
||||
<string name="tip_recent_changes_0_8_3_t">"Изменения в 0.8.3:
|
||||
\n\t* Промежуточные пункты\n\t* Улучшенная прокладка маршрута
|
||||
\n\t* Опция Избегать автомагистралей
|
||||
\n\t* Отображение трека
|
||||
\n\t* Улучшенный интерфейс (иконки)
|
||||
\n\t* Исправление ошибок "</string>
|
||||
|
||||
* Промежуточные пункты
|
||||
* Улучшенная прокладка маршрута
|
||||
* Опция Избегать автомагистралей
|
||||
* Отображение трека
|
||||
* Улучшенный интерфейс (иконки)
|
||||
* Исправление ошибок "</string>
|
||||
<string name="tip_day_night_mode_t_v2">"\tДля некоторых векторных карт можно менять оформление между дневным и ночным.
|
||||
\n\tНочное оформление безопаснее для использования в темноте.
|
||||
\n\tДля изменения дневного/ночного оформления нажмите на значок настройки на экране карты и выберите \'Дневной/ночной режим\'.
|
||||
|
|
|
@ -16,14 +16,15 @@
|
|||
|
||||
<!-- LAYER and SPECIAL PURPOSE consistency colors -->
|
||||
|
||||
<color name="gpx_track">#B4A00AD7</color>
|
||||
<color name="gpx_track">#B4B319FF</color>
|
||||
<color name="gpx_track_fluorescent">#B400FFFF</color>
|
||||
<!-- magenta is alternate track color for cyan but less contrast in many situations: color name="gpx_track_fluorescent">#B4FF00FF</color -->
|
||||
<color name="pos_heading">#320000FF</color>
|
||||
<color name="pos_area">#280000FF</color>
|
||||
<color name="pos_around">#707CDC</color> <!-- family blue similar to above -->
|
||||
|
||||
<color name="nav_track">#960000FF</color> <!-- needs to be brighter, hardly visible in night mode -->
|
||||
<!-- <color name="nav_track">#960000FF</color> Old blue colors - not bright enough especially in night mode -->
|
||||
<color name="nav_track">#CCFF6600</color>
|
||||
<color name="nav_track_fluorescent">#CCFF6600</color>
|
||||
<color name="nav_arrow">#FADE23</color>
|
||||
<color name="nav_arrow_imminent">#FF2300</color>
|
||||
|
|
|
@ -109,17 +109,18 @@ public class OsmandExtraSettings extends OsmandPlugin {
|
|||
}
|
||||
});
|
||||
|
||||
final MapInfoControlRegInfo fluorescent = mapInfoControls.registerAppearanceWidget(R.drawable.widget_fluorescent_routes, R.string.map_widget_fluorescent,
|
||||
"fluorescent", view.getSettings().FLUORESCENT_OVERLAYS);
|
||||
fluorescent.setStateChangeListener(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
view.getSettings().FLUORESCENT_OVERLAYS.set(!view.getSettings().FLUORESCENT_OVERLAYS.get());
|
||||
view.refreshMap();
|
||||
}
|
||||
});
|
||||
|
||||
// FIXME delete strings from this code
|
||||
// final MapInfoControlRegInfo fluorescent = mapInfoControls.registerAppearanceWidget(R.drawable.widget_fluorescent_routes, R.string.map_widget_fluorescent,
|
||||
// "fluorescent", view.getSettings().FLUORESCENT_OVERLAYS);
|
||||
// fluorescent.setStateChangeListener(new Runnable() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// view.getSettings().FLUORESCENT_OVERLAYS.set(!view.getSettings().FLUORESCENT_OVERLAYS.get());
|
||||
// view.refreshMap();
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
// final CommonPreference<Integer> posPref = view.getSettings().POSITION_ON_MAP;
|
||||
// final MapInfoControlRegInfo posMap = mapInfoControls.registerAppearanceWidget(R.drawable.widget_position_marker, R.string.position_on_map,
|
||||
// "position_on_map", textSizePref);
|
||||
|
|
|
@ -53,7 +53,7 @@ public class GPXLayer extends OsmandMapLayer {
|
|||
return;
|
||||
}
|
||||
List<List<WptPt>> points = gpxFile.processedPointsToDisplay;
|
||||
if (view.getSettings().FLUORESCENT_OVERLAYS.get()) {
|
||||
if (false && view.getSettings().FLUORESCENT_OVERLAYS.get()) {
|
||||
paint.setColor(view.getResources().getColor(R.color.gpx_track_fluorescent));
|
||||
} else {
|
||||
paint.setColor(view.getResources().getColor(R.color.gpx_track));
|
||||
|
|
|
@ -60,7 +60,8 @@ public class MiniMapControl extends MapInfoControl {
|
|||
super.onDraw(canvas);
|
||||
|
||||
//to change color immediately when needed
|
||||
if (view.getSettings().FLUORESCENT_OVERLAYS.get()) {
|
||||
// could be deleted in future
|
||||
if (view.getSettings().FLUORESCENT_OVERLAYS.get() && false) {
|
||||
paintMiniRoute.setColor(getResources().getColor(R.color.nav_track_fluorescent));
|
||||
} else {
|
||||
paintMiniRoute.setColor(getResources().getColor(R.color.nav_track));
|
||||
|
|
|
@ -58,7 +58,7 @@ public class RouteLayer extends OsmandMapLayer {
|
|||
public void onDraw(Canvas canvas, RectF latLonBounds, RectF tilesRect, DrawSettings nightMode) {
|
||||
path.reset();
|
||||
if (helper.getFinalLocation() != null && helper.getRoute().isCalculated()) {
|
||||
if (view.getSettings().FLUORESCENT_OVERLAYS.get()) {
|
||||
if (false && view.getSettings().FLUORESCENT_OVERLAYS.get()) {
|
||||
paint.setColor(view.getResources().getColor(R.color.nav_track_fluorescent));
|
||||
} else {
|
||||
paint.setColor(view.getResources().getColor(R.color.nav_track));
|
||||
|
|
|
@ -198,8 +198,13 @@ class RenderingRulesHandler {
|
|||
return dependsStorage;
|
||||
}
|
||||
|
||||
static map<string, string>& parseAttributes(const char **atts, map<string, string>& m) {
|
||||
static map<string, string>& parseAttributes(const char **atts, map<string, string>& m,
|
||||
RenderingRulesStorage* st) {
|
||||
while (*atts != NULL) {
|
||||
string vl = string(atts[1]);
|
||||
if(vl.size() > 1 && vl[0] == '$') {
|
||||
vl = st->renderingConstants[vl.substr(1, vl.size() - 1)];
|
||||
}
|
||||
m[string(atts[0])] = string(atts[1]);
|
||||
atts += 2;
|
||||
}
|
||||
|
@ -215,7 +220,7 @@ class RenderingRulesHandler {
|
|||
if (t->st.size() > 0 && t->st.top().isGroup()) {
|
||||
attrsMap.insert(t->st.top().groupAttributes.begin(), t->st.top().groupAttributes.end());
|
||||
}
|
||||
parseAttributes(atts, attrsMap);
|
||||
parseAttributes(atts, attrsMap, t->storage);
|
||||
RenderingRule* renderingRule = new RenderingRule(attrsMap,t->storage);
|
||||
if (t->st.size() > 0 && t->st.top().isGroup()) {
|
||||
t->st.top().children.push_back(renderingRule);
|
||||
|
@ -230,7 +235,7 @@ class RenderingRulesHandler {
|
|||
t->st.push(gr);
|
||||
} else if ("groupFilter" == name) { //$NON-NLS-1$
|
||||
map<string, string> attrsMap;
|
||||
parseAttributes(atts, attrsMap);
|
||||
parseAttributes(atts, attrsMap, t->storage);
|
||||
RenderingRule* renderingRule = new RenderingRule(attrsMap,t->storage);
|
||||
if (t->st.size() > 0 && t->st.top().isGroup()) {
|
||||
GroupRules parent = ((GroupRules) t->st.top());
|
||||
|
@ -246,7 +251,7 @@ class RenderingRulesHandler {
|
|||
if (t->st.size() > 0 && t->st.top().isGroup()) {
|
||||
groupRules.groupAttributes.insert(t->st.top().groupAttributes.begin(), t->st.top().groupAttributes.end());
|
||||
}
|
||||
parseAttributes(atts, groupRules.groupAttributes);
|
||||
parseAttributes(atts, groupRules.groupAttributes, t->storage);
|
||||
t->st.push(groupRules);
|
||||
} else if ("order" == name) { //$NON-NLS-1$
|
||||
t->state = RenderingRulesStorage::ORDER_RULES;
|
||||
|
@ -258,9 +263,13 @@ class RenderingRulesHandler {
|
|||
t->state = RenderingRulesStorage::LINE_RULES;
|
||||
} else if ("polygon" == name) { //$NON-NLS-1$
|
||||
t->state = RenderingRulesStorage::POLYGON_RULES;
|
||||
} else if ("renderingConstant" == name) { //$NON-NLS-1$
|
||||
map<string, string> attrsMap;
|
||||
parseAttributes(atts, attrsMap, t->storage);
|
||||
t->storage->renderingConstants[attrsMap["name"]] = attrsMap["value"];
|
||||
} else if ("renderingAttribute" == name) { //$NON-NLS-1$
|
||||
map<string, string> attrsMap;
|
||||
parseAttributes(atts, attrsMap);
|
||||
parseAttributes(atts, attrsMap, t->storage);
|
||||
string attr = attrsMap["name"];
|
||||
map<string, string> empty;
|
||||
RenderingRule* root = new RenderingRule(empty,t->storage);
|
||||
|
@ -268,7 +277,7 @@ class RenderingRulesHandler {
|
|||
t->st.push(GroupRules(root));
|
||||
} else if ("renderingProperty" == name) {
|
||||
map<string, string> attrsMap;
|
||||
parseAttributes(atts, attrsMap);
|
||||
parseAttributes(atts, attrsMap, t->storage);
|
||||
string attr = attrsMap["attr"];
|
||||
RenderingRuleProperty* prop;
|
||||
string type = attrsMap["type"];
|
||||
|
@ -294,7 +303,7 @@ class RenderingRulesHandler {
|
|||
t->storage->PROPS.registerRule(prop);
|
||||
} else if ("renderingStyle" == name) {
|
||||
map<string, string> attrsMap;
|
||||
parseAttributes(atts, attrsMap);
|
||||
parseAttributes(atts, attrsMap, t->storage);
|
||||
string depends = attrsMap["depends"];
|
||||
if (depends.size() > 0 && t->resolver != NULL) {
|
||||
t->dependsStorage = t->resolver->resolve(depends, t->resolver);
|
||||
|
@ -695,4 +704,4 @@ void RenderingRuleSearchRequest::printDebugResult() {
|
|||
printf("\nNot found\n");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -380,6 +380,7 @@ public:
|
|||
const static int SIZE_STATES = 7;
|
||||
UNORDERED(map)<int, RenderingRule*>* tagValueGlobalRules;
|
||||
map<std::string, RenderingRule*> renderingAttributes;
|
||||
map<std::string, std::string> renderingConstants;
|
||||
std::vector<RenderingRule*> childRules;
|
||||
public:
|
||||
RenderingRulesStorageProperties PROPS;
|
||||
|
|
Loading…
Reference in a new issue