[OpenLayers-Users] Symbology

Phil Scadden p.scadden at gns.cri.nz
Wed Aug 21 14:27:38 PDT 2013


var zipPen = new OpenLayers.Layer.Vector("ZipPen", {
> strategies: [new OpenLayers.Strategy.BBOX(bbox)],
>                 protocol: new OpenLayers.Protocol.WFS({
>                     version: "1.1.0",
>                     url: "/geoserver/wfs",
>                     featureType: "SPOOL_ZIP_July_1_13_test",
>                     geometryName: "the_geom",
>                     geometryType: "Polygon",
>                     featureNS: "maps.decapower.org/Spool",
>                     features: [],
>                     srsName: "EPSG:4236"
>                 })});

I am puzzled by the "features" parameter in that protocol options. 
Taking that out you should get the layer returned to your browser in GML 
(you should be able to verify this by looking at POST calls in firebug 
or chrome developer tools - pointless proceeding further until you know 
this is working. ) It should create a vector layer from this GML, and 
you can access the feature data from the layer object.

I wonder if you have looked hard at your design though - unless your 
vectors layers are small, web mapping works best if you use WMS for 
display and WFS for query. Vector layers are slow to download and tax 
the browser since JS is much slower than a WMS server for rendering.



Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.



More information about the Users mailing list