Hello Imran,

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.

http://geoserver.org/display/GEOSDOC/GetFeatureInfo+templates
http://geoserver.org/display/GEOSDOC/Freemarker+templates
http://docs.geoserver.org/stable/en/user/googleearth/tutorials/kmlplacemark/index.html
http://freemarker.sourceforge.net/docs/index.html

Hope this can help.
Cheers,

Hugo Martins

On Tue, Jun 8, 2010 at 1:42 PM, Imran Rajjad <raj...@gmail.com> wrote:

> firebug is showing the following request parameters
>
> BBOX    72.925254,33.54194,73.199912,33.747933
> FEATURE_COUNT   10
> FORMAT  image/gif
> HEIGHT  600
> INFO_FORMAT     text/html
> LAYERS  topp:networkcoverage
> QUERY_LAYERS    topp:networkcoverage
> REQUEST GetFeatureInfo
> SERVICE WMS
> SRS     EPSG:4326
> STYLES
> VERSION 1.1.1
> WIDTH   800
> X       690
> Y       295
>
> On Tue, Jun 8, 2010 at 5:18 PM, Imran Rajjad <raj...@gmail.com> wrote:
> > Hi ,
> >
> > my WMSGetFeatureInfo control is not returning any json,, my code is as
> below
> >
> > basicControl = {
> >                   click : new OpenLayers.Control.WMSGetFeatureInfo({
> >                     url: 'http://10.0.80.41:7004/geoserver/wms',
> >                        title: 'Identify features by clicking',
> >                       layers: [network_wms],
> >                        queryVisible: true,
> >                        vendorParams: {
> >                                    version: "1.1.1",
> >                                    info_format: "text/plain",
> >                                },
> >                 format : new OpenLayers.Format.GeoJSON()})
>                                                       };
> >
> >
> >                basicControl.click.events.register("getfeatureinfo",
> > this, showInfo);
> >                map.addControl(basicControl.click);
> >
> >                function showInfo(evt) {
> >                        alert(evt); //
> >                  }
> >
> >
> > when I check in FireBug. the request is sent but there is no
> > responseTexT, what am i doing wrong here
> >
> > regards,
> > Imran
> >
> >
> > On Tue, Jun 8, 2010 at 1:20 PM, Imran Rajjad <raj...@gmail.com> wrote:
> >> Hi,
> >>
> >> I`m trying to create a box selection that selects features from a wms
> >> overlay , I need the response to be in JSON and I also want to append
> >> my cql filter to this request.
> >>
> >> Can anyone point me to the documentation closer to this task?
> >>
> >> regarsd,
> >> Imran
> >>
> >> --
> >> I.R
> >>
> >
> >
> >
> > --
> > I.R
> >
>
>
>
> --
> I.R
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



-- 
Hugo Martins
FMV-UTL
CIISA-Epidemiologia e Saúde Pública Veterinária
Av. da Universidade Técnica
1300-477 Lisboa
N 38°42'49.54", W 9°11'43.42"
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to