[OpenLayers-Users] Class based fill of polygons

Andreas Forø Tollefsen andreasft at gmail.com
Tue Aug 5 05:50:40 PDT 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140805/5ae6e1f1/attachment.html>


More information about the Users mailing list