... and here is the patch
Index: src/uk/me/parabola/mkgmap/osmstyle/StyleImpl.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/StyleImpl.java (revision 3598)
+++ src/uk/me/parabola/mkgmap/osmstyle/StyleImpl.java (revision )
@@ -153,7 +153,9 @@
mergeOptions(baseStyle);
readOptions();
-
+
+ applyCmdLineOptions(props);
+
// read overlays before the style rules to be able to ignore overlaid "wrong" types.
readOverlays();
@@ -162,10 +164,23 @@
ListIterator<StyleImpl> listIterator = baseStyles.listIterator(baseStyles.size());
while (listIterator.hasPrevious())
mergeRules(listIterator.previous());
+ }
- // OR: other way
- //for (StyleImpl s : baseStyles)
- // mergeRules(s);
+ /**
+ * Apply any command line options that are appropriate for the style.
+ *
+ * @param props Contains the command line options.
+ */
+ private void applyCmdLineOptions(EnhancedProperties props) {
+ for (Entry<Object, Object> ent : props.entrySet()) {
+ String opt = (String) ent.getKey();
+ String val = (String) ent.getValue();
+ if (OPTION_LIST.contains(opt)) {
+ // Simple options that have string value. Perhaps we should allow
+ // anything here?
+ generalOptions.put(opt, val);
+ }
+ }
}
public String getOption(String name) {
@@ -441,7 +456,7 @@
* @see #mergeRules(StyleImpl)
*/
private void mergeOptions(StyleImpl other) {
- for (Entry<String, String> ent : other.generalOptions.entrySet()) {
+ for (Entry<String, String> ent : other.generalOptions.entrySet()) {
String opt = ent.getKey();
String val = ent.getValue();
if (OPTION_LIST.contains(opt)) {
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev