I have created two Openlayers vector layers, named "temp" and "drawings1". Each of the layer have different styles. The problem is when I copy a features from drawings1 to temp, the style of "drawings1" is also copied to the "temp" layer. It seems that the pre-configured style of the temp layer is ignored. Is there anyway to reset the style of a vector layer?
//Define a style for the drawings1 layer and temp layer
var highlight_style = { fillColor:'blue', strokeColor:'#2E2EFE', fillOpacity:0.6 };
var hover_style = { fillColor:'#FF0000', strokeColor:'#FF0000', fillOpacity:0.6 };
//Initialize a vector layer for storing selection Objects
drawings1 = new OpenLayers.Layer.Vector("Selections", {isBaseLayer:false, features:[], visibility:true, style:highlight_style}
);
//Initialize a vector layer for storing selection Objects
temp = new OpenLayers.Layer.Vector("Hover", {isBaseLayer:false, features:[], visibility:true, style:hover_style}
);
map.addLayers([drawings1,temp])
//Copy a feature from drawings1 to temp
tempFeature = drawings1.features[0];
temp.addFeatures(tempFeature);