diff flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfoWindow.java @ 5818:a4ff4167be1e

Request feature info on all layers and show it as html if the server does not return valid gml. Non queryable layers produce an error message when the request fails. This is good enough
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 24 Apr 2013 17:33:27 +0200
parents e0ab5a566688
children 79717f1cf6eb
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfoWindow.java	Wed Apr 24 15:20:50 2013 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/GetFeatureInfoWindow.java	Wed Apr 24 17:33:27 2013 +0200
@@ -2,6 +2,7 @@
 
 import com.google.gwt.core.client.GWT;
 
+import com.smartgwt.client.widgets.HTMLPane;
 import com.smartgwt.client.widgets.Label;
 import com.smartgwt.client.widgets.Window;
 import com.smartgwt.client.widgets.layout.VLayout;
@@ -11,6 +12,7 @@
 
 import de.intevation.flys.client.client.FLYSConstants;
 import de.intevation.flys.client.shared.model.FeatureInfo;
+import de.intevation.flys.client.shared.model.FeatureInfoResponse;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -31,6 +33,8 @@
 
     protected String title;
 
+    protected String featureInfoHTML;
+
 
     public static final int ROW_HEIGHT = 25;
 
@@ -43,6 +47,27 @@
         initLayout();
     }
 
+    public GetFeatureInfoWindow(String featureInfoHTML, String title) {
+        super();
+        features = null;
+        this.title = title;
+        this.featureInfoHTML = featureInfoHTML;
+
+        initLayoutHTML();
+    }
+
+    protected void initLayoutHTML() {
+        HTMLPane pane = new HTMLPane();
+        pane.setContents(featureInfoHTML);
+        addItem(pane);
+        setWidth(500);
+        setHeight(300);
+
+        setIsModal(false);
+//        setShowModalMask(true);
+
+        centerInPage();
+    }
 
     protected void initLayout() {
         VLayout root = new VLayout();

http://dive4elements.wald.intevation.org