From c1bcdd121bf983d6ed0def182be2d131f10a9eb7 Mon Sep 17 00:00:00 2001 From: Thomas Neirynck Date: Wed, 7 Jul 2021 18:38:08 +0200 Subject: [PATCH] feedback --- x-pack/plugins/maps/server/mvt/get_tile.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/x-pack/plugins/maps/server/mvt/get_tile.ts b/x-pack/plugins/maps/server/mvt/get_tile.ts index db9b4bab248a9..41a2c550198f0 100644 --- a/x-pack/plugins/maps/server/mvt/get_tile.ts +++ b/x-pack/plugins/maps/server/mvt/get_tile.ts @@ -336,7 +336,12 @@ export async function getTile({ const fieldNames = new Set(); 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); } } @@ -344,14 +349,6 @@ export async function getTile({ 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; });