Skip to content

Commit

Permalink
[Maps][File upload] Removing bbox from parsed file pending upstream l…
Browse files Browse the repository at this point in the history
…ib fix (#45194) (#45211)
  • Loading branch information
Aaron Caldwell committed Sep 10, 2019
1 parent 206d892 commit a916130
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }]
Expand Down

0 comments on commit a916130

Please sign in to comment.