<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.23588"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=578350818-05082014><FONT color=#0000ff 
size=2 face=Arial>you could use SLD for WMS to accomplish this 
task.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=578350818-05082014><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=578350818-05082014><FONT color=#0000ff 
size=2 face=Arial>most likely you have to create a sld file for every attribute 
you wish to visualize.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=578350818-05082014><FONT color=#0000ff 
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=578350818-05082014><FONT color=#0000ff 
size=2 face=Arial>An example, that shows different styling for the same layer 
based on different rules (not always by attribute)</FONT></SPAN></DIV>
<DIV><FONT color=#0000ff size=2 face=Arial><A 
href="http://gis.ibbeck.de/ginfo/apps/OLExamples/OL210/MapServer_SLD_World/MapServer_SLD_World.asp">http://gis.ibbeck.de/ginfo/apps/OLExamples/OL210/MapServer_SLD_World/MapServer_SLD_World.asp</A></FONT></DIV>
<DIV><FONT color=#0000ff size=2 face=Arial></FONT> </DIV>
<DIV><SPAN class=578350818-05082014><FONT color=#0000ff size=2 
face=Arial>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=578350818-05082014><FONT color=#0000ff size=2 
face=Arial>Arnd</FONT></SPAN></DIV>
<DIV><BR></DIV>
<DIV dir=ltr lang=de class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>Von:</B> openlayers-users-bounces@lists.osgeo.org 
[mailto:openlayers-users-bounces@lists.osgeo.org] <B>Im Auftrag von </B>Andreas 
Forø Tollefsen<BR><B>Gesendet:</B> Dienstag, 5. August 2014 14:51<BR><B>An:</B> 
openlayers-users@lists.osgeo.org<BR><B>Betreff:</B> [OpenLayers-Users] Class 
based fill of polygons<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr>Hi all,
<DIV><BR></DIV>
<DIV>I am new to OpenLayers (so forgive me in advance). </DIV>
<DIV><BR></DIV>
<DIV>I have a polygon layer in GeoServer (from a shapefile) consisting of 487 
features and 15 statistical attributes of socio-economic variables.</DIV>
<DIV>What I want to accomplish is to visualize these 15 variables in a web map 
service, where the user can select the variable he/she wants to visualize and 
that the color fill represents low to high on the selected variable (white to 
dark grey i.e.).</DIV>
<DIV><BR></DIV>
<DIV>So far I have managed to set up an OpenLayers page that reads the GeoServer 
layer, and outputs the attribute table below the map when I click one of the 
features.</DIV>
<DIV><BR></DIV>
<DIV>However, I am still lost as to how I should proceed to create the 
visualization.</DIV>
<DIV>One example of an end-result could look similar to this: <A 
href="http://sedac.ciesin.columbia.edu/maps/client">http://sedac.ciesin..columbia.edu/maps/client</A></DIV>
<DIV><BR></DIV>
<DIV>So my question is. What styling code am I looking for, and could this type 
of solution be created out of the one layer, or do I need one layer for each 
attribute?</DIV>
<DIV>And if I need to create a rule based class interval, do I have to do this 
manually for each class, for each attribute?</DIV>
<DIV><BR></DIV>
<DIV>Any example code that points to the suggested direction would be 
great!</DIV>
<DIV><BR></DIV>
<DIV>thanks!</DIV>
<DIV><BR></DIV>
<DIV>Best,</DIV>
<DIV>Andreas</DIV>
<DIV><BR></DIV></DIV>
<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
        <tr>
                <td style='border:none;padding:0px 15px 0px 8px'>
                        <a href="http://www.avast.com/">
                                <img border=0 src="http://static.avast.com/emails/avast-mail-stamp.png" />
                        </a>
                </td>
                <td>
                        <p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
                                Diese E-Mail ist frei von Viren und Malware, denn der <a href="http://www.avast.com/">avast! Antivirus</a> Schutz ist aktiv.
                        </p>
                </td>
        </tr>
</table>
<br />
</BODY></HTML>