changeset 1135:c8c753931514

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
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 06 Sep 2011 17:41:07 +0000
parents bcf70a452646
children 8da5f5a9ed3c
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/mapserver/barrier_lines_class.vm flys-artifacts/doc/conf/mapserver/barrier_polygons_class.vm flys-artifacts/doc/conf/mapserver/layer.vm flys-artifacts/doc/conf/mapserver/wsplgen_class.vm flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/LayerInfo.java
diffstat 6 files changed, 82 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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 <ingo@intevation.de>
+
+	* 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 <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/LayerInfo.java: Renamed
--- /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
--- /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
--- 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
--- /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
--- 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 :

http://dive4elements.wald.intevation.org