diff flys-client/src/main/java/de/intevation/flys/client/client/ui/DigitizePanel.java @ 5032:4bf3b89b38d5

Added attribution to osm wms background layer.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 20 Feb 2013 09:53:24 +0100
parents 04ccec566689
children 2c1045a1e3fe
line wrap: on
line diff
--- 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);

http://dive4elements.wald.intevation.org