Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java @ 4739:5014a84c0c7d
Add "maptype" parameter to MapInfoService.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Wed, 02 Jan 2013 15:24:18 +0100 |
parents | 8ca06d3040d0 |
children | ce570c74aa94 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java Wed Jan 02 15:15:45 2013 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapOutputTab.java Wed Jan 02 15:24:18 2013 +0100 @@ -3,6 +3,7 @@ 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; @@ -45,6 +46,7 @@ import de.intevation.flys.client.shared.model.ThemeList; import de.intevation.flys.client.shared.model.WMSLayer; +import java.util.HashMap; import java.util.List; import org.gwtopenmaps.openlayers.client.Bounds; @@ -94,6 +96,7 @@ protected VLayout rootLayout = new VLayout(); protected AbsolutePanel absPan = new AbsolutePanel(); protected FloodMap floodMap; + protected java.util.Map<String, String> wmsUrls = new HashMap<String, String>(); public MapOutputTab( @@ -437,14 +440,14 @@ public Layer createWMSLayer(Theme theme) { - if (theme == null) { + if (theme == null || !(theme instanceof AttributedTheme)) { return null; } AttributedTheme at = (AttributedTheme) theme; - //String type = at.getAttr("name"); - //String desc = at.getAttr("description"); + String name = at.getAttr("name"); + String desc = at.getAttr("description"); String url = at.getAttr("url"); String layers = at.getAttr("layers"); @@ -452,7 +455,7 @@ return null; } - //boolean baseLayer = type.equals("floodmap.wmsbackground"); + this.wmsUrls.put(name, url); WMSParams params = new WMSParams(); params.setLayers(layers); @@ -472,6 +475,11 @@ } + public java.util.Map<String, String> wmsUrls() { + return this.wmsUrls; + } + + protected MapToolbar createControlPanel() { return new MapToolbar(this, floodMap, false); }