Add ol.INITIAL_ATLAS_SIZE and ol.MAX_ATLAS_SIZE
This commit is contained in:
+7
-4
@@ -6263,7 +6263,8 @@ olx.style.AtlasManagerOptions;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The size in pixels of the first atlas image (default: 256).
|
* The size in pixels of the first atlas image. If no value is given the
|
||||||
|
* `ol.INITIAL_ATLAS_SIZE` compile-time constant will be used.
|
||||||
* @type {number|undefined}
|
* @type {number|undefined}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
@@ -6271,9 +6272,11 @@ olx.style.AtlasManagerOptions.prototype.initialSize;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum size in pixels of atlas images. If no value is given,
|
* The maximum size in pixels of atlas images. If no value is given then
|
||||||
* `ol.WEBGL_MAX_TEXTURE_SIZE` will be used (if WebGL is supported), otherwise
|
* the `ol.MAX_ATLAS_SIZE` compile-time constant will be used. And if
|
||||||
* the default is 2048.
|
* `ol.MAX_ATLAS_SIZE` is set to `-1` (the default) then
|
||||||
|
* `ol.WEBGL_MAX_TEXTURE_SIZE` will used if WebGL is supported. Otherwise
|
||||||
|
* 2048 is used.
|
||||||
* @type {number|undefined}
|
* @type {number|undefined}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -152,6 +152,13 @@ ol.ENABLE_WEBGL = true;
|
|||||||
ol.LEGACY_IE_SUPPORT = false;
|
ol.LEGACY_IE_SUPPORT = false;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @define {number} The size in pixels of the first atlas image. Default is
|
||||||
|
* `256`.
|
||||||
|
*/
|
||||||
|
ol.INITIAL_ATLAS_SIZE = 256;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The page is loaded using HTTPS.
|
* The page is loaded using HTTPS.
|
||||||
* @const
|
* @const
|
||||||
@@ -175,6 +182,14 @@ ol.IS_LEGACY_IE = goog.userAgent.IE &&
|
|||||||
ol.KEYBOARD_PAN_DURATION = 100;
|
ol.KEYBOARD_PAN_DURATION = 100;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @define {number} The maximum size in pixels of atlas images. Default is
|
||||||
|
* `-1`, meaning it is not used (and `ol.ol.WEBGL_MAX_TEXTURE_SIZE` is
|
||||||
|
* used instead).
|
||||||
|
*/
|
||||||
|
ol.MAX_ATLAS_SIZE = -1;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @define {number} Maximum mouse wheel delta.
|
* @define {number} Maximum mouse wheel delta.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ goog.require('goog.asserts');
|
|||||||
goog.require('goog.dom');
|
goog.require('goog.dom');
|
||||||
goog.require('goog.dom.TagName');
|
goog.require('goog.dom.TagName');
|
||||||
goog.require('goog.object');
|
goog.require('goog.object');
|
||||||
|
goog.require('ol');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,15 +49,17 @@ ol.style.AtlasManager = function(opt_options) {
|
|||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
this.currentSize_ = goog.isDef(options.initialSize) ?
|
this.currentSize_ = goog.isDef(options.initialSize) ?
|
||||||
options.initialSize : 256;
|
options.initialSize : ol.INITIAL_ATLAS_SIZE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum size in pixels of atlas images.
|
* The maximum size in pixels of atlas images.
|
||||||
* @private
|
* @private
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
this.maxSize_ = goog.isDef(options.maxSize) ? options.maxSize :
|
this.maxSize_ = goog.isDef(options.maxSize) ?
|
||||||
goog.isDef(ol.WEBGL_MAX_TEXTURE_SIZE) ? ol.WEBGL_MAX_TEXTURE_SIZE : 2048;
|
options.maxSize : ol.MAX_ATLAS_SIZE != -1 ?
|
||||||
|
ol.MAX_ATLAS_SIZE : goog.isDef(ol.WEBGL_MAX_TEXTURE_SIZE) ?
|
||||||
|
ol.WEBGL_MAX_TEXTURE_SIZE : 2048;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The size in pixels between images.
|
* The size in pixels between images.
|
||||||
|
|||||||
Reference in New Issue
Block a user