Call super before accessing this in BingMaps source
This commit is contained in:
@@ -54,11 +54,7 @@ class BingMaps extends TileImage {
|
|||||||
*/
|
*/
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
/**
|
const hidpi = options.hidpi !== undefined ? options.hidpi : false;
|
||||||
* @private
|
|
||||||
* @type {boolean}
|
|
||||||
*/
|
|
||||||
this.hidpi_ = options.hidpi !== undefined ? options.hidpi : false;
|
|
||||||
|
|
||||||
super({
|
super({
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
@@ -68,11 +64,18 @@ class BingMaps extends TileImage {
|
|||||||
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
||||||
state: SourceState.LOADING,
|
state: SourceState.LOADING,
|
||||||
tileLoadFunction: options.tileLoadFunction,
|
tileLoadFunction: options.tileLoadFunction,
|
||||||
tilePixelRatio: this.hidpi_ ? 2 : 1,
|
tilePixelRatio: hidpi ? 2 : 1,
|
||||||
wrapX: options.wrapX !== undefined ? options.wrapX : true,
|
wrapX: options.wrapX !== undefined ? options.wrapX : true,
|
||||||
transition: options.transition
|
transition: options.transition
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
this.hidpi_ = hidpi;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {string}
|
* @type {string}
|
||||||
|
|||||||
Reference in New Issue
Block a user