changeset 123:92e0c636e67c

Upgraded to current Version of OpenLayers As of v5.0.0 OpenLayers has adapted common conventions from the JS ecosystem. As the changes fit our current use case better, an upgrade to v5.0.0 is a good idea. For more details see upstream: https://github.com/openlayers/openlayers/releases/tag/v5.0.0
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 27 Jun 2018 12:59:06 +0200
parents da279a0ce127
children bb9120d28950
files client/package.json client/src/components/Map.jsx client/yarn.lock
diffstat 3 files changed, 19 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/client/package.json	Wed Jun 27 12:24:13 2018 +0200
+++ b/client/package.json	Wed Jun 27 12:59:06 2018 +0200
@@ -13,7 +13,7 @@
     "axios": "^0.18.0",
     "bootstrap": "^4.1.1",
     "font-awesome": "^4.7.0",
-    "ol": "^4.6.5",
+    "ol": "^5.0.0",
     "vue": "^2.5.16",
     "vue-router": "^3.0.1",
     "vuex": "^3.0.1"
--- a/client/src/components/Map.jsx	Wed Jun 27 12:24:13 2018 +0200
+++ b/client/src/components/Map.jsx	Wed Jun 27 12:59:06 2018 +0200
@@ -1,8 +1,8 @@
 /*eslint no-unused-vars: ["error", { "args": "none" }]*/
-import ol_Map from "ol/map";
-import ol_layer_Tile from "ol/layer/tile";
-import ol_source_OSM from "ol/source/osm";
-import ol_View from "ol/view";
+import "ol/ol.css";
+import { Map, View } from "ol";
+import TileLayer from "ol/layer/Tile";
+import OSM from "ol/source/OSM";
 
 export default {
   render(h) {
@@ -18,14 +18,14 @@
   },
   mounted() {
     console.log(this.centerX);
-    new ol_Map({
+    new Map({
       layers: [
-        new ol_layer_Tile({
-          source: new ol_source_OSM()
+        new TileLayer({
+          source: new OSM()
         })
       ],
       target: "map",
-      view: new ol_View({
+      view: new View({
         center: [this.long, this.lat],
         zoom: this.zoom,
         projection: this.projection
--- a/client/yarn.lock	Wed Jun 27 12:24:13 2018 +0200
+++ b/client/yarn.lock	Wed Jun 27 12:59:06 2018 +0200
@@ -5849,13 +5849,13 @@
   version "1.1.2"
   resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e"
 
-ol@^4.6.5:
-  version "4.6.5"
-  resolved "https://registry.yarnpkg.com/ol/-/ol-4.6.5.tgz#3b628ffb65885f277ceb24bb0c6eee0a38727442"
+ol@^5.0.0:
+  version "5.0.0"
+  resolved "https://registry.yarnpkg.com/ol/-/ol-5.0.0.tgz#9cf058dba1d687743c5435ffdc00a07d50ab097d"
   dependencies:
     pbf "3.1.0"
     pixelworks "1.1.0"
-    rbush "2.0.1"
+    rbush "2.0.2"
 
 on-finished@~2.3.0:
   version "2.3.0"
@@ -6642,7 +6642,7 @@
   version "2.0.0"
   resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.0.0.tgz#fa3ed6e68eb15159457c89b37bc6472833195755"
 
-quickselect@^1.0.0:
+quickselect@^1.0.1:
   version "1.1.1"
   resolved "https://registry.yarnpkg.com/quickselect/-/quickselect-1.1.1.tgz#852e412ce418f237ad5b660d70cffac647ae94c2"
 
@@ -6680,11 +6680,11 @@
     iconv-lite "0.4.19"
     unpipe "1.0.0"
 
-rbush@2.0.1:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/rbush/-/rbush-2.0.1.tgz#4cfaca28c3064bc0ee75431a1b79990e875eefa9"
-  dependencies:
-    quickselect "^1.0.0"
+rbush@2.0.2:
+  version "2.0.2"
+  resolved "https://registry.yarnpkg.com/rbush/-/rbush-2.0.2.tgz#bb6005c2731b7ba1d5a9a035772927d16a614605"
+  dependencies:
+    quickselect "^1.0.1"
 
 rc@^1.1.7:
   version "1.2.8"