I drew a line between two points and would like to change the line styles but currently is not working as expected. Tried to add the style into the features. Am i missing something?
var points = [
new OpenLayers.Geometry.Point( lng, lat ).transform(epsg4326, projectTo),
new OpenLayers.Geometry.Point( qlng, qlat ).transform(epsg4326, projectTo)
];
var styles = {
strokeColor: '#000000',
strokeOpacity: 2,
strokeWidth: 10
};
feature = new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.LineString(points, null, styles)
);
vectorLayer.addFeatures(feature);