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

Arnd Wippermann arnd.wippermann at web.de
Fri Aug 20 17:50:07 EDT 2010


if you interested to have your own dataset, then this is a good resource:
 
http://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-admin-1-s
tates-provinces/
 
Arnd

  _____  

Von: Frank [mailto:eucloid at gmail.com] 
Gesendet: Freitag, 20. August 2010 18:02
An: Arnd Wippermann
Cc: users at openlayers.org
Betreff: Re: [OpenLayers-Users] Looping through the features of a WMS layer


Thanks! I see, WMS are just images. 

If I ever succeed getting the Canadien provinces geometry/features, I'll
post the recipe.

Francois


On Fri, Aug 20, 2010 at 8:13 AM, Arnd Wippermann <arnd.wippermann at web.de>
wrote:


Hi,
 
if you use WMS you have no access to any features. You get only a picture.
For a certain point you can request GetFeatureInfo. If you want features,
you have to use WFS.
 
But keep in mind. You get only that from the servers, what they want to
publish (i.e attributes of GetFeatureInfo).
 
Arnd
 
 
  _____  

Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Frank
Gesendet: Donnerstag, 19. August 2010 02:11
An: users at openlayers.org
Betreff: [OpenLayers-Users] Looping through the features of a WMS layer


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/20100820/6e05fea3/attachment.html


More information about the Users mailing list