[OpenLayers-Users] Re: Get Features from a WMS Layer
Ian Turton
ijturton at gmail.com
Mon May 23 20:51:31 EDT 2011
On 23 May 2011 20:41, IvanBell <Ivan.Bell at cca.com> wrote:
> I am not sure how that example demonstrates how to query the features for a
> specified layer. I see that it iterates through the defined/named layers in
> the SLD file; but I don't see a query for the features within a layer.
> Please advise.
>
var wfs = new OpenLayers.Layer.Vector("States", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
url: "http://ian01.geog.psu.edu/geoserver/wfs",
featureType: "states",
featureNS: "http://www.openplans.org/topp"
})
});
Loads the features from the WFS, you can then do anything you want
with the wfs.features array.
Ian
--
Ian Turton
More information about the Users
mailing list