|
From: Lukas J. <luk...@de...> - 2011-03-11 15:31:36
|
This should do the trick:
wmsFeatOpt.setInfoFormat("application/vnd.ogc.gml"); //return result as gml
Från: Krishna Rajendra Alapati [mailto:kri...@ym...]
Skickat: den 8 mars 2011 14:50
Till: gwt...@li...
Ämne: [Gwt-openlayers-users] GetFeatureInfo in xml format
Hi All,
I am requesting a WMS service to get feature info and would like to get the response as xml. I am using the following code to get feature info and getting html response always
// set the options for getting the feature info
OpenLayers.setProxyHost("/rs/gwtOpenLayersProxy?targetURL=");
WMSGetFeatureInfoOptions wmsFeatOpt = new WMSGetFeatureInfoOptions();
wmsFeatOpt.setURL(config.getWmsURL());
wmsFeatOpt.setTitle("Get Feature Info");
wmsFeatOpt.setInfoFormat("text/xml");
wmsFeatOpt.setHover(true);
wmsFeatOpt.setQueryVisible(true);
WMSGetFeatureInfo info = new WMSGetFeatureInfo(wmsFeatOpt);
info.addGetFeatureListener(new FeatureInfoListener());
map.addControl(info);
info.activate();
I tried application/xml but still the same html response. How would I get a xml response ?
Thank you,
Krishna.
|