mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-04-09 05:10:22 +00:00
Merge branch 'dev'
This commit is contained in:
@@ -85,7 +85,7 @@ export class RoutingControls {
|
|||||||
this.file = file;
|
this.file = file;
|
||||||
for (let zoom = MIN_ANCHOR_ZOOM; zoom <= MAX_ANCHOR_ZOOM; zoom++) {
|
for (let zoom = MIN_ANCHOR_ZOOM; zoom <= MAX_ANCHOR_ZOOM; zoom++) {
|
||||||
this.layers.set(zoom, {
|
this.layers.set(zoom, {
|
||||||
id: `routing-controls-${zoom}`,
|
id: `routing-controls-${this.fileId}-${zoom}`,
|
||||||
anchors: [],
|
anchors: [],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -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({
|
||||||
|
|||||||
Reference in New Issue
Block a user