1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-02-07 13:41:44 +02:00

Fixing leaflet map removal error

This commit is contained in:
Patrik J. Braun 2023-09-20 22:07:04 +02:00
parent f4cdb5a83a
commit 6bfccc3311

View File

@ -86,6 +86,9 @@ export class GalleryMapComponent implements OnChanges, IRenderable {
onMapReady(map: Map): void {
this.leafletMap = map;
if (!this.leafletMap) {
return;
}
if (this.markerLayer.length > 0) {
this.leafletMap.setView(this.markerLayer[0].getLatLng(), 99);
this.leafletMap.fitBounds(