|
@@ -140,7 +140,7 @@ export default Vue.extend({
|
|
|
this.map.addLayer(clusters)
|
|
this.map.addLayer(clusters)
|
|
|
},
|
|
},
|
|
|
setMapBounds (bounds: L.LatLngBoundsExpression): void {
|
|
setMapBounds (bounds: L.LatLngBoundsExpression): void {
|
|
|
- this.map.fitBounds(bounds) // << without this, the new bounds may not be properly set when the current view overlaps the new bounds.
|
|
|
|
|
|
|
+ this.map.fitBounds(bounds, { padding: [100, 60] }) // << without this, the new bounds may not be properly set when the current view overlaps the new bounds.
|
|
|
},
|
|
},
|
|
|
resetBounds (): void {
|
|
resetBounds (): void {
|
|
|
this.setMapBounds(this.defaultBounds)
|
|
this.setMapBounds(this.defaultBounds)
|