changeset 5617:863baffad8a4

Merged
author Sascha L. Teichmann <teichmann@intevation.de>
date Tue, 09 Apr 2013 17:10:28 +0200
parents 14de791bd8f7 (current diff) 8889d46e7927 (diff)
children d03171f66511
files
diffstat 8 files changed, 52 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/meta-data.xml	Tue Apr 09 17:09:59 2013 +0200
+++ b/flys-artifacts/doc/conf/meta-data.xml	Tue Apr 09 17:10:28 2013 +0200
@@ -1563,9 +1563,8 @@
                 FROM fixpoints WHERE river_id = ${river_id} GROUP BY name
               </dc:statement>
               <dc:for-each>
-                <fixpoint factory="wmsfixpointsfactory"
-                  ids="{$river_id};{$name}"
-                  name="{$name}"/>
+                <fixpoints factory="wmsfixpointsfactory"
+                  ids="{$river_id};{$name}"/>
               </dc:for-each>
             </dc:context>
           </dc:macro>
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Tue Apr 09 17:09:59 2013 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Tue Apr 09 17:10:28 2013 +0200
@@ -438,7 +438,7 @@
 km = Km
 qps = Querprofilspuren
 hws = Hochwasserschutzanlagen
-catchments = Einzugsgebiet
+catchments = Einzugsgebiete (WMS)
 floodplain = Talaue
 lines = Linien
 buildings = Bauwerke
@@ -450,7 +450,7 @@
 bfg = BfG
 land = Land
 rastermap = Rasterkarte
-background = Hintergrundkarte
+background = Hintergrundkarte (WMS)
 discharge_tables_chart = WQ-Vorschau
 discharge_table_nn = Abflusstafeln am Pegel
 discharge_table_gauge = Abflusstafel am Pegel
@@ -459,7 +459,7 @@
 show_mainvalues = Hauptwerte anzeigen
 dems = Digitale Gel\u00e4ndemodelle
 hydrboundaries = Hydrologische Grenzen
-gaugelocations = Pegellagen
+gaugelocations = Pegellagen (WMS)
 single = Jahr
 epoch = Epoche
 bedheights = Sohlh\u00f6hen
@@ -481,7 +481,7 @@
 sobek_areas = SOBEK-Bereiche
 measurements = Messungen
 floodmarks = HW-Marken
-pegel_had_measurement_points = HAD Abflussmessstellen
+pegel_had_measurement_points = HAD Abflussmessstellen (WMS)
 gauge_points = Pegelpunkte (WSV)
 gauge_level = Aktueller Wasserstand (WSV)
 gauge_names = Pegelnamen (WSV)
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Tue Apr 09 17:09:59 2013 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Tue Apr 09 17:10:28 2013 +0200
@@ -435,7 +435,7 @@
 km = Km
 qps = Crosssection Tracks
 hws = Floodplain Protection Work
-catchments = Catchments
+catchments = Catchments (WMS)
 floodplain = Floodplain
 lines = Lines
 buildings = Buildings
@@ -447,7 +447,7 @@
 bfg = BfG
 land = Land
 rastermap = Rastermap
-background = Background Layer
+background = Background Layer (WMS)
 discharge_tables_chart = WQ preview
 discharge_table_nn = Discharge Tables at Gauge
 discharge_table_gauge = Discharge Table at Gauge
@@ -456,7 +456,7 @@
 show_mainvalues = Show Mainvalues
 dems = Digital Elevation Models
 hydrboundaries = Hydrological Boundaries
-gaugelocations = Location of Gauges
+gaugelocations = Location of Gauges (WMS)
 single = Year
 epoch = Epoch
 bedheights = Bedheights
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DigitizePanel.java	Tue Apr 09 17:09:59 2013 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DigitizePanel.java	Tue Apr 09 17:10:28 2013 +0200
@@ -2,7 +2,6 @@
 
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.user.client.rpc.AsyncCallback;
-
 import com.smartgwt.client.types.VerticalAlignment;
 import com.smartgwt.client.util.SC;
 import com.smartgwt.client.widgets.Canvas;
@@ -35,6 +34,7 @@
 
 import org.gwtopenmaps.openlayers.client.Map;
 import org.gwtopenmaps.openlayers.client.control.Attribution;
+import org.gwtopenmaps.openlayers.client.layer.TransitionEffect;
 import org.gwtopenmaps.openlayers.client.layer.WMS;
 import org.gwtopenmaps.openlayers.client.layer.WMSOptions;
 import org.gwtopenmaps.openlayers.client.layer.WMSParams;
@@ -63,7 +63,6 @@
 
     @Override
     public Canvas create(DataList list) {
-        List<Data> data = list.getAll(); // FIXME: data is not used? getAll() side-effects?
         helperContainer.addVisibilityChangedHandler(this);
 
         DataList clone = (DataList) list.clone();
@@ -106,7 +105,7 @@
     protected Canvas createWidget(DataList data) {
         GWT.log("DigitizePanel - createWidget()");
 
-        VLayout layout   = new VLayout();
+        VLayout layout = new VLayout();
         layout.setAlign(VerticalAlignment.TOP);
         layout.setHeight(25);
 
@@ -132,7 +131,7 @@
 
     @Override
     protected Data[] getData() {
-        Data[] total = new Data[1];
+        final Data[] total = new Data[1];
 
         if (floodMap != null) {
             DataItem item = new DefaultDataItem(
@@ -164,6 +163,12 @@
         helperContainer.addParentMovedHandler(new ParentMovedHandler() {
             @Override
             public void onParentMoved(ParentMovedEvent event) {
+                mapPanel.getFloodMap().updateSize();
+            }
+        });
+        helperContainer.addVisibilityChangedHandler(new VisibilityChangedHandler() {
+            @Override
+            public void onVisibilityChanged(VisibilityChangedEvent event) {
                 mapPanel.doLayout(helperContainer.getWidth(), helperContainer.getHeight());
             }
         });
@@ -173,10 +178,10 @@
 
         WMS axis = getLayer(
             mapInfo.getWmsUrl(), mapInfo.getWmsLayers(),
-            mapInfo.getProjection(), false);
+            mapInfo.getProjection(), false, true);
         WMS back = getLayer(
             mapInfo.getBackgroundWmsUrl(), mapInfo.getBackgroundWmsLayers(),
-            mapInfo.getProjection(), false);
+            mapInfo.getProjection(), false, false);
 
         map.addLayer(back);
         map.addLayer(axis);
@@ -188,7 +193,7 @@
                 mapInfo.getWmsUrl().replace("river", "user"),
                 "ms_layer-hws-lines" + artifact.getUuid(),
                 mapInfo.getProjection(),
-                false);
+                false, true);
             map.addLayer(hwsLayer);
         }
         String userRgd = getDataValue("state.winfo.uesk.user-rgd", "uesk.user-rgd");
@@ -198,31 +203,34 @@
                 mapInfo.getWmsUrl().replace("river", "user"),
                 "ms_layer-user-rgd" + artifact.getUuid(),
                 mapInfo.getProjection(),
-                false);
+                false, true);
             map.addLayer(userLayer);
         }
         map.addControl(new Attribution());
         map.zoomToMaxExtent();
+
+        mapPanel.doLayout(helperContainer.getWidth(), helperContainer.getHeight());
     }
 
 
-    protected WMS getLayer(String url, String layers, String proj, boolean x) {
-        WMSParams params = new WMSParams();
+    protected WMS getLayer(String url, String layers, String proj, boolean isBaseLayer, boolean singleTiled) {
+        final WMSParams params = new WMSParams();
         params.setLayers(layers);
         params.setFormat("image/png");
-        params.setIsTransparent(!x);
+        params.setIsTransparent(!isBaseLayer);
 
-        WMSOptions opts = new WMSOptions();
+        final WMSOptions opts = new WMSOptions();
         opts.setProjection(proj);
-        opts.setSingleTile(true);
+        opts.setSingleTile(false); // FIXME: Make working...
+        opts.setTransitionEffect(TransitionEffect.RESIZE);
         opts.setRatio(1);
         opts.setBuffer(0);
         if (layers.equals("OSM-WMS-Dienst")) {
             opts.setAttribution(MSG.attribution());
         }
-        WMS wms = new WMS(layers, url, params, opts);
+        final WMS wms = new WMS(layers, url, params, opts);
         wms.setIsVisible(true);
-        wms.setIsBaseLayer(x);
+        wms.setIsBaseLayer(isBaseLayer);
 
         return wms;
     }
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java	Tue Apr 09 17:09:59 2013 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java	Tue Apr 09 17:10:28 2013 +0200
@@ -303,8 +303,11 @@
         for (final Layer l: layers) {
             l.redraw();
         }
+    }
 
-        getBarrierLayer(); // Raises Z-Index to 1000 again
+
+    public void updateSize() {
+        this.map.updateSize();
     }
 
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java	Tue Apr 09 17:09:59 2013 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java	Tue Apr 09 17:10:28 2013 +0200
@@ -3,7 +3,6 @@
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.user.client.rpc.AsyncCallback;
 import com.google.gwt.user.client.ui.AbsolutePanel;
-
 import com.smartgwt.client.util.SC;
 import com.smartgwt.client.widgets.Canvas;
 import com.smartgwt.client.widgets.events.ParentMovedEvent;
@@ -57,6 +56,7 @@
 import org.gwtopenmaps.openlayers.client.feature.VectorFeature;
 import org.gwtopenmaps.openlayers.client.format.GeoJSON;
 import org.gwtopenmaps.openlayers.client.layer.Layer;
+import org.gwtopenmaps.openlayers.client.layer.TransitionEffect;
 import org.gwtopenmaps.openlayers.client.layer.Vector;
 import org.gwtopenmaps.openlayers.client.layer.WMS;
 import org.gwtopenmaps.openlayers.client.layer.WMSOptions;
@@ -146,7 +146,7 @@
         rootLayout.setWidth100();
         rootLayout.setMembersMargin(2);
 
-        final HLayout hlayout = new HLayout();
+        HLayout hlayout = new HLayout();
         hlayout.setMembersMargin(0);
 
         this.themePanelCanvas = createThemePanel();
@@ -467,6 +467,8 @@
         opts.setRatio(1);
         if (layers.equals("OSM-WMS-Dienst")) {
             opts.setAttribution(MSG.attribution());
+            opts.setSingleTile(true);
+            opts.setTransitionEffect(TransitionEffect.RESIZE);
         }
         WMS wms = new WMS(layers, url, params, opts);
         wms.setIsVisible(at.getActive() == 1);
@@ -580,7 +582,7 @@
             new DataItem[] {item} );
 
         Config config       = Config.getInstance();
-        final String locale = config.getLocale();
+        String locale = config.getLocale();
 
         feedService.go(locale, getArtifact(), new Data[] { data },
             new AsyncCallback<Artifact>() {
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPrintPanel.java	Tue Apr 09 17:09:59 2013 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPrintPanel.java	Tue Apr 09 17:10:28 2013 +0200
@@ -7,11 +7,11 @@
 import com.smartgwt.client.util.SC;
 import com.smartgwt.client.widgets.Canvas;
 import com.smartgwt.client.widgets.form.DynamicForm;
+import com.smartgwt.client.widgets.form.fields.TextItem;
 import com.smartgwt.client.widgets.form.fields.ButtonItem;
-import com.smartgwt.client.widgets.form.fields.SelectItem;
-import com.smartgwt.client.widgets.form.fields.TextItem;
 import com.smartgwt.client.widgets.form.fields.events.ClickEvent;
 import com.smartgwt.client.widgets.form.fields.events.ClickHandler;
+import com.smartgwt.client.types.Alignment;
 
 import org.gwtopenmaps.openlayers.client.Bounds;
 import org.gwtopenmaps.openlayers.client.Map;
@@ -119,6 +119,10 @@
         this.pageCreator.setTitle("Ersteller");
         this.pageDatePlace.setTitle("Ort, Datum");
 
+        ButtonItem printButton = createPrintButtonItem();
+
+        printButton.setAlign(Alignment.RIGHT);
+
         DynamicForm df = new DynamicForm();
         df.setFields(
 //               this.pageFormat,
@@ -130,8 +134,7 @@
                this.pageSource,
                this.pageCreator,
                this.pageDatePlace,
-               createPrintButtonItem()
-               );
+               printButton);
         addChild(df);
     }
 
@@ -158,12 +161,11 @@
         GWT.log("Button created");
         btn.addClickHandler(new ClickHandler() {
 
-            @Override
             public void onClick(ClickEvent event) {
                 GWT.log("Print Button Click");
-//                updateCollection();
-                //Window.open(createPrintUrl(), "_blank", "");
-//                parent.destroy();
+                updateCollection();
+                Window.open(createPrintUrl(), "_blank", "");
+                parent.destroy();
             }
         });
         btn.setTitle(MSG.print());
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPrintWindow.java	Tue Apr 09 17:09:59 2013 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPrintWindow.java	Tue Apr 09 17:10:28 2013 +0200
@@ -16,11 +16,10 @@
         setHeight(280);
 
         setTitle(MSG.printWindowTitle());
+        centerInPage();
 
         this.panel = new MapPrintPanel(collection, mapToolbar, this);
         this.panel.setPadding(20);
         addItem(this.panel);
-
-        setShowModalMask(true);
     }
 }

http://dive4elements.wald.intevation.org