From a3fb47d63b846f1344f0a0cae187584cb0fe87d4 Mon Sep 17 00:00:00 2001 From: Aaron Caldwell Date: Mon, 9 Sep 2019 22:14:00 -0600 Subject: [PATCH] [Maps][File upload] Removing bbox from parsed file pending upstream lib fix (#45194) (#45230) --- .../file_upload/public/util/geo_json_clean_and_validate.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/file_upload/public/util/geo_json_clean_and_validate.js b/x-pack/legacy/plugins/file_upload/public/util/geo_json_clean_and_validate.js index f661f10421de2..b4a05e52e664a 100644 --- a/x-pack/legacy/plugins/file_upload/public/util/geo_json_clean_and_validate.js +++ b/x-pack/legacy/plugins/file_upload/public/util/geo_json_clean_and_validate.js @@ -9,8 +9,11 @@ import rewind from 'geojson-rewind'; export function geoJsonCleanAndValidate(parsedFile) { + // Remove bbox property pending fix of bbox parsing issue in jsts lib + const { bbox, ...handledGeoJsonProperties } = parsedFile; // eslint-disable-line no-unused-vars + const reader = new jsts.io.GeoJSONReader(); - const geoJson = reader.read(parsedFile); + const geoJson = reader.read(handledGeoJsonProperties); const isSingleFeature = parsedFile.type === 'Feature'; const features = isSingleFeature ? [{ ...geoJson }]