Skip to content
Snippets Groups Projects
Commit e2656a7c authored by Sébastien DA ROCHA's avatar Sébastien DA ROCHA :bicyclist:
Browse files

Merge branch 'redmine-ticket-11277' into 'develop'

fix #11277 carte qui s'affiche sur la page de détail d'un signalement

See merge request geocontrib/geocontrib-frontend!54
parents 51a37de5 05c3bb96
No related branches found
No related tags found
1 merge request!54fix #11277 carte qui s'affiche sur la page de détail d'un signalement
......@@ -506,19 +506,11 @@ export default {
// - if one basemap exists, we load the layers of the first one
// - if not, load the default map and service options
let layersToLoad = null;
var baseMaps;
var project = "";
var layers = [];
var baseMaps=this.$store.state.map.basemaps;
var layers = this.$store.state.map.layers;
if (baseMaps && baseMaps.length > 0) {
// Use active one if exists, otherwise index 0 (first basemap in the list)
const mapOptions =
JSON.parse(localStorage.getItem("geocontrib-map-options")) || {};
const basemapIndex =
mapOptions &&
mapOptions[project] &&
mapOptions[project]["current-basemap-index"]
? mapOptions[project]["current-basemap-index"]
: 0;
const basemapIndex = 0;
layersToLoad = baseMaps[basemapIndex].layers;
layersToLoad.forEach((layerToLoad) => {
layers.forEach((layer) => {
......@@ -590,7 +582,12 @@ export default {
},
mounted() {
this.initMap();
this.$store
.dispatch("GET_PROJECT_INFO", this.$route.params.slug)
.then((data) => {
console.log(data)
this.initMap();
});
},
};
</script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment