# HG changeset patch # User Ingo Weinzierl # Date 1315330867 0 # Node ID c8c75393151415ffaa177e9e2eeb4dc60c7f72aa # Parent bcf70a4526466f31369a061ac0e585af63c51073 Added a fallback mechanism to style mapserver layers as long as the theme mechanism is not implemented for maps (as it is for charts). flys-artifacts/trunk@2656 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r bcf70a452646 -r c8c753931514 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Tue Sep 06 15:25:54 2011 +0000 +++ b/flys-artifacts/ChangeLog Tue Sep 06 17:41:07 2011 +0000 @@ -1,3 +1,18 @@ +2011-09-06 Ingo Weinzierl + + * doc/conf/mapserver/barrier_polygons_class.vm, + doc/conf/mapserver/barrier_lines_class.vm, + doc/conf/mapserver/wsplgen_class.vm: Default Mapserver styles for + barriers and WSPLGEN results. Those styles are only used as long as we + don't have map specific themes (as already used in charts). + + * doc/conf/mapserver/layer.vm: Implements a fallback mechanism for styling + barrier lines/polygons and WSPLGEN results. + + * src/main/java/de/intevation/flys/artifacts/model/LayerInfo.java: Added a + getStyle() method that currently returns "null". This method needs to be + implemented when map themes are introduced. + 2011-09-06 Ingo Weinzierl * src/main/java/de/intevation/flys/artifacts/model/LayerInfo.java: Renamed diff -r bcf70a452646 -r c8c753931514 flys-artifacts/doc/conf/mapserver/barrier_lines_class.vm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-artifacts/doc/conf/mapserver/barrier_lines_class.vm Tue Sep 06 17:41:07 2011 +0000 @@ -0,0 +1,32 @@ +CLASS + NAME "Damm" + EXPRESSION ("[TYP]"="Damm") + STYLE + SIZE 5 + OUTLINECOLOR "#008000" + END +END +CLASS + NAME "Rohr 1" + EXPRESSION ("[TYP]"="Rohr 1") + STYLE + SIZE 5 + OUTLINECOLOR "#800080" + END +END +CLASS + NAME "Rohr 2" + EXPRESSION ("[TYP]"="Rohr 2") + STYLE + SIZE 5 + OUTLINECOLOR "#808080" + END +END +CLASS + NAME "Graben" + EXPRESSION ("[TYP]"="Graben") + STYLE + SIZE 5 + OUTLINECOLOR "#800000" + END +END diff -r bcf70a452646 -r c8c753931514 flys-artifacts/doc/conf/mapserver/barrier_polygons_class.vm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-artifacts/doc/conf/mapserver/barrier_polygons_class.vm Tue Sep 06 17:41:07 2011 +0000 @@ -0,0 +1,7 @@ +CLASS + NAME "POLYGON_BARRIERS" + STYLE + SIZE 5 + OUTLINECOLOR "#FF8000" + END +END diff -r bcf70a452646 -r c8c753931514 flys-artifacts/doc/conf/mapserver/layer.vm --- a/flys-artifacts/doc/conf/mapserver/layer.vm Tue Sep 06 15:25:54 2011 +0000 +++ b/flys-artifacts/doc/conf/mapserver/layer.vm Tue Sep 06 17:41:07 2011 +0000 @@ -18,11 +18,17 @@ #end END - CLASS - NAME "Layer" - STYLE - SIZE 5 - COLOR "#66CCFF" - END - END + #if ( !$LAYER.getStyle() ) + #if ( $LAYER.getGroupTitle() ) + #if ( $LAYER.getType() == "POLYGON" ) + #include("barrier_polygons_class.vm") + #else + #include("barrier_lines_class.vm") + #end + #else + #include("wsplgen_class.vm") + #end + #else + $LAYER.getStyle() + #end END diff -r bcf70a452646 -r c8c753931514 flys-artifacts/doc/conf/mapserver/wsplgen_class.vm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-artifacts/doc/conf/mapserver/wsplgen_class.vm Tue Sep 06 17:41:07 2011 +0000 @@ -0,0 +1,7 @@ +CLASS + NAME "WSPLGEN_POLYGON" + STYLE + SIZE 5 + COLOR "#B2C9D7" + END +END diff -r bcf70a452646 -r c8c753931514 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/LayerInfo.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/LayerInfo.java Tue Sep 06 15:25:54 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/LayerInfo.java Tue Sep 06 17:41:07 2011 +0000 @@ -75,5 +75,13 @@ public String getTitle() { return title; } + + + public String getStyle() { + // TODO IMPLEMENT ME + // The style of a layer depends on the theme that might be configured + // by the user (stored in the attribute of the CollectionItem). + return null; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :