From f94af53a4e4dbc428fbd6dcf4ec4e317d5c419c4 Mon Sep 17 00:00:00 2001 From: Marc Stammerjohann <8985933+marcjulian@users.noreply.github.com> Date: Thu, 22 Aug 2024 20:24:04 +0200 Subject: [PATCH] revert removing zone.onMicrotaskEmpty to cleanup cluster correctly on zoom, closes #188 * need to figure out, how to replace for #165 --- projects/ngx-maplibre-gl/src/lib/map/map.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/ngx-maplibre-gl/src/lib/map/map.service.ts b/projects/ngx-maplibre-gl/src/lib/map/map.service.ts index 2075b2af..6f42958b 100644 --- a/projects/ngx-maplibre-gl/src/lib/map/map.service.ts +++ b/projects/ngx-maplibre-gl/src/lib/map/map.service.ts @@ -642,7 +642,9 @@ export class MapService { this.mapInstance.setStyle(options.style!); } - this.subscription.add(this.applyChanges()); + this.subscription.add( + this.zone.onMicrotaskEmpty.subscribe(() => this.applyChanges()) + ); } private removeMarkers() {