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

Frank eucloid at gmail.com
Fri Aug 20 12:02:13 EDT 2010


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


More information about the Users mailing list