Start map with default framing on nuisance page
This commit is contained in:
parent
27fd1faa9c
commit
9104e2f7c3
3 changed files with 3 additions and 4 deletions
|
|
@ -54,7 +54,7 @@ const markerInstances: Ref<maplibregl.Marker[]> = shallowRef<
|
|||
>([]);
|
||||
|
||||
function _bounds(): LngLatBoundsLike {
|
||||
if (props.markers) {
|
||||
if (props.markers.length > 0) {
|
||||
return boundsMarkers(props.markers);
|
||||
} else {
|
||||
return boundsDefault();
|
||||
|
|
|
|||
|
|
@ -18,5 +18,5 @@ export function boundsMarkers(markers: Marker[]): LngLatBounds {
|
|||
);
|
||||
}
|
||||
export function boundsDefault(): LngLatBounds {
|
||||
return new LngLatBounds(new LngLat(-70, 50), new LngLat(-125, 25));
|
||||
return new LngLatBounds(new LngLat(-125, 50), new LngLat(-70, 25));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,13 +14,12 @@
|
|||
padding-bottom: 0;
|
||||
}
|
||||
.map-container {
|
||||
background-color: #e9ecef;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
|
||||
height: 500px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
#map {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue