Skip to content
Snippets Groups Projects
Commit 58b690ab authored by Timothee P's avatar Timothee P :sunflower:
Browse files

fix typo for basemap in project_detail & fix missing project fetch in project_mapping

parent bb149436
No related branches found
No related tags found
No related merge requests found
......@@ -121,7 +121,7 @@ const map = {
// 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 +131,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