[OpenLayers-Dev] Fwd: [OpenLayers-Trac] Is it possible to set rules with value extracted wfs data?

Erik Uzureau euzuro at gmail.com
Thu Sep 25 16:45:46 EDT 2008


---------- Forwarded message ----------
From:  <BenjaminWJudd at eaton.com>
Date: Thu, Sep 25, 2008 at 2:09 PM
Subject: [OpenLayers-Trac] Is it possible to set rules with value
extracted wfs data?
To: trac at openlayers.org


Hi,

I am new the list (and to openLayers) and have a question I can't find
an answer to in the posts.

I am set up rules to adjust the point Radius based on a value
extracted, but it would be easier to just use the value directly.  Is
this possible?

Current Code:
var distSize = new Array(); distSize = { 0: {pointRadius: 1}, 1:
{pointRadius: 1}, 2: {pointRadius: 2}, 3: {pointRadius: 3}, 4:
{pointRadius: 4}, 5: {pointRadius: 5} }

var distStyles = new OpenLayers.StyleMap();
distStyles.addUniqueValueRules("default","size",distSize);

I would prefer something like
distStyles.addUniqueValueRules("default",pointRadius = "Size Supplied
from WFS");

It is somewhat trivial to set up an array for pointRadius, but I would
like to be able to set the colors the same way.

Thanks!

Ben

_______________________________________________
Trac mailing list
Trac at openlayers.org
http://openlayers.org/mailman/listinfo/trac



More information about the Dev mailing list