From 563b17550f4c77eebcb40706971fa53ce268d03c Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 16 Dec 2021 13:12:57 +0100 Subject: [PATCH] v0.10.0 --- README.md | 5 +++++ package.json | 2 +- src/components/MapMixin.vue | 26 ++++++++++++++------------ 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 3b332f5f9..2a5ca0147 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,11 @@ You can also build the files yourself and deploy them to any web host: * Development: Run the development server by executing `npm start`. * Deployment: Build the project by executing `npm run build`. Afterwards upload the content of the `dist` folder to your server. +### Breaking changes + +* Please note that in v0.9.8 and v0.9.9 the config file structure has changed slightly. + You need to add the new `basemaps` property to your config file. Otherwise, you won't see a basemap any more. + ### Query Parameters You can use some query parameters to set initial state to the Editor. diff --git a/package.json b/package.json index 112f8cfac..b0a4dbbf1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openeo/web-editor", - "version": "0.9.9", + "version": "0.10.0", "apiVersions": [ "1.0.0-rc.2", "1.0.0", diff --git a/src/components/MapMixin.vue b/src/components/MapMixin.vue index 9d5d3307d..e310edcd1 100644 --- a/src/components/MapMixin.vue +++ b/src/components/MapMixin.vue @@ -92,18 +92,20 @@ export default { attributionsCollapsible: false }; this.baseLayers = []; - let hasDefault = false; - for(let opts of this.$config.basemaps) { - let basemap = new XYZ(Object.assign({}, basemapOptions, opts)); - let baselayer = new TileLayer({ - source: this.trackTileProgress(basemap), - baseLayer: true, - title: opts.title, - noSwitcherDelete: true, - visible: !hasDefault - }); - this.baseLayers.push(baselayer); - hasDefault = true; + if (Array.isArray(this.$config.basemaps)) { + let hasDefault = false; + for(let opts of this.$config.basemaps) { + let basemap = new XYZ(Object.assign({}, basemapOptions, opts)); + let baselayer = new TileLayer({ + source: this.trackTileProgress(basemap), + baseLayer: true, + title: opts.title, + noSwitcherDelete: true, + visible: !hasDefault + }); + this.baseLayers.push(baselayer); + hasDefault = true; + } } let center = [this.center[1], this.center[0]]; var mapOptions = {