From a1229cdef7d62429acaa5b64b29ce1487d123435 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Wed, 28 Dec 2016 12:03:24 -0700 Subject: [PATCH] Remove unnecessary build flags --- changelog/upgrade-notes.md | 4 ++++ doc/tutorials/custom-builds.md | 3 --- src/ol/index.js | 32 -------------------------------- 3 files changed, 4 insertions(+), 35 deletions(-) diff --git a/changelog/upgrade-notes.md b/changelog/upgrade-notes.md index 7c9cb254c3..13e3a0ec63 100644 --- a/changelog/upgrade-notes.md +++ b/changelog/upgrade-notes.md @@ -2,6 +2,10 @@ ### Next release +#### Removed build flags (`@define`) + +The `ol.ENABLE_TILE`, `ol.ENABLE_IMAGE`, `ol.ENABLE_VECTOR`, and `ol.ENABLE_VECTOR_TILE` build flags are no longer necessary and have been removed. If you were using these in a `define` array for a custom build, you can remove them. + #### Simplified `ol.View#fit()` API In most cases, it is no longer necessary to provide an `ol.Size` (previously the 2nd argument) to `ol.View#fit()`. By default, the size of the first map that uses the view will be used. If you want to specify a different size, it goes in the options now (previously the 3rd argument, now the 2nd). diff --git a/doc/tutorials/custom-builds.md b/doc/tutorials/custom-builds.md index 8eeb13bbea..28efbe907f 100644 --- a/doc/tutorials/custom-builds.md +++ b/doc/tutorials/custom-builds.md @@ -158,8 +158,6 @@ You might have noticed that the build file you've just created is considerably s ``` "ol.ENABLE_WEBGL=false", "ol.ENABLE_PROJ4JS=false", - "ol.ENABLE_IMAGE=false", - "ol.ENABLE_VECTOR=false", ``` and re-run the build script. The build size should now be smaller. @@ -208,7 +206,6 @@ Now let's try a more complicated example: [`heatmaps-earthquakes`](https://openl "define": [ "ol.ENABLE_WEBGL=false", "ol.ENABLE_PROJ4JS=false", - "ol.ENABLE_IMAGE=false", "ol.DEBUG=false" ], "compilation_level": "ADVANCED", diff --git a/src/ol/index.js b/src/ol/index.js index 096adc4c0b..13250243e4 100644 --- a/src/ol/index.js +++ b/src/ol/index.js @@ -67,14 +67,6 @@ ol.DRAG_BOX_HYSTERESIS_PIXELS = 8; ol.ENABLE_CANVAS = true; -/** - * @define {boolean} Enable rendering of ol.layer.Image based layers. Default - * is `true`. Setting this to false at compile time in advanced mode removes - * all code supporting Image layers from the build. - */ -ol.ENABLE_IMAGE = true; - - /** * @define {boolean} Enable integration with the Proj4js library. Default is * `true`. @@ -89,30 +81,6 @@ ol.ENABLE_PROJ4JS = true; ol.ENABLE_RASTER_REPROJECTION = true; -/** - * @define {boolean} Enable rendering of ol.layer.Tile based layers. Default is - * `true`. Setting this to false at compile time in advanced mode removes - * all code supporting Tile layers from the build. - */ -ol.ENABLE_TILE = true; - - -/** - * @define {boolean} Enable rendering of ol.layer.Vector based layers. Default - * is `true`. Setting this to false at compile time in advanced mode removes - * all code supporting Vector layers from the build. - */ -ol.ENABLE_VECTOR = true; - - -/** - * @define {boolean} Enable rendering of ol.layer.VectorTile based layers. - * Default is `true`. Setting this to false at compile time in advanced mode - * removes all code supporting VectorTile layers from the build. - */ -ol.ENABLE_VECTOR_TILE = true; - - /** * @define {boolean} Enable the WebGL renderer. Default is `true`. Setting * this to false at compile time in advanced mode removes all code