diff --git a/src/assets/js/map-util.js b/src/assets/js/map-util.js index 49e7338609c880d2abcdbc1154f001de66bd8764..2302367604a3ef3074a3781718ef9cf940eab887 100644 --- a/src/assets/js/map-util.js +++ b/src/assets/js/map-util.js @@ -259,6 +259,7 @@ const mapUtil = { if (!filter || !Object.values(filter).some(val => val) || Object.values(filter).some(val => val) && filters.length && filters.every(val => val !== false)) { const geomJSON = flip(feature.geometry); + //const geomJSON = flip(feature.geom); //* different name in data from django api const popupContent = this._createContentPopup(feature); diff --git a/src/store/modules/feature.js b/src/store/modules/feature.js index 3b4f8ebb4cffb31c3ed003e75f92e3a2267ffd41..e0ef78f04a2cd41005ec5ea41a4c5c12925688d3 100644 --- a/src/store/modules/feature.js +++ b/src/store/modules/feature.js @@ -91,7 +91,11 @@ const feature = { .then((response) => { const features = response.data.features; commit("SET_FEATURES", features); - dispatch("map/ADD_FEATURES", features, { root: true }); + dispatch("map/ADD_FEATURES", features.map(el => { + const geometry = el.geom; + const properties = { ...el } + return { geometry, properties } + }), { root: true }); }) .catch((error) => { throw error;