From cdb8bc40d93b668cf8bf397c777b748996d468a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-=C3=89tienne=20Lord?= Date: Wed, 10 Oct 2018 12:46:07 -0400 Subject: [PATCH] fix(overlay) wrong condition on geometry simplification --- projects/geo/src/lib/overlay/shared/overlay.directive.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/geo/src/lib/overlay/shared/overlay.directive.ts b/projects/geo/src/lib/overlay/shared/overlay.directive.ts index f3d3c0ef7a..8e4e84557f 100644 --- a/projects/geo/src/lib/overlay/shared/overlay.directive.ts +++ b/projects/geo/src/lib/overlay/shared/overlay.directive.ts @@ -60,11 +60,13 @@ export class OverlayDirective implements OnInit, OnDestroy { if (olextent.isEmpty(featureExtent)) { if (geometry !== null) { featureExtent = geometry.getExtent(); - featureFlatCoordinates = geometry.simplify(100).getFlatCoordinates(); } } olextent.extend(extent, featureExtent); + if (geometry !== null) { + featureFlatCoordinates = geometry.simplify(100).getFlatCoordinates(); + } this.map.addOverlay(olFeature); }, this); const mapExtent = this.map.getExtent();