diff client/src/components/map/Map.vue @ 3104:19fc84a98479

Added "published-config" field to configuration. It's a path to a published JSON file (after login) to give additional parameters to the client. Reached by GET /api/system/config Currently the field "osm-url" is used by the client to determine the URL of the OSM server for the background layer.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 25 Apr 2019 15:31:43 +0200
parents a9c7825303b3
children 973312bb77c6
line wrap: on
line diff
--- a/client/src/components/map/Map.vue	Thu Apr 25 13:11:41 2019 +0200
+++ b/client/src/components/map/Map.vue	Thu Apr 25 15:31:43 2019 +0200
@@ -219,13 +219,13 @@
   },
   mounted() {
     // ToDo set path to correct endpoint in order to retrieve an OSM URL
-    HTTP.get("/users", {
+    HTTP.get("/system/config", {
       headers: { "X-Gemma-Auth": localStorage.getItem("token") }
     })
       .then(response => {
         const { url } = response.data;
         const config = {};
-        if (url) config["url"] = url;
+        if (url) config["osm-url"] = url;
         this.layers.config.unshift(
           new TileLayer({
             id: "OPENSTREETMAP",