From 54ee631fc6077148ccf78c0e2ce5c696ed890064 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 4 Dec 2017 17:23:28 +0100 Subject: [PATCH] Updated OpenLayers v5.x (markdown) --- OpenLayers-v5.x.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/OpenLayers-v5.x.md b/OpenLayers-v5.x.md index 0de1a40..feeafa9 100644 --- a/OpenLayers-v5.x.md +++ b/OpenLayers-v5.x.md @@ -1,8 +1,8 @@ -OpenLayers v5.x will be a set of ES2015 modules, similar to the v4.x [ol](https://npmjs.com/package/ol) package. The difference is that from v5.0.0 on, the sources will be authored and maintained as ES2015 modules. OpenLayers will no longer depend on and be compatible with [closure-util](https://npmjs.com/package/closure-util). +OpenLayers v5.x will be a set of ES modules, similar to the v4.x [ol package](https://npmjs.com/package/ol). The difference is that from v5.0.0 on, the sources will be authored and maintained as ES modules. OpenLayers will no longer depend on and be compatible with [closure-util](https://npmjs.com/package/closure-util). ## Upgrade notes -### Users of the v4.x [ol](https://npmjs.com/package/ol) package +### Users of the v4.x [ol package](https://npmjs.com/package/ol) Class modules will have CamelCase names, instead of the current lowercase names. This means that imports like @@ -18,11 +18,11 @@ In addition to that, we will be adding named exports for modules like `ol/extent ### Users of a full build (`ol.js` or `ol-debug.js`). -The full build will still be provided, but we encourage everyone to switch to the [ol](https://npmjs.com/package/ol) package. +The full build will still be provided, but we encourage everyone to switch to the [ol package](https://npmjs.com/package/ol). ### Users of [closure-util](https://npmjs.com/package/closure-util) -If you build your application together with OpenLayers using [closure-util](https://npmjs.com/package/closure-util), we recommend to upgrade your application to use ES2015 modules instead of `goog.require` and `goog.provide`. +If you build your application together with OpenLayers using [closure-util](https://npmjs.com/package/closure-util), we recommend to upgrade your application to use ES modules instead of `goog.require` and `goog.provide`. Existing code like ```js @@ -41,15 +41,15 @@ export function createMap() { return new Map({}); } ``` -Note that ES2015, other than `goog.provide` and `goog.require`, do not assume and use global namespacing. +Note that ES modules, other than `goog.provide` and `goog.require`, do not assume and use global namespacing. -For the build environment, you can use anything that works with ES2015 modules. Some examples (including some that use the Closure Compiler) are linked from the [ol](https://npmjs.com/package/ol) package README. +For the build environment, you can use anything that works with ES modules. Some examples (including some that use the Closure Compiler) are linked from the [ol package](https://npmjs.com/package/ol) README. As an interim solution, when working with webpack, the [closure-loader](https://www.npmjs.com/package/closure-loader) may help to make OpenLayers 5.x work with existing [closure-util](https://npmjs.com/package/closure-util) based applications. ### Users of custom builds -We recommend switching to a webpack based setup and import only what's needed from the [ol](https://npmjs.com/package/ol) package. See the [ol](https://npmjs.com/package/ol) package README for examples of how to setup and use OpenLayers like that for your application. +We recommend switching to a webpack based setup and import only what's needed from the [ol package](https://npmjs.com/package/ol). See the [ol package](https://npmjs.com/package/ol) README for examples of how to setup and use OpenLayers like that for your application. As an interim solution, you can use the full build (`ol.js` or `ol-debug.js`) instead.