check that map contains the layer

This commit is contained in:
vcoppe
2026-02-01 16:26:17 +01:00
parent 9895c3c304
commit 9408ce10c7

View File

@@ -263,6 +263,7 @@ export class MapLayerEventManager {
lngLat: maplibregl.LngLat
): string[] {
let result = layerIds.filter((layerId) => {
if (!this._map.getLayer(layerId)) return false;
const fileId = layerId.replace('-waypoints', '');
if (fileId === layerId) {
return fileStateCollection.getStatistics(fileId)?.inBBox(lngLat) ?? true;