Hi all,
I'm creatin a vector layer like this :
var mytyle = {
                strokeColor: "#00FF00",
                strokeOpacity: 1,
                strokeWidth: 4
};
routeLayer = new OpenLayers.Layer.Vector( "Route" );
routeLayer.style=itinStyle;
map.addLayer(routeLayer);

This works fine.
But , I want to give the user the abaility to change the routes color
dynamically by calling this function :
function changeRouteColor(color){
   var style = routeLayer.styleMap.styles["default"].defaultStyle;
   style.strokeColor=color;
   routeLayer.redraw();
}

.. but this does not work :(
Please help
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-to-later-modify-vector-layer-style-tp5562904p5562904.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to