I can't believe, that your WFS layer would show anything. You haven't
declared a "typename".
Protocol.WFS seems not to support maxfeatures or vendor params. But you can
add these params
to the url of the WFS Server.
projection and srsName are only needed, if the requested features are not in
the map projection.
var wfslayer = new OpenLayers.Layer.Vector("WFS", {
title : "WFS Server Projection 4326",
projection: new OpenLayers:projection("EPSG:4326"),
//strategies: [new OpenLayers.Strategy.Fixed()],
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
url: WFS_SERVER_URL + "?maxfeatures=1&nocache=" + (new
Date()).getTime(),
geometryName: "msGeometry",
featurePrefix: "ms",
featureType: "punkte",
featureNS: "http://mapserver.gis.umn.edu/mapserver",
srsName: "EPSG:4326",
version: "1.0.0"
}),
displayInLayerSwitcher: false,
styleMap: new OpenLayers.StyleMap({
'default': {
strokeColor: "black", strokeWidth: 1, fillColor: 'red',
pointRadius: 5, fillOpacity: 1, strokeOpacity: 1
},
})
});
Regards,
Arnd
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von mazery
Gesendet: Mittwoch, 25. April 2012 01:48
An: [email protected]
Betreff: [OpenLayers-Users] Re: How to use Protocol.WFS to replace Layer.WFS
Whoops. Wrong link. Code is here;
http://pastebin.com/hGvbJwgj
--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/How-to-use-Protocol-WFS-to-replace-Layer
-WFS-tp4915094p4915105.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users