Hi all,
I'm creating a vector layer like this :
var myStyle = {
strokeColor: "#00FF00",
strokeOpacity: 1,
strokeWidth: 4
};
routeLayer = new OpenLayers.Layer.Vector( "Route" );
routeLayer.style=myStyle;
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-tp5562913p5562913.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