You've already forked pigallery2
mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-07-15 01:24:25 +02:00
@ -425,7 +425,12 @@ export class GalleryMapLightboxComponent implements OnChanges, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
clearPath(): void {
|
clearPath(): void {
|
||||||
this.pathLayersConfigOrdered.forEach(p => p.layer.clearLayers());
|
this.pathLayersConfigOrdered.forEach(p => {
|
||||||
|
p.layer.clearLayers();
|
||||||
|
this.mapLayerControl.removeLayer(
|
||||||
|
p.layer
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -554,10 +559,7 @@ export class GalleryMapLightboxComponent implements OnChanges, OnDestroy {
|
|||||||
|
|
||||||
// Add layer to the map
|
// Add layer to the map
|
||||||
this.pathLayersConfigOrdered.filter(pl => pl.layer.getLayers().length > 0).forEach((pl) => {
|
this.pathLayersConfigOrdered.filter(pl => pl.layer.getLayers().length > 0).forEach((pl) => {
|
||||||
// make sure it does not appear twice
|
|
||||||
this.mapLayerControl.removeLayer(
|
|
||||||
pl.layer
|
|
||||||
);
|
|
||||||
this.mapLayerControl.addOverlay(
|
this.mapLayerControl.addOverlay(
|
||||||
pl.layer,
|
pl.layer,
|
||||||
pl.name
|
pl.name
|
||||||
|
Reference in New Issue
Block a user