Merge pull request #4116 from ahocevar/overviewmap-view
Make ol.control.OverviewMap's view configurable
This commit is contained in:
@@ -1160,7 +1160,8 @@ olx.control.MousePositionOptions.prototype.undefinedHTML;
|
|||||||
* layers: (Array.<ol.layer.Layer>|ol.Collection|undefined),
|
* layers: (Array.<ol.layer.Layer>|ol.Collection|undefined),
|
||||||
* render: (function(ol.MapEvent)|undefined),
|
* render: (function(ol.MapEvent)|undefined),
|
||||||
* target: (Element|undefined),
|
* target: (Element|undefined),
|
||||||
* tipLabel: (string|undefined)}}
|
* tipLabel: (string|undefined),
|
||||||
|
* view: (ol.View|undefined)}}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
olx.control.OverviewMapOptions;
|
olx.control.OverviewMapOptions;
|
||||||
@@ -1236,6 +1237,15 @@ olx.control.OverviewMapOptions.prototype.target;
|
|||||||
olx.control.OverviewMapOptions.prototype.tipLabel;
|
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),
|
* @typedef {{className: (string|undefined),
|
||||||
* minWidth: (number|undefined),
|
* minWidth: (number|undefined),
|
||||||
|
|||||||
@@ -97,7 +97,8 @@ ol.control.OverviewMap = function(opt_options) {
|
|||||||
this.ovmap_ = new ol.Map({
|
this.ovmap_ = new ol.Map({
|
||||||
controls: new ol.Collection(),
|
controls: new ol.Collection(),
|
||||||
interactions: new ol.Collection(),
|
interactions: new ol.Collection(),
|
||||||
target: ovmapDiv
|
target: ovmapDiv,
|
||||||
|
view: options.view
|
||||||
});
|
});
|
||||||
var ovmap = this.ovmap_;
|
var ovmap = this.ovmap_;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user