Skip to content

Commit 69779fb

Browse files
committed
IOT-1178 add padding to map fittobounds
1 parent ece3fdf commit 69779fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/shared/components/map/map.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class MapComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy
9393

9494
private fitToBounds(markers: any[]) {
9595
const group = new L.featureGroup(markers);
96-
this.map.fitBounds(group.getBounds());
96+
this.map.fitBounds(group.getBounds(), {padding: [50,50]});
9797
}
9898

9999
private addMarker(latitude: number, longitude: number, draggable = true, markerInfo: MarkerInfo = null) {

0 commit comments

Comments
 (0)