diff --git a/src/ol/Map.js b/src/ol/Map.js index 5987b2f158..128a273429 100644 --- a/src/ol/Map.js +++ b/src/ol/Map.js @@ -1,7 +1,7 @@ /** * @module ol/Map */ -import {ENABLE_CANVAS, ENABLE_WEBGL, inherits} from './index.js'; +import {ENABLE_WEBGL, inherits} from './index.js'; import _ol_PluggableMap_ from './PluggableMap.js'; import _ol_PluginType_ from './PluginType.js'; import _ol_control_ from './control.js'; @@ -19,15 +19,13 @@ import _ol_renderer_webgl_TileLayer_ from './renderer/webgl/TileLayer.js'; import _ol_renderer_webgl_VectorLayer_ from './renderer/webgl/VectorLayer.js'; -if (ENABLE_CANVAS) { - _ol_plugins_.register(_ol_PluginType_.MAP_RENDERER, _ol_renderer_canvas_Map_); - _ol_plugins_.registerMultiple(_ol_PluginType_.LAYER_RENDERER, [ - _ol_renderer_canvas_ImageLayer_, - _ol_renderer_canvas_TileLayer_, - _ol_renderer_canvas_VectorLayer_, - _ol_renderer_canvas_VectorTileLayer_ - ]); -} +_ol_plugins_.register(_ol_PluginType_.MAP_RENDERER, _ol_renderer_canvas_Map_); +_ol_plugins_.registerMultiple(_ol_PluginType_.LAYER_RENDERER, [ + _ol_renderer_canvas_ImageLayer_, + _ol_renderer_canvas_TileLayer_, + _ol_renderer_canvas_VectorLayer_, + _ol_renderer_canvas_VectorTileLayer_ +]); if (ENABLE_WEBGL) { _ol_plugins_.register(_ol_PluginType_.MAP_RENDERER, _ol_renderer_webgl_Map_); diff --git a/src/ol/has.js b/src/ol/has.js index c529f1abf4..182eaea2ea 100644 --- a/src/ol/has.js +++ b/src/ol/has.js @@ -1,7 +1,7 @@ /** * @module ol/has */ -import {ENABLE_CANVAS, HAS_WEBGL} from './index.js'; +import {HAS_WEBGL} from './index.js'; var _ol_has_ = {}; @@ -51,13 +51,12 @@ _ol_has_.CANVAS_LINE_DASH = false; /** - * True if both the library and browser support Canvas. Always `false` - * if `ol.ENABLE_CANVAS` is set to `false` at compile time. + * True if the and browsers support Canvas. * @const * @type {boolean} * @api */ -_ol_has_.CANVAS = ENABLE_CANVAS && ( +_ol_has_.CANVAS = ( /** * @return {boolean} Canvas supported. */ diff --git a/src/ol/index.js b/src/ol/index.js index 8bc8c7e1e5..e5203d9a0a 100644 --- a/src/ol/index.js +++ b/src/ol/index.js @@ -11,14 +11,6 @@ import webgl from './webgl.js'; export var DEFAULT_WMS_VERSION = '1.3.0'; -/** - * @type {boolean} Enable the Canvas renderer. Default is `true`. Setting - * this to false at compile time in advanced mode removes all code - * supporting the Canvas renderer from the build. - */ -export var ENABLE_CANVAS = true; - - /** * @type {boolean} Enable integration with the Proj4js library. Default is * `true`. @@ -160,7 +152,6 @@ export default { inherits: inherits, VERSION: VERSION, DEFAULT_WMS_VERSION: DEFAULT_WMS_VERSION, - ENABLE_CANVAS: ENABLE_CANVAS, ENABLE_PROJ4JS: ENABLE_PROJ4JS, ENABLE_RASTER_REPROJECTION: ENABLE_RASTER_REPROJECTION, ENABLE_WEBGL: ENABLE_WEBGL,