Closed marcjulian closed 3 months ago
afterNextRender(async () => {
const earthquakes: GeoJSON.FeatureCollection = (await import(
"./earthquakes.geo.json"
)) as any;
timer = setInterval(() => {
if (earthquakes.features.length) {
earthquakes.features.pop();
}
this.earthquakes.set({ ...earthquakes });
}, 500);
});
There is a setInterval in ngx-cluster-html.component.ts
Every 500ms its update the cluster
Apparently so... this was introduced a long time ago. Closing this issue now, hopefully this was only a "panic attack" kind of thing...
MarkersForClustersComponent.updateCluster
is continuously called, even when nothing changes in the UI (no move, zoom etc on the map). This was noticed because of #188 - https://github.com/maplibre/ngx-maplibre-gl/pull/189#issuecomment-2306913912.When logging
updateCluster
we will see logs printed without any changes in the UI. This might be related to #178, before the PRupdateCluster
is only called while interacting with the map (map move, zoom).https://github.com/maplibre/ngx-maplibre-gl/blob/921a598a7272b96f0919d4ebe66871cb5ba2eb51/projects/ngx-maplibre-gl/src/lib/markers-for-clusters/markers-for-clusters.component.ts#L131-L166