[OpenLayers-Users] Looping through the features of a WMS layer

Frank eucloid at gmail.com
Wed Aug 18 20:11:19 EDT 2010


Hi,

I want to get the map of Canada then loop through all provinces, in order to
color them differently (I'm going to create a new Vector layer for each
province and apply its own styleMap) :

var wmsLayer = new OpenLayers.Layer.WMS("Canada", "
http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
{
   layers: "bathymetry,land_fn,park,drain_fn,drainage," +
   "prov_bound,fedlimit,rail,road,popplace",
   transparent: "true", format: "image/png"
});

So the question is how to loop through the WMS layer features or
"prov_bound" to retrieve each province's geometry.

Thanks!
Francois
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100818/b44bc800/attachment.html


More information about the Users mailing list