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:
@@ -1160,7 +1160,8 @@ olx.control.MousePositionOptions.prototype.undefinedHTML;
|
||||
* layers: (Array.<ol.layer.Layer>|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),
|
||||
@@ -4241,7 +4251,7 @@ olx.source.ImageMapGuideOptions.prototype.projection;
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
* @type {number|undefined}
|
||||
* @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
|
||||
* 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`.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
@@ -4708,7 +4718,7 @@ olx.source.ImageWMSOptions.prototype.projection;
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
* @type {number|undefined}
|
||||
* @api stable
|
||||
|
||||
@@ -99,7 +99,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_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user