# HG changeset patch # User Ingo Weinzierl # Date 1321618327 0 # Node ID 09566522e89954e412d69b2c91879f6e0690bd82 # Parent 6a7cfe9d87fe701c3f805a71ab52502bbadd982b Query GetFeatureInfo with layers defined in MapThemePanel - which are the real layers in the map. flys-client/trunk@3289 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 6a7cfe9d87fe -r 09566522e899 flys-client/ChangeLog --- a/flys-client/ChangeLog Fri Nov 18 12:06:16 2011 +0000 +++ b/flys-client/ChangeLog Fri Nov 18 12:12:07 2011 +0000 @@ -1,3 +1,10 @@ +2011-11-18 Ingo Weinzierl + + * src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java, + src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfo.java: + Fetch the list of themes used for the GetFeatureInfo request on the fly + from MapThemePanel. + 2011-11-18 Ingo Weinzierl * src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java, diff -r 6a7cfe9d87fe -r 09566522e899 flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfo.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfo.java Fri Nov 18 12:06:16 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfo.java Fri Nov 18 12:12:07 2011 +0000 @@ -13,11 +13,11 @@ import org.gwtopenmaps.openlayers.client.event.MapClickListener; import de.intevation.flys.client.shared.model.FeatureInfo; -import de.intevation.flys.client.shared.model.Theme; import de.intevation.flys.client.client.FLYSConstants; import de.intevation.flys.client.client.services.GFIService; import de.intevation.flys.client.client.services.GFIServiceAsync; +import de.intevation.flys.client.client.ui.ThemePanel; public class GetFeatureInfo implements MapClickListener { @@ -26,9 +26,9 @@ protected FLYSConstants MSG = GWT.create(FLYSConstants.class); - protected Map map; - protected List themes; - protected String infoFormat; + protected Map map; + protected ThemePanel themePanel; + protected String infoFormat; /** @@ -37,9 +37,9 @@ * @param url * @param infoFormat */ - public GetFeatureInfo(Map map, List themes, String infoFormat) { + public GetFeatureInfo(Map map, ThemePanel themePanel, String infoFormat) { this.map = map; - this.themes = themes; + this.themePanel = themePanel; this.infoFormat = infoFormat; } @@ -60,7 +60,7 @@ Pixel pixel = map.getPixelFromLonLat(lonlat); gfiService.query( - themes, + themePanel.getThemeList().getThemes(), infoFormat, map.getExtent().toString(), map.getProjection(), diff -r 6a7cfe9d87fe -r 09566522e899 flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java Fri Nov 18 12:06:16 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java Fri Nov 18 12:12:07 2011 +0000 @@ -20,7 +20,6 @@ import org.gwtopenmaps.openlayers.client.util.Attributes; import de.intevation.flys.client.client.FLYSConstants; -import de.intevation.flys.client.client.ui.OutputTab; import de.intevation.flys.client.client.ui.Toolbar; import de.intevation.flys.client.client.utils.EnableDisableCmd; import de.intevation.flys.client.shared.model.ThemeList; @@ -485,7 +484,7 @@ protected ImgButton createGetFeatureInfo() { - OutputTab ot = getOutputTab(); + MapOutputTab ot = (MapOutputTab) getOutputTab(); if (ot == null) { return null; } @@ -494,7 +493,7 @@ getFeatureInfo = new GetFeatureInfo( getMap(), - tl.getThemes(), + ot.getThemePanel(), "gml"); EnableDisableCmd cmd = new EnableDisableCmd() {