From: Krishna R. A. <kri...@ym...> - 2011-03-11 15:19:53
|
I tried that already and didn't worked that way. I think there is a bug in the bindings!!! info.getJSObject().setProperty("infoFormat", "application/vnd.ogc.gml"); does the magic for me and the format is set properly. I have seen that the version 0.5 of openlayes is seting the infoformat as the following /** * defaults to 'text/html' */ public void setInfoFormat(String infoFormat){ getJSObject().setProperty("infoformat", infoFormat); } it should be changed to the following /** * defaults to 'text/html' */ public void setInfoFormat(String infoFormat){ getJSObject().setProperty("infoFormat", infoFormat); } ________________________________ From: Lukas Johansson <luk...@de...> To: Krishna Rajendra Alapati <kri...@ym...>; "gwt...@li..." <gwt...@li...> Sent: Fri, 11 March, 2011 15:08:05 Subject: SV: [Gwt-openlayers-users] GetFeatureInfo in xml format 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. |