diff --git a/externs/olx.js b/externs/olx.js index 4a0cdeec82..aa31c2c854 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -1160,7 +1160,8 @@ olx.control.MousePositionOptions.prototype.undefinedHTML; * layers: (Array.|ol.Collection|undefined), * render: (function(ol.MapEvent)|undefined), * target: (Element|undefined), - * tipLabel: (string|undefined)}} + * tipLabel: (string|undefined), + * view: (ol.View|undefined)}} * @api */ olx.control.OverviewMapOptions; @@ -1236,6 +1237,15 @@ olx.control.OverviewMapOptions.prototype.target; olx.control.OverviewMapOptions.prototype.tipLabel; +/** + * Custom view for the overview map. If not provided, a default view with + * an EPSG:3857 projection will be used. + * @type {ol.View|undefined} + * @api + */ +olx.control.OverviewMapOptions.prototype.view; + + /** * @typedef {{className: (string|undefined), * minWidth: (number|undefined), diff --git a/src/ol/control/overviewmapcontrol.js b/src/ol/control/overviewmapcontrol.js index a625142ba0..4562d27b6a 100644 --- a/src/ol/control/overviewmapcontrol.js +++ b/src/ol/control/overviewmapcontrol.js @@ -97,7 +97,8 @@ ol.control.OverviewMap = function(opt_options) { this.ovmap_ = new ol.Map({ controls: new ol.Collection(), interactions: new ol.Collection(), - target: ovmapDiv + target: ovmapDiv, + view: options.view }); var ovmap = this.ovmap_;