|
|
@@ -138,8 +138,8 @@ export default Vue.extend({
|
|
|
}
|
|
|
this.map.addLayer(clusters)
|
|
|
},
|
|
|
- setMapBounds (bounds: L.LatLngBoundsExpression): void {
|
|
|
- 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.
|
|
|
+ setMapBounds (bounds: L.LatLngBoundsExpression, padding: [number, number] = [0, 0]): void {
|
|
|
+ this.map.fitBounds(bounds, { padding }) // << without this, the new bounds may not be properly set when the current view overlaps the new bounds.
|
|
|
},
|
|
|
resetBounds (): void {
|
|
|
this.setMapBounds(this.defaultBounds)
|
|
|
@@ -162,7 +162,7 @@ export default Vue.extend({
|
|
|
if (!(coords.length > 0)) {
|
|
|
return false
|
|
|
}
|
|
|
- this.setMapBounds(coords)
|
|
|
+ this.setMapBounds(coords, [120, 120])
|
|
|
return true
|
|
|
}
|
|
|
}
|