Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GSGMF-1085: api query fix #5071

Merged
merged 1 commit into from
Aug 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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