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:
parent
f4cdb5a83a
commit
6bfccc3311
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user