diff --git a/src/components/Map/Geocoder.vue b/src/components/Map/Geocoder.vue index 9a7c06d2bc12a21c9b59c44f49215041aff03ade..52e620eef630bd05bc430c1aa8d7a308c4dcb0d6 100644 --- a/src/components/Map/Geocoder.vue +++ b/src/components/Map/Geocoder.vue @@ -215,7 +215,7 @@ export default { // zoom buttons are 60px high, geolocation and full screen button is 34px high with borders top: calc(1.6em + 60px + 34px + 34px); pointer-events: auto; - z-index: 1000; + z-index: 999; border: 2px solid rgba(0,0,0,.2); background-clip: padding-box; padding: 0; diff --git a/src/components/Map/Geolocation.vue b/src/components/Map/Geolocation.vue index 24fa6298d91c9370e0da756253585c89d6d8dc43..1ef4edf363bbfc65202248b4a913887f44ae1148 100644 --- a/src/components/Map/Geolocation.vue +++ b/src/components/Map/Geolocation.vue @@ -30,4 +30,4 @@ export default { }, } }; -</script> +</script> \ No newline at end of file diff --git a/src/services/map-service.js b/src/services/map-service.js index 1d3c2e8a4e8dd17b41a014311691f613cd405b96..3d8d4e7aa009ffb2af774647822de69aad5d9191 100644 --- a/src/services/map-service.js +++ b/src/services/map-service.js @@ -629,19 +629,13 @@ const mapService = { createCustomFiedsContent(featureType, feature) { const { customfield_set } = featureType; - // create an html row for a customField - const rowTemplate = (customfield) => { - const { label, name } = customfield; - const value = feature.getProperties()[name]; - return label && value !== undefined ? `<div class="customField-row">${label} : ${value}</div>` : ''; - }; - // generate html for each customField set to be displayed from featureType display config + // generate html for each customField configured to be displayed let rows = ''; - for (const customField of customfield_set) { - if (customField.value !== null && customField.value !== undefined - && featureType.displayed_fields.includes(customField.name)) - { - rows += rowTemplate(customField); + for (const { label, name } of customfield_set) { + const value = feature.getProperties()[name]; + // check if the value is not null nor undefined (to allow false value if boolean) + if (featureType.displayed_fields.includes(name) && value !== null && value !== undefined) { + rows += `<div class="customField-row">${label} : ${value}</div>`; } } // wrap all rows into customFields container