[Dive4elements-commits] [PATCH 7 of 7] Merged
Wald Commits
scm-commit at wald.intevation.org
Wed Feb 20 11:03:14 CET 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1361355006 -3600
# Node ID 58b92f37f56b9936b52cb968391f541e816f5f5d
# Parent ebd958cee715d9577c1149827a53ae1dbaba307f
# Parent ef289466917a3a9d54bdf6041bd1705cfa812b66
Merged.
diff -r ebd958cee715 -r 58b92f37f56b flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java Wed Feb 20 11:09:27 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java Wed Feb 20 11:10:06 2013 +0100
@@ -408,8 +408,9 @@
File dir,
WSPLGENJob job
) {
+ String river = artifact.getDataAsString("river");
String geoJSON = artifact.getDataAsString("uesk.barriers");
- String srid = FLYSUtils.getRiverSrid(artifact);
+ String srid = FLYSUtils.getRiverDGMSrid(river);
String srs = "EPSG:" + srid;
if (geoJSON == null || geoJSON.length() == 0) {
@@ -719,7 +720,7 @@
}
String river = artifact.getDataAsString("river");
- String srid = FLYSUtils.getRiverSrid(artifact);
+ String srid = FLYSUtils.getRiverDGMSrid(river);
String srs = "EPSG:" + srid;
Floodplain plain = Floodplain.getFloodplain(river);
diff -r ebd958cee715 -r 58b92f37f56b flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java Wed Feb 20 11:09:27 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java Wed Feb 20 11:10:06 2013 +0100
@@ -446,11 +446,11 @@
double km = (gauge.getKmEnd() + gauge.getKmStart())/2d;
mainValueView.addItem(new WQAutoTabSet(gauge.getRiverName(),
new double[] {km, km}));
- mainValueView.setWidth(1010);
- mainValueView.setHeight(700);
+ mainValueView.setWidth(450);
+ mainValueView.setHeight(600);
- mainValueView.setMaximized(true);
-
+ mainValueView.setMaximized(false);
+ mainValueView.centerInPage();
mainValueView.setCanDragReposition(true);
mainValueView.setCanDragResize(true);
mainValueView.setShowMaximizeButton(true);
diff -r ebd958cee715 -r 58b92f37f56b flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java Wed Feb 20 11:09:27 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java Wed Feb 20 11:10:06 2013 +0100
@@ -1048,6 +1048,8 @@
String areatransparency();
+ String attribution();
+
// Manual Points editor
String addpoints();
diff -r ebd958cee715 -r 58b92f37f56b flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Wed Feb 20 11:09:27 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Wed Feb 20 11:10:06 2013 +0100
@@ -543,6 +543,7 @@
wsplgen_cat3 = Fill Color 2.0 <= DIFF < 3
wsplgen_cat4 = Fill Color 3.0 <= DIFF < 4
wsplgen_cat5 = Fill Color 4.0 <= DIFF
+attribution = ©Intevation GmbH 2012<br>Data ©<a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>
# Manual Points Editor
addpoints = Add points
diff -r ebd958cee715 -r 58b92f37f56b flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Wed Feb 20 11:09:27 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Wed Feb 20 11:10:06 2013 +0100
@@ -402,6 +402,7 @@
requireDGM = Sie m\u00fcssen ein DGM ausw\u00e4hlen.
upload_file = hochladen
shape_file_upload = Shapedatei hochladen
+attribution = ©Intevation GmbH 2012<br>Data ©<a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>
# data cage
waterlevels = Wasserst\u00e4nde
diff -r ebd958cee715 -r 58b92f37f56b flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Wed Feb 20 11:09:27 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Wed Feb 20 11:10:06 2013 +0100
@@ -402,6 +402,7 @@
requireDGM = You need to choose a DEM.
upload_file = upload
shape_file_upload = Upload shapefile
+attribution = ©Intevation GmbH 2012<br>Data ©<a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>
# data cage
waterlevels = Waterlevels
diff -r ebd958cee715 -r 58b92f37f56b flys-client/src/main/java/de/intevation/flys/client/client/ui/DigitizePanel.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DigitizePanel.java Wed Feb 20 11:09:27 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DigitizePanel.java Wed Feb 20 11:10:06 2013 +0100
@@ -39,6 +39,7 @@
import java.util.List;
import org.gwtopenmaps.openlayers.client.Map;
+import org.gwtopenmaps.openlayers.client.control.Attribution;
import org.gwtopenmaps.openlayers.client.feature.VectorFeature;
import org.gwtopenmaps.openlayers.client.format.GeoJSON;
import org.gwtopenmaps.openlayers.client.layer.WMS;
@@ -269,7 +270,7 @@
VectorFeature[] features = new GeoJSON().read(geojson);
floodMap.getBarrierLayer().addFeatures(features);
}
-
+ map.addControl(new Attribution());
map.zoomToMaxExtent();
}
@@ -285,7 +286,9 @@
opts.setSingleTile(true);
opts.setRatio(1);
opts.setBuffer(0);
-
+ if (layers.equals("OSM-WMS-Dienst")) {
+ opts.setAttribution(MSG.attribution());
+ }
WMS wms = new WMS(layers, url, params, opts);
wms.setIsVisible(true);
wms.setIsBaseLayer(x);
diff -r ebd958cee715 -r 58b92f37f56b flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java Wed Feb 20 11:09:27 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java Wed Feb 20 11:10:06 2013 +0100
@@ -6,6 +6,7 @@
import org.gwtopenmaps.openlayers.client.MapOptions;
import org.gwtopenmaps.openlayers.client.MapWidget;
import org.gwtopenmaps.openlayers.client.Style;
+import org.gwtopenmaps.openlayers.client.control.Attribution;
import org.gwtopenmaps.openlayers.client.control.ScaleLine;
import org.gwtopenmaps.openlayers.client.control.ScaleLineOptions;
import org.gwtopenmaps.openlayers.client.event.VectorFeatureAddedListener;
@@ -56,6 +57,7 @@
Integer.toString(height),
opts);
map = mapWidget.getMap();
+ map.addControl(new Attribution());
}
diff -r ebd958cee715 -r 58b92f37f56b flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java Wed Feb 20 11:09:27 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java Wed Feb 20 11:10:06 2013 +0100
@@ -454,7 +454,6 @@
if (url == null || layers == null) {
return null;
}
-
this.wmsUrls.put(name, url);
WMSParams params = new WMSParams();
@@ -466,7 +465,9 @@
opts.setProjection("EPSG:" + getSrid());
opts.setSingleTile(true);
opts.setRatio(1);
-
+ if (layers.equals("OSM-WMS-Dienst")) {
+ opts.setAttribution(MSG.attribution());
+ }
WMS wms = new WMS(layers, url, params, opts);
wms.setIsVisible(at.getActive() == 1);
wms.setIsBaseLayer(false);
diff -r ebd958cee715 -r 58b92f37f56b flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeInfoPanel.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeInfoPanel.java Wed Feb 20 11:09:27 2013 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeInfoPanel.java Wed Feb 20 11:10:06 2013 +0100
@@ -5,7 +5,7 @@
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.i18n.client.NumberFormat;
import com.google.gwt.user.client.ui.Anchor;
-import com.google.gwt.user.client.ui.Grid;
+import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.Label;
@@ -24,43 +24,64 @@
public GaugeInfoPanel(GaugeInfo gauge, FLYS flys) {
this.flys = flys;
setStyleName("gaugeinfopanel");
- setWidth100();
-
- Grid grid = new Grid(5, 2);
NumberFormat nf = NumberFormat.getDecimalFormat();
+ VLayout grid = new VLayout();
+ HLayout line1 = new HLayout();
+
Double minw = gauge.getMinW();
Double maxw = gauge.getMaxW();
if (minw != null && maxw != null) {
- grid.setText(0, 0, MSG.wq_value_q());
- grid.setText(0, 1, nf.format(minw) +
- " - " + nf.format(maxw));
+ Label key = new Label(MSG.wq_value_q());
+ Label value = new Label(nf.format(minw) +
+ " - " + nf.format(maxw));
+ key.setWidth(150);
+ line1.addMember(key);
+ line1.addMember(value);
}
+ HLayout line2 = new HLayout();
Double minq = gauge.getMinQ();
Double maxq = gauge.getMaxQ();
if (minq != null && maxq != null) {
- grid.setText(1, 0, MSG.wq_value_w());
- grid.setText(1, 1, nf.format(minq) +
+ Label key = new Label(MSG.wq_value_w());
+ Label value = new Label( nf.format(minq) +
" - " + nf.format(maxq));
+ key.setWidth(150);
+ line2.addMember(key);
+ line2.addMember(value);
}
+ HLayout line3 = new HLayout();
Double aeo = gauge.getAeo();
if (aeo != null) {
- grid.setText(2, 0, "AEO [km²]");
- grid.setText(2, 1, nf.format(aeo));
+ Label key = new Label("AEO [km²]");
+ Label value = new Label(nf.format(aeo));
+ key.setWidth(150);
+ line3.addMember(key);
+ line3.addMember(value);
}
+ HLayout line4 = new HLayout();
Double datum = gauge.getDatum();
if (datum != null) {
- grid.setText(3, 0, MSG.gauge_zero() + " [" +
+ Label key = new Label(MSG.gauge_zero() + " [" +
gauge.getWstUnit() + "]");
- grid.setText(3, 1, nf.format(datum));
+ Label value = new Label(nf.format(datum));
+ key.setWidth(150);
+ line4.addMember(key);
+ line4.addMember(value);
}
- grid.setWidget(4,0, new GaugeMainValueAnchor(flys, gauge));
+ HLayout line5 = new HLayout();
+ line5.addMember(new GaugeMainValueAnchor(flys, gauge));
+ grid.addMember(line1);
+ grid.addMember(line2);
+ grid.addMember(line3);
+ grid.addMember(line4);
+ grid.addMember(line5);
addMember(grid);
}
diff -r ebd958cee715 -r 58b92f37f56b flys-client/src/main/webapp/FLYS.css
--- a/flys-client/src/main/webapp/FLYS.css Wed Feb 20 11:09:27 2013 +0100
+++ b/flys-client/src/main/webapp/FLYS.css Wed Feb 20 11:10:06 2013 +0100
@@ -235,3 +235,8 @@
color: #a9c9e6;
margin-left: 10px;
}
+
+.olControlAttribution {
+ bottom: 1em !important;
+ font-size: 12px !important;
+}
More information about the Dive4elements-commits
mailing list