Skip to content

Commit

Permalink
fix(overlay) wrong condition on geometry simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Étienne Lord committed Oct 10, 2018
1 parent a72f1db commit cdb8bc4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion projects/geo/src/lib/overlay/shared/overlay.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit cdb8bc4

Please sign in to comment.