adapt temporary anchor layer

This commit is contained in:
vcoppe
2026-04-07 22:19:03 +02:00
parent 71cdc03da5
commit b3a11125a5

View File

@@ -1073,7 +1073,9 @@ export class RoutingControls {
if (!this.temporaryAnchor) { if (!this.temporaryAnchor) {
return; return;
} }
let source = get(map)?.getSource('routing-controls-0') as GeoJSONSource | undefined; let source = get(map)?.getSource(`routing-controls-${this.fileId}-0`) as
| GeoJSONSource
| undefined;
if (source) { if (source) {
if (this.temporaryAnchor) { if (this.temporaryAnchor) {
source.updateData({ source.updateData({
@@ -1088,7 +1090,9 @@ export class RoutingControls {
return; return;
} }
const map_ = get(map); const map_ = get(map);
let source = map_?.getSource('routing-controls-0') as GeoJSONSource | undefined; let source = map_?.getSource(`routing-controls-${this.fileId}-0`) as
| GeoJSONSource
| undefined;
if (source) { if (source) {
if (this.temporaryAnchor) { if (this.temporaryAnchor) {
source.updateData({ source.updateData({