diff --git a/examples/symbol-atlas-webgl.js b/examples/symbol-atlas-webgl.js index 8042dedf42..63dd568bb3 100644 --- a/examples/symbol-atlas-webgl.js +++ b/examples/symbol-atlas-webgl.js @@ -15,7 +15,8 @@ var atlasManager = new ol.style.AtlasManager({ // we increase the default size so that all symbols fit into // a single atlas image size: 512, - maxSize: ol.has.WEBGL_MAX_TEXTURE_SIZE}); + maxSize: ol.has.WEBGL_MAX_TEXTURE_SIZE +}); var symbolInfo = [{ opacity: 1.0, diff --git a/src/ol/has.js b/src/ol/has.js index ed05a84f85..720977cef4 100644 --- a/src/ol/has.js +++ b/src/ol/has.js @@ -124,9 +124,10 @@ ol.has.WEBGL; /** * The maximum supported WebGL texture size in pixels. If WebGL is not - * supported, the value is set to `-1`. + * supported, the value is set to `undefined`. * @const - * @type {number} + * @type {number|undefined} + * @api */ ol.has.WEBGL_MAX_TEXTURE_SIZE; @@ -142,8 +143,9 @@ ol.has.WEBGL_EXTENSIONS; (function() { if (ol.ENABLE_WEBGL) { var hasWebGL = false; - var textureSize = -1; + var textureSize; var /** @type {Array.} */ extensions = []; + if ('WebGLRenderingContext' in goog.global) { try { var canvas = /** @type {HTMLCanvasElement} */