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

Merge branch 'redmine-issues/12846' into 'develop'

REDMINE_ISSUE-12846

See merge request !279
parents bb149436 4bf010bf
No related branches found
No related tags found
2 merge requests!295Version 3.0.0,!279REDMINE_ISSUE-12846
......@@ -118,10 +118,8 @@ const map = {
// - if one basemap exists, check in the localstorage if one active basemap is set
// - if no current active basemap, get the first index
// - if not, load the default map and service options
// todo : create endpoints to get : 'baseMaps' ,'layers' ,'serviceMap' ,'optionsMap'
let layersToLoad = null;
if (state.baseMaps && state.baseMaps.length > 0) {
if (state.basemaps && state.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')) || {};
......@@ -131,7 +129,7 @@ const map = {
mapOptions[project]['current-basemap-index']
? mapOptions[project]['current-basemap-index']
: 0;
layersToLoad = state.baseMaps[basemapIndex].layers;
layersToLoad = state.basemaps[basemapIndex].layers;
layersToLoad.forEach((layerToLoad) => {
state.availableLayers.forEach((layer) => {
if (layer.id === layerToLoad.id) {
......
......@@ -88,8 +88,9 @@ export default {
},
created() {
if (!this.$store.getters.project) {
this.$store.dispatch('GET_PROJECT_INFO', this.$route.params.slug);
if (!this.$store.state.projects.project) {
this.$store.dispatch('projects/GET_PROJECT', this.$route.params.slug);
this.$store.dispatch('projects/GET_PROJECT_INFO', this.$route.params.slug);
}
},
......
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