<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18939"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=266312709-20082010><FONT color=#0000ff
size=2 face=Arial>Hi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=266312709-20082010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=266312709-20082010><FONT color=#0000ff
size=2 face=Arial>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.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=266312709-20082010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=266312709-20082010><FONT color=#0000ff
size=2 face=Arial>But keep in mind. You get only that from the servers, what
they want to publish (i.e attributes of GetFeatureInfo).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=266312709-20082010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=266312709-20082010><FONT color=#0000ff
size=2 face=Arial>Arnd</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=266312709-20082010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=266312709-20082010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT size=2 face=Tahoma><B>Von:</B>
users-bounces@openlayers.org [mailto:users-bounces@openlayers.org] <B>Im Auftrag
von </B>Frank<BR><B>Gesendet:</B> Donnerstag, 19. August 2010
02:11<BR><B>An:</B> users@openlayers.org<BR><B>Betreff:</B> [OpenLayers-Users]
Looping through the features of a WMS layer<BR></FONT><BR></DIV>
<DIV></DIV><FONT size=2><SPAN
style="FONT-FAMILY: arial,helvetica,sans-serif"></SPAN></FONT>Hi,<BR><BR>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) :<BR><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">var wmsLayer = new
OpenLayers.Layer.WMS("Canada", "<A
href="http://www2.dmsolutions.ca/cgi-bin/mswms_gmap">http://www2.dmsolutions.ca/cgi-bin/mswms_gmap</A>",</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">{</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> layers:
"bathymetry,land_fn,park,drain_fn,drainage," +</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">
"prov_bound,fedlimit,rail,road,popplace",</SPAN><BR
style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace"> transparent: "true",
format: "image/png"</SPAN><BR style="FONT-FAMILY: courier new,monospace"><SPAN
style="FONT-FAMILY: courier new,monospace">});</SPAN><BR><BR>So the question is
how to loop through the WMS layer features or "prov_bound" to retrieve each
province's geometry. <BR><BR>Thanks!<BR>Francois<BR><BR><BR><BR></BODY></HTML>