diff --git a/examples/select-features.js b/examples/select-features.js index b4a4dcfdd7..e4997e706c 100644 --- a/examples/select-features.js +++ b/examples/select-features.js @@ -18,7 +18,7 @@ var vector = new ol.layer.Vector({ }) }); -var select = new ol.interaction.Select({}); +var select = new ol.interaction.Select(); var map = new ol.Map({ interactions: ol.interaction.defaults().extend([select]), diff --git a/src/ol/interaction/selectinteraction.js b/src/ol/interaction/selectinteraction.js index beca54baba..827d98444c 100644 --- a/src/ol/interaction/selectinteraction.js +++ b/src/ol/interaction/selectinteraction.js @@ -14,13 +14,15 @@ goog.require('ol.interaction.Interaction'); /** * @constructor * @extends {ol.interaction.Interaction} - * @param {olx.interaction.SelectOptions} options Options. + * @param {olx.interaction.SelectOptions=} opt_options Options. * @todo stability experimental */ -ol.interaction.Select = function(options) { +ol.interaction.Select = function(opt_options) { goog.base(this); + var options = goog.isDef(opt_options) ? opt_options : {}; + /** * @private * @type {ol.events.ConditionType}