diff --git a/package.json b/package.json index 4e6724b546a4e12dde2e685826dafdec74c95e30..186a5d02ec49039508dc0ee3b0630227e73bca80 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "lint": "vue-cli-service lint" }, "dependencies": { - "@turf/flip": "^6.5.0", "axios": "^0.21.1", "core-js": "^3.6.5", "leaflet": "^1.7.1", diff --git a/src/store/modules/map.js b/src/store/modules/map.js index a1721b492ad1807ccb6f4b9328e158354910704c..edda029ea13b453e8366fdcd2439a8332901163a 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -1,51 +1,10 @@ -import flip from "@turf/flip"; import { mapUtil } from "@/assets/js/map-util.js"; const map = { namespaced: true, state: { - basemaps: [ - /* { - "id": 1, - "title": "Fond mock", - "layers": [ - { - "id": 1, - "title": "Open street map mock", - "opacity": "1.50", - "order": 2, - "queryable": true - } - ] - }, */ - /* { - "id": 10, - "title": "Fond mock", - "layers": [ - { - "id": 1, - "title": "Open street map mock", - "opacity": "1.50", - "order": 2, - "queryable": true - } - ] - }, - { - "id": 5, - "title": "Fond mock", - "layers": [ - { - "id": 1, - "title": "Open street map mock", - "opacity": "1.50", - "order": 2, - "queryable": true - } - ] - }, */ - ], + basemaps: [], features: [], layers: [ { @@ -64,7 +23,6 @@ const map = { "attribution": "© contributeurs d'<a href=\"https://osm.org/copyright\">OpenStreetMap</a>", "maxZoom": 20 }, - //availableLayers: ["https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png"] }, mutations: { SET_BASEMAPS(state, basemaps) { @@ -168,7 +126,7 @@ const map = { ADD_FEATURES({ rootState }, features) { const featuresToAdd = features || rootState.feature.features const featureGroup = mapUtil.addFeatures(featuresToAdd.map(el => { - const geometry = flip(el.geom); // * map features as geoJSON format and flip coordinates for leaflet + const geometry = el.geom; // * map features as geoJSON format const properties = { ...el } return { geometry, properties } })); @@ -178,9 +136,9 @@ const map = { }, //SAVE_BASEMAPS({ state }) { - // const data = JSON.stringify(state.basemaps); - // console.log("SAVE_BASEMAPS", data); - // todo : call axios POST + // const data = JSON.stringify(state.basemaps); + // console.log("SAVE_BASEMAPS", data); + // todo : call axios POST //} } }