[Dive4elements-commits] [PATCH] Editing Map print config

Wald Commits scm-commit at wald.intevation.org
Tue Feb 5 13:57:11 CET 2013


# HG changeset patch
# User Christian Lins <christian.lins at intevation.de>
# Date 1360069028 -3600
# Node ID 8af500d62098056202f46f6a7348b7c79daf2b9d
# Parent  2b32ae372fc425e9659d3c09c333082a9c520c8e
Editing Map print config.

diff -r 2b32ae372fc4 -r 8af500d62098 flys-client/src/main/java/de/intevation/flys/client/client/ui/map/DrawControl.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/DrawControl.java	Tue Feb 05 12:24:57 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/DrawControl.java	Tue Feb 05 13:57:08 2013 +0100
@@ -1,7 +1,5 @@
 package de.intevation.flys.client.client.ui.map;
 
-import java.util.LinkedHashMap;
-
 import com.google.gwt.core.client.GWT;
 
 import com.smartgwt.client.types.SelectionType;
@@ -9,18 +7,22 @@
 import com.smartgwt.client.widgets.events.ClickEvent;
 import com.smartgwt.client.widgets.events.ClickHandler;
 import com.smartgwt.client.widgets.form.DynamicForm;
+import com.smartgwt.client.widgets.form.fields.FormItem;
 import com.smartgwt.client.widgets.form.fields.SelectItem;
-import com.smartgwt.client.widgets.form.fields.FormItem;
 import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
 import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
 import com.smartgwt.client.widgets.layout.HLayout;
 
+import de.intevation.flys.client.client.FLYSConstants;
+import de.intevation.flys.client.client.utils.EnableDisableCmd;
+
+import java.util.LinkedHashMap;
+
 import org.gwtopenmaps.openlayers.client.Map;
 import org.gwtopenmaps.openlayers.client.Style;
 import org.gwtopenmaps.openlayers.client.control.Control;
 import org.gwtopenmaps.openlayers.client.control.DrawFeature;
 import org.gwtopenmaps.openlayers.client.event.VectorFeatureAddedListener;
-import org.gwtopenmaps.openlayers.client.event.VectorFeatureAddedListener.FeatureAddedEvent;
 import org.gwtopenmaps.openlayers.client.feature.VectorFeature;
 import org.gwtopenmaps.openlayers.client.handler.Handler;
 import org.gwtopenmaps.openlayers.client.handler.PathHandler;
@@ -28,9 +30,6 @@
 import org.gwtopenmaps.openlayers.client.layer.Vector;
 import org.gwtopenmaps.openlayers.client.util.Attributes;
 
-import de.intevation.flys.client.client.FLYSConstants;
-import de.intevation.flys.client.client.utils.EnableDisableCmd;
-
 
 public class DrawControl extends HLayout implements VectorFeatureAddedListener {
 
@@ -86,6 +85,7 @@
         button.setTooltip(MSG.digitizeObjects());
 
         button.addClickHandler(new ClickHandler() {
+            @Override
             public void onClick(ClickEvent e) {
                 if (button.isSelected()) {
                     cmd.enable();
@@ -123,6 +123,7 @@
         box.setValueIcons(ics);
 
         box.addChangedHandler(new ChangedHandler() {
+            @Override
             public void onChanged(ChangedEvent e) {
                 setSelectedControl();
             }
@@ -144,6 +145,7 @@
     }
 
 
+    @Override
     public void onFeatureAdded(FeatureAddedEvent evt) {
         setCurrentType(evt.getVectorFeature());
     }
diff -r 2b32ae372fc4 -r 8af500d62098 flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfoWindow.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfoWindow.java	Tue Feb 05 12:24:57 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfoWindow.java	Tue Feb 05 13:57:08 2013 +0100
@@ -1,6 +1,7 @@
 package de.intevation.flys.client.client.ui.map;
 
 import com.google.gwt.core.client.GWT;
+
 import com.smartgwt.client.widgets.Label;
 import com.smartgwt.client.widgets.Window;
 import com.smartgwt.client.widgets.layout.HLayout;
@@ -39,17 +40,14 @@
     protected void initLayout() {
         VLayout root = new VLayout();
 
-        int rows = 0;
-
         for (FeatureInfo feature: features) {
             root.addMember(createFeatureRow(feature));
-            rows++;
         }
 
         addItem(root);
 
         setWidth(500);
-        setHeight(500); // + rows * ROW_HEIGHT);
+        setHeight(500);
         setTitle(MSG.getFeatureInfoWindowTitle());
 
         setIsModal(true);
diff -r 2b32ae372fc4 -r 8af500d62098 flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPrintSettingsPanel.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPrintSettingsPanel.java	Tue Feb 05 12:24:57 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPrintSettingsPanel.java	Tue Feb 05 13:57:08 2013 +0100
@@ -96,8 +96,9 @@
     protected SelectItem createPageFormatSelectItem() {
         LinkedHashMap values = new LinkedHashMap();
         // TODO: i18n
-        values.put("A4 portrait", "DIN A4 (Hochformat)");
-        values.put("A0 portrait", "DIN A0 (Hochformat)");
+        values.put("A4 landscape", "DIN A4 (Querformat)");
+        //values.put("A4 portrait", "DIN A4 (Hochformat)");
+        //values.put("A0 portrait", "DIN A0 (Hochformat)");
 
         SelectItem selItem = new SelectItem();
         selItem.setTitle("Seitengröße:"); // TODO: i18n
diff -r 2b32ae372fc4 -r 8af500d62098 flys-client/src/main/java/de/intevation/flys/client/server/filter/GGInAFilter.java
--- a/flys-client/src/main/java/de/intevation/flys/client/server/filter/GGInAFilter.java	Tue Feb 05 12:24:57 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/filter/GGInAFilter.java	Tue Feb 05 13:57:08 2013 +0100
@@ -89,7 +89,7 @@
 
         logger.debug("Request for: " + requesturi);
 
-        // Allow acces to localhost
+        // Allow access to localhost
         if (isLocalAddress(req)) {
             logger.debug("Request to localhost");
             chain.doFilter(req, resp);
diff -r 2b32ae372fc4 -r 8af500d62098 flys-client/src/main/java/de/intevation/flys/client/server/filter/NoCacheFilter.java
--- a/flys-client/src/main/java/de/intevation/flys/client/server/filter/NoCacheFilter.java	Tue Feb 05 12:24:57 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/filter/NoCacheFilter.java	Tue Feb 05 13:57:08 2013 +0100
@@ -9,7 +9,6 @@
 import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
-
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
diff -r 2b32ae372fc4 -r 8af500d62098 flys-client/src/main/webapp/WEB-INF/config.yaml
--- a/flys-client/src/main/webapp/WEB-INF/config.yaml	Tue Feb 05 12:24:57 2013 +0100
+++ b/flys-client/src/main/webapp/WEB-INF/config.yaml	Tue Feb 05 13:57:08 2013 +0100
@@ -42,8 +42,12 @@
   - !dnsMatch
     host: www.pegelonline.wsv.de
     port: 80
+  # Catch all
+  #- !dnsMatch
+  #  host: #regex that catches host plus path
+  #  port: 80
   - !dnsMatch
-    host: osm.wheregroup.com
+    host: osm.intevation.de
     port: 80
 
 layouts:
@@ -52,63 +56,10 @@
   #===========================================================================
     metaData:
       title: '${title}'
-      author: 'MapFish print module'
-      subject: 'Simple layout'
+      author: 'Flys'
+      subject: 'Kartendruck A4 Portrait'
       keywords: 'map,print'
-      creator: 'MapFish'
-
-#    titlePage:
-#      pageSize: A4
-#      items:
-#        - !text
-#          spacingAfter: 150
-#        - !text
-#          font: Helvetica
-#          fontSize: 40
-#          spacingAfter: 100
-#          align: center
-#          text: '${title}'
-#        - !image
-#          maxWidth: 160
-#          maxHeight: 160
-#          spacingAfter: 100
-#          align: center
-#          url: http://trac.mapfish.org/trac/mapfish/attachment/ticket/3/logo_v8_sphere.svg?format=raw
-#        - !image
-#          maxWidth: 160
-#          maxHeight: 160
-#          spacingAfter: 100
-#          align: center
-#          url: 'file://${configDir}/../images/flys_logo.gif'
-#        - !text
-#          font: Helvetica
-#          fontSize: 14
-#          align: left
-#          text: |
-#            Two layers are asked by the client:
-#            - a base layer from Metacarta
-#            - a transparent layer from Camptocamp.org (routes)
-#            .
-#            Some text is added over the map, just to demonstrate the absolute positionning.
-#      footer: &commonFooter
-#        height: 30
-#        items:
-#          - !columns
-#            config:
-#              cells:
-#                - paddingBottom: 5
-#            items:
-#              - !image
-#                maxWidth: 40
-#                backgroundColor: #FF0000
-#                align: left
-#                url: '${configDir}/../images/properties.gif'
-#              - !text
-#                backgroundColor: #FF0000
-#                text: ©Camptocamp SA
-#              - !text
-#                align: right
-#                text: 'Page ${pageNum}'
+      creator: 'd4e-river'
 
     #-------------------------------------------------------------------------
     mainPage:
@@ -121,7 +72,6 @@
             align: left
             maxWidth: 60
             maxHeight: 60
-            # Fixme: Replace with local file or self-hosted link...
             url: '${configDir}/../images/FLYS_Logo.png'
       items:
         - !text
@@ -153,6 +103,61 @@
           maxIconWidth: 32
           maxIconHeight: 32
       footer: *commonFooter
+      
+
+  #===========================================================================
+  A4 landscape:
+  #===========================================================================
+    metaData:
+      title: '${title}'
+      author: 'Flys'
+      subject: 'Kartendruck A4 Quer'
+      keywords: 'map,print'
+      creator: 'd4e-river'
+
+    #-------------------------------------------------------------------------
+    mainPage:
+      pageSize: A4
+      rotation: false
+      header:
+        height: 50
+        items:
+          - !image
+            align: left
+            maxWidth: 60
+            maxHeight: 60
+            url: '${configDir}/../images/FLYS_Logo.png'
+      items:
+        - !text
+            font: Helvetica
+            fontSize: 30
+            align: right
+            text: '${mapTitle}'
+            spacingAfter: 30
+        - !map
+          spacingAfter: 30
+          width: 440
+          height: 483
+        - !scalebar
+          type: bar
+          maxSize: 100
+          barBgColor: white
+          fontSize: 8
+          align: right
+        - !text
+          text: '${comment}'
+          spacingAfter: 30
+        - !text
+          font: Helvetica
+          fontSize: 9
+          align: right
+          text: '1:${scale} ${now MM.dd.yyyy}'
+        - !legends
+          align: left
+          maxIconWidth: 32
+          maxIconHeight: 32
+      footer: *commonFooter
+
 
   #===========================================================================
   A0 portrait:


More information about the Dive4elements-commits mailing list