Passing the temporary rendering intent to the temporary sketch layer. Related Point.js changes in r8831. r=elemoine (closes #1634)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@8890 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-02-25 14:38:26 +00:00
parent 31dd2e65bd
commit 3eddc6cc44

View File

@@ -78,6 +78,14 @@ OpenLayers.Control.DrawFeature = OpenLayers.Class(OpenLayers.Control, {
this.callbacks
);
this.layer = layer;
var sketchStyle = this.layer.styleMap && this.layer.styleMap.styles.temporary;
if(sketchStyle) {
this.handlerOptions = this.handlerOptions || {};
this.handlerOptions.layerOptions = OpenLayers.Util.applyDefaults(
this.handlerOptions.layerOptions,
{styleMap: new OpenLayers.StyleMap({"default": sketchStyle})}
);
}
this.handler = new handler(this, this.callbacks, this.handlerOptions);
},