diff --git a/src/assets/js/map-util.js b/src/assets/js/map-util.js index 56d127c116f392e1afdb8254a704bff09895c397..da388ae4d557cea90b06bd042558b32c38661b03 100644 --- a/src/assets/js/map-util.js +++ b/src/assets/js/map-util.js @@ -293,7 +293,7 @@ const mapUtil = { }, retrieveFeatureColor: function (featureType, properties) { - const colorsStyle = featureType.colors_style && featureType.colors_style.value ? featureType.colors_style.value : featureType.colors_style; + const colorsStyle = featureType.colors_style; if (featureType && colorsStyle && colorsStyle.custom_field_name) { const currentValue = properties[colorsStyle.custom_field_name]; const colorStyle = colorsStyle.colors[currentValue]; @@ -400,7 +400,13 @@ const mapUtil = { } const colorValue = color.value ? color.value : color; if (geomJSON.type === 'Point') { - if (customFieldOption && featureType.colors_style && featureType.colors_style.value && featureType.colors_style.value.icons) { + if ( + customFieldOption && + featureType.colors_style && + featureType.colors_style.value && + featureType.colors_style.value.icons && + !!Object.keys(featureType.colors_style.value.icons).length + ) { if (featureType.colors_style.value.icons[customFieldOption]) { const iconHTML = ` <i diff --git a/src/store/modules/feature.js b/src/store/modules/feature.js index 7c08380c4cebf1749266601ca7b2825a002f1a8b..fd331b50afb9e4fcb3aa32a7db9b895167c7cf90 100644 --- a/src/store/modules/feature.js +++ b/src/store/modules/feature.js @@ -139,8 +139,10 @@ const feature = { const features_count = response.data.count; commit("SET_FEATURES_COUNT", features_count); } + return response; } catch (error) { console.error(error); + return error; } }, GET_PROJECT_FEATURE({ commit, rootState }, { project_slug, feature_id }) { diff --git a/src/views/feature_type/Feature_type_edit.vue b/src/views/feature_type/Feature_type_edit.vue index f3fc1dc12d2c81531f5e141900750fba1a1f8136..90488ea26afed108904d912e535260b15fd7c0e9 100644 --- a/src/views/feature_type/Feature_type_edit.vue +++ b/src/views/feature_type/Feature_type_edit.vue @@ -90,7 +90,7 @@ <!-- //* s'affiche après sélection d'option de type liste dans type de champ --> <div - v-if="colorsStyleList.length > 0" + v-if="colorsStyleList.length > 0 && selectedGeomType !== 'Point'" class="custom_style" id="id_style_container" >