From 3eddc6cc44b1e8ce10802c36bc300fb0bc468d7c Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Wed, 25 Feb 2009 14:38:26 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Control/DrawFeature.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/OpenLayers/Control/DrawFeature.js b/lib/OpenLayers/Control/DrawFeature.js index e8e328bda6..20c3b2bae5 100644 --- a/lib/OpenLayers/Control/DrawFeature.js +++ b/lib/OpenLayers/Control/DrawFeature.js @@ -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); },