fix: update map initialization to explicitly handle maxBounds nullability and conditional assignment
This commit is contained in:
parent
4be78d7c0d
commit
96eecb75c2
5 changed files with 7 additions and 5 deletions
|
|
@ -42,7 +42,8 @@ map = new maplibregl.Map({
|
|||
center: [4.3572, 50.8477],
|
||||
zoom: 11,
|
||||
minzoom: 4,
|
||||
maxzoom: 24
|
||||
maxzoom: 24,
|
||||
maxBounds: null
|
||||
});
|
||||
|
||||
// Ajouter un marqueur au clic
|
||||
|
|
|
|||
|
|
@ -416,7 +416,8 @@ map = new maplibregl.Map({
|
|||
center: [4.3572, 50.8477],
|
||||
zoom: 11,
|
||||
minZoom: 9,
|
||||
maxZoom: 24
|
||||
maxZoom: 24,
|
||||
maxBounds: null
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@
|
|||
options.zoom = window.MAP_DEFAULT_ZOOM;
|
||||
}
|
||||
|
||||
if (!options.maxBounds && window.MAP_DEFAULT_EXTENT) {
|
||||
if (options.maxBounds === undefined && window.MAP_DEFAULT_EXTENT) {
|
||||
options.maxBounds = window.MAP_DEFAULT_EXTENT;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2005,7 +2005,7 @@
|
|||
options.zoom = window.MAP_DEFAULT_ZOOM;
|
||||
}
|
||||
|
||||
if (!options.maxBounds && window.MAP_DEFAULT_EXTENT) {
|
||||
if (options.maxBounds === undefined && window.MAP_DEFAULT_EXTENT) {
|
||||
options.maxBounds = window.MAP_DEFAULT_EXTENT;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
options.zoom = window.MAP_DEFAULT_ZOOM;
|
||||
}
|
||||
|
||||
if (!options.maxBounds && window.MAP_DEFAULT_EXTENT) {
|
||||
if (options.maxBounds === undefined && window.MAP_DEFAULT_EXTENT) {
|
||||
options.maxBounds = window.MAP_DEFAULT_EXTENT;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue