From f9fcd46ae7dc39885a854b195e6e766f5cbf1ca7 Mon Sep 17 00:00:00 2001 From: Mauro Bartolomeoli Date: Wed, 16 Nov 2016 14:36:47 +0100 Subject: [PATCH] Fixes #1282: error importing shapefile with some empty geometries --- web/client/utils/LayersUtils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/client/utils/LayersUtils.js b/web/client/utils/LayersUtils.js index 3532fab95c..b86ae53061 100644 --- a/web/client/utils/LayersUtils.js +++ b/web/client/utils/LayersUtils.js @@ -123,6 +123,9 @@ var LayersUtils = { if (!feature.id) { feature.id = idx; } + if (feature.geometry && feature.geometry.bbox && isNaN(feature.geometry.bbox[0])) { + feature.geometry.bbox = [null, null, null, null]; + } return feature; }) };