Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck committed Jul 7, 2021
1 parent ef41ff2 commit c1bcdd1
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions x-pack/plugins/maps/server/mvt/get_tile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,22 +336,19 @@ export async function getTile({
const fieldNames = new Set<string>();
features.forEach((feature) => {
for (const key in feature.properties) {
if (feature.properties.hasOwnProperty(key) && key !== 'key' && key !== 'gridCentroid') {
if (
feature.properties.hasOwnProperty(key) &&
key !== '_index' &&
key !== '_id' &&
key !== FEATURE_ID_PROPERTY_NAME
) {
fieldNames.add(key);
}
}
});

const fieldMeta: FieldMeta = {};
fieldNames.forEach((fieldName: string) => {
if (
fieldName === '_index' ||
fieldName === '_id' ||
fieldName === FEATURE_ID_PROPERTY_NAME
) {
return;
}

const rangeMeta = pluckRangeFieldMeta(features, fieldName, (rawValue: unknown) => {
return typeof rawValue === 'number' ? rawValue : NaN;
});
Expand Down

0 comments on commit c1bcdd1

Please sign in to comment.