[OpenLayers-Users] stylemap conditional on gml attribute.
Eric Lemoine
eric.lemoine at camptocamp.com
Mon Mar 1 01:48:41 EST 2010
On Thursday, February 25, 2010, Nicholas Efremov-Kendall
<n.e.kendall at gmail.com> wrote:
> Hi all,
>
> I'd like to have a dynamic style map, that depending on the value returned in the xml changes the color of a point. I only have 3 values (null, 1, 2) and I'm just not sure how to set up the conditional within the style map. If anyone has done this, or can point me in the right direction, much appreciated.
> best,
Hi. You can look at the style-unique.html example [*] and pay
attention to the usage of addUniqueValueRule.
[*] http://trac.openlayers.org/browser/trunk/openlayers/examples/styles-unique.html
Cheers,
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
More information about the Users
mailing list