[Maps][File upload] Removing bbox from parsed file pending upstream lib fix (#45194) (#45230)

This commit is contained in:
Aaron Caldwell 2019-09-09 22:14:00 -06:00 committed by GitHub
parent 0f634b7a5b
commit a3fb47d63b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 }]