Hi list,

I have a few vector layers over two basemaps, I am trying to redraw
the vector layers with a different style color for each basemap . I
have tried to assign of global variable to the stroke color, the
varaible changes with layer switching. the effect only takes place at
the features that are drawn afterwards and not the previously drawn
shapes. redraw and refresh functions also havent helped much, has
anybody worked on this before?


lineFeature = new OpenLayers.Feature.Vector(geomobj,null, // geom,data,style
{
strokeColor: strokeclr,  // global variable
fillColor: "#00688B",
strokeWidth: 2,
strokeOpacity : 0.8,
pointRadius: 6,                         
graphicName :"triangle",
rotation :angle
});                     

vecLayer.addFeatures([lineFeature]);


function changeStokeColor(color)
{
strokeclr=color;
vecLayer.redraw();
}


regards,
Imran

-- 
I.R
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to