Hello Imran,<br><br>The problem you are facing has nothing to do with openlayers, it is though related with geoserver. I'm not sure if current releases of geoserver already present the json output format but you can always program a template to return your results in json format. Check the following sites and if you have further questions i think you'll have better chances of getting an answer to this problem in the geoserver list.<br>
<br><a href="http://geoserver.org/display/GEOSDOC/GetFeatureInfo+templates">http://geoserver.org/display/GEOSDOC/GetFeatureInfo+templates</a><br><a href="http://geoserver.org/display/GEOSDOC/Freemarker+templates">http://geoserver.org/display/GEOSDOC/Freemarker+templates</a><br>
<a href="http://docs.geoserver.org/stable/en/user/googleearth/tutorials/kmlplacemark/index.html">http://docs.geoserver.org/stable/en/user/googleearth/tutorials/kmlplacemark/index.html</a><br><a href="http://freemarker.sourceforge.net/docs/index.html">http://freemarker.sourceforge.net/docs/index.html</a><br>
<br>Hope this can help.<br>Cheers,<br><br>Hugo Martins<br><br><div class="gmail_quote">On Tue, Jun 8, 2010 at 1:42 PM, Imran Rajjad <span dir="ltr"><<a href="mailto:rajjad@gmail.com">rajjad@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">firebug is showing the following request parameters<br>
<br>
BBOX 72.925254,33.54194,73.199912,33.747933<br>
FEATURE_COUNT 10<br>
FORMAT image/gif<br>
HEIGHT 600<br>
INFO_FORMAT text/html<br>
LAYERS topp:networkcoverage<br>
QUERY_LAYERS topp:networkcoverage<br>
REQUEST GetFeatureInfo<br>
SERVICE WMS<br>
SRS EPSG:4326<br>
STYLES<br>
VERSION 1.1.1<br>
WIDTH 800<br>
X 690<br>
Y 295<br>
<div><div></div><div class="h5"><br>
On Tue, Jun 8, 2010 at 5:18 PM, Imran Rajjad <<a href="mailto:rajjad@gmail.com">rajjad@gmail.com</a>> wrote:<br>
> Hi ,<br>
><br>
> my WMSGetFeatureInfo control is not returning any json,, my code is as below<br>
><br>
> basicControl = {<br>
> click : new OpenLayers.Control.WMSGetFeatureInfo({<br>
> url: '<a href="http://10.0.80.41:7004/geoserver/wms" target="_blank">http://10.0.80.41:7004/geoserver/wms</a>',<br>
> title: 'Identify features by clicking',<br>
> layers: [network_wms],<br>
> queryVisible: true,<br>
> vendorParams: {<br>
> version: "1.1.1",<br>
> info_format: "text/plain",<br>
> },<br>
> format : new OpenLayers.Format.GeoJSON()}) };<br>
><br>
><br>
> basicControl.click.events.register("getfeatureinfo",<br>
> this, showInfo);<br>
> map.addControl(basicControl.click);<br>
><br>
> function showInfo(evt) {<br>
> alert(evt); //<br>
> }<br>
><br>
><br>
> when I check in FireBug. the request is sent but there is no<br>
> responseTexT, what am i doing wrong here<br>
><br>
> regards,<br>
> Imran<br>
><br>
><br>
> On Tue, Jun 8, 2010 at 1:20 PM, Imran Rajjad <<a href="mailto:rajjad@gmail.com">rajjad@gmail.com</a>> wrote:<br>
>> Hi,<br>
>><br>
>> I`m trying to create a box selection that selects features from a wms<br>
>> overlay , I need the response to be in JSON and I also want to append<br>
>> my cql filter to this request.<br>
>><br>
>> Can anyone point me to the documentation closer to this task?<br>
>><br>
>> regarsd,<br>
>> Imran<br>
>><br>
>> --<br>
>> I.R<br>
>><br>
><br>
><br>
><br>
> --<br>
> I.R<br>
><br>
<br>
<br>
<br>
--<br>
I.R<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Hugo Martins<br>FMV-UTL<br>CIISA-Epidemiologia e Saúde Pública Veterinária<br>Av. da Universidade Técnica<br>1300-477 Lisboa<br>N 38°42'49.54", W 9°11'43.42"<br>