Skip to content

Commit

Permalink
Merge pull request #5071 from llienher/GSGMF-1085_api-query-fix
Browse files Browse the repository at this point in the history
GSGMF-1085: api query fix
  • Loading branch information
llienher authored Aug 20, 2019
2 parents 6d970e0 + 1c5525b commit e9280f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/src/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import * as themes from './Themes.js';
/**
* @type {Array<string>}
*/
const EXCLUDE_PROPERTIES = ['geom', 'geometry', 'boundedBy'];
const EXCLUDE_PROPERTIES = ['boundedBy'];


/**
Expand Down Expand Up @@ -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 += '<table><tbody>';
for (const key in properties) {
if (!EXCLUDE_PROPERTIES.includes(key)) {
if (!EXCLUDE_PROPERTIES.includes(key) || key !== geometryName) {
contentHTML += '<tr>';
contentHTML += `<th>${key}</th>`;
contentHTML += `<td>${properties[key]}</td>`;
Expand Down

0 comments on commit e9280f5

Please sign in to comment.