[OpenLayers-Users] Get WFS features geometry data

bkausbk at web.de bkausbk at web.de
Thu May 24 06:58:44 EDT 2007


Hi there,

I'm new in OpenLayers and I'm trying to manipulate certain WFS features geometry data.

I'm not sure how to start, but concerning certain examples Am I right in thinking that I have to start with following to load WFS Data:

var map = new OpenLayers.Map("map");

var baselayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://someurl/map", {layers: "mapname"});
var wfslayer =  new OpenLayers.Layer.WFS(
    "Some Name",
    "http://someurl/wfs",
    {},
    {featureClass: OpenLayers.Feature.WFS}
);

map.addLayers([baselayer, wfslayer]);

So but how do I get access to the features of WFS?

I found an example somewhere showing to access it by "map.layers[1].features" ... but corresponding the current source code there is NO "features" variable within OpenLayers.Layer class as it should be.

Another problem is, I only want features of the current view, is this possible?

regards

Benjamin Kalytta
_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192




More information about the Users mailing list