diff client/src/map/store.js @ 783:ab9604a46075

client: add move after clicking search result * Move openLayersMap to mapstore. * Add code to move the center to the point of a clicked search result, with animation.
author Bernhard Reiter <bernhard@intevation.de>
date Wed, 26 Sep 2018 15:29:17 +0200
parents cb6dc630c702
children 1b82ae5e637e
line wrap: on
line diff
--- a/client/src/map/store.js	Wed Sep 26 14:57:35 2018 +0200
+++ b/client/src/map/store.js	Wed Sep 26 15:29:17 2018 +0200
@@ -10,6 +10,7 @@
 const MapStore = {
   namespaced: true,
   state: {
+    openLayersMap: null,
     layers: [
       {
         name: "Open Streetmap",
@@ -165,6 +166,9 @@
     },
     setIdentifiedFeatures: (state, identifiedFeatures) => {
       state.identifiedFeatures = identifiedFeatures;
+    },
+    setOpenLayersMap: (state, map) => {
+      state.openLayersMap = map;
     }
   }
 };