# HG changeset patch # User Raimund Renkert # Date 1361350404 -3600 # Node ID 4bf3b89b38d59c37b45c9bb69c0d00dbdc0ade4a # Parent 9c529b9de6b5040ba5cdf764528b32def0289d35 Added attribution to osm wms background layer. diff -r 9c529b9de6b5 -r 4bf3b89b38d5 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 09:47:24 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java Wed Feb 20 09:53:24 2013 +0100 @@ -1048,6 +1048,8 @@ String areatransparency(); + String attribution(); + // Manual Points editor String addpoints(); diff -r 9c529b9de6b5 -r 4bf3b89b38d5 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 09:47:24 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Wed Feb 20 09:53:24 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
Data ©OpenStreetMap # Manual Points Editor addpoints = Add points diff -r 9c529b9de6b5 -r 4bf3b89b38d5 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 09:47:24 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Wed Feb 20 09:53:24 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
Data ©OpenStreetMap # data cage waterlevels = Wasserst\u00e4nde diff -r 9c529b9de6b5 -r 4bf3b89b38d5 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 09:47:24 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Wed Feb 20 09:53:24 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
Data ©OpenStreetMap # data cage waterlevels = Waterlevels diff -r 9c529b9de6b5 -r 4bf3b89b38d5 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 09:47:24 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DigitizePanel.java Wed Feb 20 09:53:24 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 9c529b9de6b5 -r 4bf3b89b38d5 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 09:47:24 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java Wed Feb 20 09:53:24 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 9c529b9de6b5 -r 4bf3b89b38d5 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 09:47:24 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java Wed Feb 20 09:53:24 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 9c529b9de6b5 -r 4bf3b89b38d5 flys-client/src/main/webapp/FLYS.css --- a/flys-client/src/main/webapp/FLYS.css Wed Feb 20 09:47:24 2013 +0100 +++ b/flys-client/src/main/webapp/FLYS.css Wed Feb 20 09:53:24 2013 +0100 @@ -235,3 +235,8 @@ color: #a9c9e6; margin-left: 10px; } + +.olControlAttribution { + bottom: 1em !important; + font-size: 12px !important; +}