[OpenLayers-Users] Class based fill of polygons

Arnd Wippermann arnd.wippermann at web.de
Tue Aug 5 11:22:00 PDT 2014


you could use SLD for WMS to accomplish this task.
 
most likely you have to create a sld file for every attribute you wish to
visualize.
 
An example, that shows different styling for the same layer based on
different rules (not always by attribute)
http://gis.ibbeck.de/ginfo/apps/OLExamples/OL210/MapServer_SLD_World/MapServ
er_SLD_World.asp
 
Regards,
Arnd

  _____  

Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Andreas
Forø Tollefsen
Gesendet: Dienstag, 5. August 2014 14:51
An: openlayers-users at lists.osgeo.org
Betreff: [OpenLayers-Users] Class based fill of polygons


Hi all, 

I am new to OpenLayers (so forgive me in advance). 

I have a polygon layer in GeoServer (from a shapefile) consisting of 487
features and 15 statistical attributes of socio-economic variables.
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.).

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.

However, I am still lost as to how I should proceed to create the
visualization.
One example of an end-result could look similar to this:
http://sedac.ciesin.columbia.edu/maps/client

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?
And if I need to create a rule based class interval, do I have to do this
manually for each class, for each attribute?

Any example code that points to the suggested direction would be great!

thanks!

Best,
Andreas



---
Diese E-Mail ist frei von Viren und Malware, denn der avast! Antivirus Schutz ist aktiv.
http://www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140805/0e61fff6/attachment.html>


More information about the Users mailing list