Use WEBGL_MAX_TEXTURE_SIZE as default
This commit is contained in:
@@ -14,8 +14,7 @@ goog.require('ol.style.Style');
|
|||||||
var atlasManager = new ol.style.AtlasManager({
|
var atlasManager = new ol.style.AtlasManager({
|
||||||
// we increase the default size so that all symbols fit into
|
// we increase the default size so that all symbols fit into
|
||||||
// a single atlas image
|
// a single atlas image
|
||||||
size: 512,
|
size: 512
|
||||||
maxSize: ol.WEBGL_MAX_TEXTURE_SIZE
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var symbolInfo = [{
|
var symbolInfo = [{
|
||||||
|
|||||||
+3
-1
@@ -6271,7 +6271,9 @@ olx.style.AtlasManagerOptions.prototype.size;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum size in pixels of atlas images (default: 2048).
|
* The maximum size in pixels of atlas images. If no value is given,
|
||||||
|
* `ol.WEBGL_MAX_TEXTURE_SIZE` will be used (if WebGL is supported), otherwise
|
||||||
|
* the default is 2048.
|
||||||
* @type {number|undefined}
|
* @type {number|undefined}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -30,10 +30,8 @@ ol.style.AtlasManagerInfo;
|
|||||||
* atlas. After that, when new atlases are created, they will have
|
* atlas. After that, when new atlases are created, they will have
|
||||||
* twice the size as the latest atlas (until `maxSize` is reached).
|
* twice the size as the latest atlas (until `maxSize` is reached).
|
||||||
*
|
*
|
||||||
* When used for WebGL, it is recommended to use `ol.has.WEBGL_MAX_TEXTURE_SIZE`
|
* If an application uses a lot, or a lot of large images, it is recommend to
|
||||||
* as `maxSize` value. Also, if an application uses a lot, or a lot of
|
* set a higher `size` value to avoid the creation of too many atlases.
|
||||||
* large images, it is recommend to set a higher `size` value to avoid
|
|
||||||
* the creation of too many atlases.
|
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @struct
|
* @struct
|
||||||
@@ -56,7 +54,8 @@ ol.style.AtlasManager = function(opt_options) {
|
|||||||
* @private
|
* @private
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
this.maxSize_ = goog.isDef(options.maxSize) ? options.maxSize : 2048;
|
this.maxSize_ = goog.isDef(options.maxSize) ? options.maxSize :
|
||||||
|
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