Passing renderer options to the sketch layer.

The draw feature control should pass preferred render and other renderer options to the sketch handler.
This commit is contained in:
tschaub
2011-09-29 17:26:23 -06:00
parent cca0bf5e38
commit c743d3e8a5
2 changed files with 32 additions and 0 deletions

View File

@@ -83,6 +83,11 @@ OpenLayers.Control.DrawFeature = OpenLayers.Class(OpenLayers.Control, {
);
this.layer = layer;
this.handlerOptions = this.handlerOptions || {};
this.handlerOptions.layerOptions = OpenLayers.Util.applyDefaults(
this.handlerOptions.layerOptions, {
renderers: layer.renderers, rendererOptions: layer.rendererOptions
}
);
if (!("multi" in this.handlerOptions)) {
this.handlerOptions.multi = this.multi;
}