OpenLayers version 2.10
MapServer version 5.6.6
Goal: Render vector layer based on WFS protocol
I'm trying to understand why a vector layer will not render on my
map. I can clearly see the layer in the layerSwitcher control so I
presume the layer is being presented, but there are no actual
features rendered.
The vector layer is defined using a WFS protocol:
tens = new OpenLayers.Layer.Vector("TENS",
{
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
url: mapPath,
featureType: "tenszones",
}),
styleMap: new OpenLayers.StyleMap({
strokeWidth: 3,
strokeColor: "#333333"
}),
filter: new OpenLayers.Filter.Logical({
type: OpenLayers.Filter.Logical.NOT,
filters: [
new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.EQUAL_TO,
property: "name",
value: "County0"
})
]
})
},
{
isBaseLayer: false,
buffer: 0
}
);
When I watch the page load I can clearly see the XML results from the
WFS call (see XML output) but no features are rendered on the map.
I'm following from the 'WFS Protocol and Filter' example. Any help
would be appreciated.
<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
http://mapserver.gis.umn.edu/mapserver
http://localhost/cgi-bin/mapserv?map=/home/mark/htdocs/sandbox/contra_costa/mapdata/cws.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=tenszones&OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-122.430673,37.902872
-121.783758,38.058186</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ms:tenszones fid="tenszones.2">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-121.882119,38.004151
-121.822493,38.034986</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:Polygon srsName="EPSG:4326">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>-121.826546,38.024671 -121.825545,38.018151
-121.822493,38.015989 -121.832033,38.004151 -121.847393,38.007365
-121.876296,38.018261 -121.875579,38.022347 -121.882119,38.024341
-121.880209,38.032456 -121.878309,38.034986 -121.826546,38.024671
</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</ms:msGeometry>
<ms:gid>2</ms:gid>
<ms:area>0.00104289122555201</ms:area>
<ms:perimeter>0.147388060113902</ms:perimeter>
<ms:name>DOW0</ms:name>
</ms:tenszones>
</gml:featureMember>
<gml:featureMember>
<ms:tenszones fid="tenszones.3">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-121.837932,37.999340
-121.819430,38.024672</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:Polygon srsName="EPSG:4326">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>-121.826535,38.024672 -121.819800,38.022000
-121.819430,38.004870 -121.821310,37.999340 -121.837932,38.003598
-121.836350,38.005070 -121.832027,38.004150 -121.822495,38.015991
-121.825510,38.018100 -121.826535,38.024672 </gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</ms:msGeometry>
<ms:gid>3</ms:gid>
<ms:area>0.000183226789886248</ms:area>
<ms:perimeter>0.0794914873797834</ms:perimeter>
<ms:name>DOW1</ms:name>
</ms:tenszones>
</gml:featureMember>
</wfs:FeatureCollection>
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users