comparison client/src/components/Search.vue @ 3044:c71373594719

client: map: prepared store to hold multiple map objects This will be necessary to sync maps, toggle layers per map, etc. Therefore the methods to move the map (moveToExtent, etc.) became actions instead of mutations.
author Markus Kottlaender <markus@intevation.de>
date Sat, 13 Apr 2019 16:02:06 +0200
parents 802fcb50c484
children 85f7f8981a71
comparison
equal deleted inserted replaced
3043:de75404cb5fc 3044:c71373594719
297 let zoom = 11; 297 let zoom = 11;
298 if (resultEntry.type === "bottleneck") zoom = 17; 298 if (resultEntry.type === "bottleneck") zoom = 17;
299 if (resultEntry.type === "rhm") zoom = 15; 299 if (resultEntry.type === "rhm") zoom = 15;
300 if (resultEntry.type === "city") zoom = 13; 300 if (resultEntry.type === "city") zoom = 13;
301 if (resultEntry.type === "gauge") zoom = 15; 301 if (resultEntry.type === "gauge") zoom = 15;
302 this.$store.commit("map/moveMap", { 302 this.$store.dispatch("map/moveMap", {
303 coordinates: resultEntry.geom.coordinates, 303 coordinates: resultEntry.geom.coordinates,
304 zoom, 304 zoom,
305 preventZoomOut: true 305 preventZoomOut: true
306 }); 306 });
307 } 307 }