From 1c5525b335bbd9fa157b6d9448932c6d03219506 Mon Sep 17 00:00:00 2001 From: Laurent Lienher Date: Tue, 20 Aug 2019 13:33:05 +0200 Subject: [PATCH] Exclude the_geom property from query result --- api/src/Map.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/Map.js b/api/src/Map.js index a25d22dc1113..99821bab2b80 100644 --- a/api/src/Map.js +++ b/api/src/Map.js @@ -40,7 +40,7 @@ import * as themes from './Themes.js'; /** * @type {Array} */ -const EXCLUDE_PROPERTIES = ['geom', 'geometry', 'boundedBy']; +const EXCLUDE_PROPERTIES = ['boundedBy']; /** @@ -349,12 +349,13 @@ class Map { const coordinates = /** @type {import('ol/geom/Point.js').default} */( feature.getGeometry() ).getCoordinates(); + const geometryName = feature.getGeometryName(); const properties = feature.getProperties(); let contentHTML = ''; if (table) { contentHTML += ''; for (const key in properties) { - if (!EXCLUDE_PROPERTIES.includes(key)) { + if (!EXCLUDE_PROPERTIES.includes(key) || key !== geometryName) { contentHTML += ''; contentHTML += ``; contentHTML += ``;
${key}${properties[key]}