Remove unnecessary build flags
This commit is contained in:
@@ -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).
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user