Make ol.control.OverviewMap's view configurable
This is useful for creating an OverviewMap in a different projection than EPSG:3857.
This commit is contained in:
+14
-4
@@ -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),
|
||||||
@@ -4241,7 +4251,7 @@ olx.source.ImageMapGuideOptions.prototype.projection;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Ratio. `1` means image requests are the size of the map viewport, `2` means
|
* Ratio. `1` means image requests are the size of the map viewport, `2` means
|
||||||
* twice the width and height of the map viewport, and so on. Must be `1` or
|
* twice the width and height of the map viewport, and so on. Must be `1` or
|
||||||
* higher. Default is `1`.
|
* higher. Default is `1`.
|
||||||
* @type {number|undefined}
|
* @type {number|undefined}
|
||||||
* @api stable
|
* @api stable
|
||||||
@@ -4524,7 +4534,7 @@ olx.source.ImageVectorOptions.prototype.projection;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Ratio. 1 means canvases are the size of the map viewport, 2 means twice the
|
* Ratio. 1 means canvases are the size of the map viewport, 2 means twice the
|
||||||
* width and height of the map viewport, and so on. Must be `1` or higher.
|
* width and height of the map viewport, and so on. Must be `1` or higher.
|
||||||
* Default is `1.5`.
|
* Default is `1.5`.
|
||||||
* @type {number|undefined}
|
* @type {number|undefined}
|
||||||
* @api
|
* @api
|
||||||
@@ -4708,7 +4718,7 @@ olx.source.ImageWMSOptions.prototype.projection;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Ratio. `1` means image requests are the size of the map viewport, `2` means
|
* Ratio. `1` means image requests are the size of the map viewport, `2` means
|
||||||
* twice the width and height of the map viewport, and so on. Must be `1` or
|
* twice the width and height of the map viewport, and so on. Must be `1` or
|
||||||
* higher. Default is `1.5`.
|
* higher. Default is `1.5`.
|
||||||
* @type {number|undefined}
|
* @type {number|undefined}
|
||||||
* @api stable
|
* @api stable
|
||||||
|
|||||||
@@ -99,7 +99,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