[OpenLayers-Users] Style of line which geometry is being changed
Max Weidemann
max.weidemann at freenet.de
Thu Jan 28 09:53:11 EST 2010
Hello Poul,
the styleinformation of this virtual points (vertices) is set in the
initialize function of the ModifyFeatureControl.
If you want to change the style i think you have to do it there.
/**
* Constructor: OpenLayers.Control.ModifyFeature
* Create a new modify feature control.
*
* Parameters:
* layer - {<OpenLayers.Layer.Vector>} Layer that contains features that
* will be modified.
* options - {Object} Optional object whose properties will be set on
the
* control.
*/
initialize: function(layer, options) {
this.layer = layer;
this.vertices = [];
this.virtualVertices = [];
this.virtualStyle = OpenLayers.Util.extend({},
this.layer.style || this.layer.styleMap.createSymbolizer());
this.virtualStyle.fillOpacity =
0.3;<------------------------------change this to 1
this.virtualStyle.strokeOpacity =
0.3;<------------------------------change this to 1
this.deleteCodes = [46, 68];
this.mode = OpenLayers.Control.ModifyFeature.RESHAPE;
OpenLayers.Control.prototype.initialize.apply(this, [options]);
if(!(this.deleteCodes instanceof Array)) {
this.deleteCodes = [this.deleteCodes];
}
I hope this will help you.
cheers,
Max
--
View this message in context: http://n2.nabble.com/Style-of-line-which-geometry-is-being-changed-tp4469289p4473704.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list