[OpenLayers-Users] Help with changing the color of drawn
features ?
Piero Campa
piero.campa at gmail.com
Fri Jul 23 03:48:03 EDT 2010
Hi Koveras, have you tried:
var myFeatures = new OpenLayers.Layer.Vector("myVectors", {
styleMap: myStyleMap,
strategies: [myStrategy],
protocol: etc.....
}
Then:
var myStyleMap = new OpenLayers.StyleMap({
new OpenLayers.Style({
fillColor: '${color}',
strokeColor: '${color}',
[...]
}, {
context: {
color: function(feature) {
// Here define your JS function that picks the color from the HMTL
element?
[...]
return selectedColor;
}
}
});
Could this be?
Piero
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Help-with-changing-the-color-of-drawn-features-tp5328663p5328678.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list