[OpenLayers-Users] wfs json layer from geoserver

Imran Rajjad rajjad at gmail.com
Wed Jan 11 07:35:38 EST 2012


hi list,

I am trying to load a WFS layer with json format

var wfs = new OpenLayers.Layer.WFS("wfs_layer",
                "http://server:port/geoserver/wfs",
                {typename: 'topp:test_layer', maxfeatures: 200,
outputformat: "json"},
                {
     featureClass: OpenLayers.Feature.WFS,
     format: "GeoJSON",
     extractAttributes:true,
     styleMap:style
    }
   );

and the geoserver log shows the below request, but there are no results as
per FireBug


11 Jan 17:31:35 INFO [geoserver.wfs] -
Request: getFeature
        handle = null
        service = WFS
        version = 1.0.0
        baseUrl = http://host:port/geoserver/
        providedVersion = 1.0.0
        query = [net.opengis.wfs.impl.QueryTypeImpl at b0df53 (group: null,
propertyName: null, function: null, filter: [  bbox POLYGON
((68.849301577111 30.391413707024, 68.849301577111 30.5524350196,
69.048093321031 30.5524350196, 69.048093321031 30.391413707024,
68.849301577111 30.391413707024)) ], sortBy: null, featureVersion: null,
handle: null, srsName: null, typeName: [{
http://www.openplans.org/topp}test_layer])]
        maxFeatures = 200
        outputFormat = json
        resultType = results
        traverseXlinkDepth = null
        traverseXlinkExpiry = null
        formatOptions = {}


I am not using the Proxy because I think you do not need it incase of JSON.
but it seems  I am missing something

regards,--
I.R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120111/8b1e38e4/attachment.html


More information about the Users mailing list