Use ol.dom.createCanvasContext2D in ol.style.AtlasManager
This commit is contained in:
@@ -3,6 +3,7 @@ goog.provide('ol.style.AtlasManager');
|
|||||||
|
|
||||||
goog.require('goog.asserts');
|
goog.require('goog.asserts');
|
||||||
goog.require('ol');
|
goog.require('ol');
|
||||||
|
goog.require('ol.dom');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides information for an image inside an atlas manager.
|
* Provides information for an image inside an atlas manager.
|
||||||
@@ -286,19 +287,15 @@ ol.style.Atlas = function(size, space) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {HTMLCanvasElement}
|
* @type {CanvasRenderingContext2D}
|
||||||
*/
|
*/
|
||||||
this.canvas_ = /** @type {HTMLCanvasElement} */
|
this.context_ = ol.dom.createCanvasContext2D(size, size);
|
||||||
(document.createElement('CANVAS'));
|
|
||||||
this.canvas_.width = size;
|
|
||||||
this.canvas_.height = size;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {CanvasRenderingContext2D}
|
* @type {HTMLCanvasElement}
|
||||||
*/
|
*/
|
||||||
this.context_ = /** @type {CanvasRenderingContext2D} */
|
this.canvas_ = this.context_.canvas;
|
||||||
(this.canvas_.getContext('2d'));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user