johan/add-api #7
1 changed files with 7 additions and 2 deletions
|
@ -140,14 +140,19 @@ async function initLimitsBox(map, btn) {
|
|||
await getServerBoxBounds(map, box);
|
||||
box.addTo(map);
|
||||
|
||||
map.on("zoom move", () => {
|
||||
map.on("zoom move zoomend moveend", () => {
|
||||
box.setBounds(getRectangleCoord(map))
|
||||
})
|
||||
|
||||
btn.addEventListener("click", () => {
|
||||
getServerBoxBounds(map, box)
|
||||
getServerBoxBounds(map, box);
|
||||
});
|
||||
|
||||
addEventListener("resize", () => {
|
||||
getServerBoxBounds(map, box);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function createRectangleBox(map) {
|
||||
|
|
Loading…
Reference in a new issue