|
From: Federica De M. <fde...@tp...> - 2011-06-06 10:55:48
|
Hi everybody.
I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers
map but I cannot make it work. I recive no result in the alert window; Now
I'm using che sample geoserver layer (Tasmania boundary and waters) but I
keep on getting no results. My application runs at localhost:8080 on jboss
and geoserver is running with Jetty at localhost:9090. This is my code:
<code>
String wmsurl=http://localhost:9090/geoserver/wms;
WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions();
options.setInfoFormat("text/html");
options.setURL(wmsurl);
options.setTitle("Query visible layers");
options.setQueryVisible(true);
WMSGetFeatureInfo info = new WMSGetFeatureInfo(options);
info.addGetFeatureListener(new GetFeatureInfoListener(){
public void onGetFeatureInfo(GetFeatureInfoEvent eo) {
Window.alert(eo.getType() + " - " + eo.getText());
}
});
map.addControl(info);
info.activate();
</code>
Do you have any idea on how to make it work. I think I'm missing something
but I really cannot understand what, please help me.
Thank you, Federica.
|