Mapsforge themes don't support (-) 'exclusive negation', fix #407
This commit is contained in:
parent
0046f5c159
commit
324a1c309c
@ -423,7 +423,7 @@ public class XmlMapsforgeThemeBuilder extends DefaultHandler {
|
|||||||
if (zoomMin > zoomMax)
|
if (zoomMin > zoomMax)
|
||||||
throw new ThemeException("zoom-min must be less or equal zoom-max: " + zoomMin);
|
throw new ThemeException("zoom-min must be less or equal zoom-max: " + zoomMin);
|
||||||
|
|
||||||
RuleBuilder b = RuleBuilder.create(keys, values);
|
RuleBuilder b = RuleBuilder.create(keys, values, true);
|
||||||
b.cat(cat);
|
b.cat(cat);
|
||||||
b.zoom(zoomMin, zoomMax);
|
b.zoom(zoomMin, zoomMax);
|
||||||
b.element(element);
|
b.element(element);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014 Hannes Janetzek
|
* Copyright 2014 Hannes Janetzek
|
||||||
* Copyright 2016 devemux86
|
* Copyright 2016-2017 devemux86
|
||||||
*
|
*
|
||||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||||
*
|
*
|
||||||
@ -86,6 +86,13 @@ public class RuleBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static RuleBuilder create(String keys, String values) {
|
public static RuleBuilder create(String keys, String values) {
|
||||||
|
return create(keys, values, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mapsforge themes don't support (-) 'exclusive negation'.
|
||||||
|
*/
|
||||||
|
public static RuleBuilder create(String keys, String values, boolean isMapsforge) {
|
||||||
|
|
||||||
String[] keyList = EMPTY_KV;
|
String[] keyList = EMPTY_KV;
|
||||||
String[] valueList = EMPTY_KV;
|
String[] valueList = EMPTY_KV;
|
||||||
@ -97,7 +104,7 @@ public class RuleBuilder {
|
|||||||
if (values.length() > 2)
|
if (values.length() > 2)
|
||||||
valueList = values.substring(2)
|
valueList = values.substring(2)
|
||||||
.split(SEPARATOR);
|
.split(SEPARATOR);
|
||||||
} else if (values.startsWith(STRING_EXCLUSIVE)) {
|
} else if (values.startsWith(STRING_EXCLUSIVE) && !isMapsforge) {
|
||||||
type = RuleType.EXCLUDE;
|
type = RuleType.EXCLUDE;
|
||||||
if (values.length() > 2)
|
if (values.length() > 2)
|
||||||
valueList = values.substring(2)
|
valueList = values.substring(2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user