Add styleFunction option to ol.interaction.DragAndDrop
This commit is contained in:
@@ -52,6 +52,12 @@ ol.interaction.DragAndDrop = function(opt_options) {
|
||||
*/
|
||||
this.layer_ = goog.isDef(options.layer) ? options.layer : null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.feature.StyleFunction|undefined}
|
||||
*/
|
||||
this.styleFunction_ = options.styleFunction;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {goog.events.FileDropHandler}
|
||||
@@ -149,6 +155,7 @@ ol.interaction.DragAndDrop.prototype.handleResult_ = function(result) {
|
||||
}
|
||||
if (goog.isNull(this.layer_)) {
|
||||
map.getLayers().push(new ol.layer.Vector({
|
||||
styleFunction: this.styleFunction_,
|
||||
source: source
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user