diff client/src/components/map/layers.js @ 3270:d7bc51fd50b0

client: map layers: integrated osm layer into main layer configuration file only url is set afterwards
author Markus Kottlaender <markus@intevation.de>
date Wed, 15 May 2019 13:53:48 +0200
parents f0af359391a0
children b74e9768231d
line wrap: on
line diff
--- a/client/src/components/map/layers.js	Wed May 15 13:22:21 2019 +0200
+++ b/client/src/components/map/layers.js	Wed May 15 13:53:48 2019 +0200
@@ -10,6 +10,7 @@
 import Point from "ol/geom/Point";
 import { bbox as bboxStrategy } from "ol/loadingstrategy";
 import { WFS, GeoJSON } from "ol/format";
+import OSM from "ol/source/OSM";
 import { equalTo } from "ol/format/filter";
 import { HTTP } from "@/lib/http";
 import styles from "./styles";
@@ -166,6 +167,12 @@
       return this.config.find(l => l.get("id") === id);
     },
     config: [
+      new TileLayer({
+        id: "OPENSTREETMAP",
+        label: "Open Streetmap",
+        visible: true,
+        source: new OSM()
+      }),
       new ImageLayer({
         id: "INLANDECDIS",
         label: "Inland ECDIS chart Danube",