svgMap
svgMap copied to clipboard
Redraw on Resize
It would be great if the map gets redrawn if the canvas is resized.
Seconded
This can be done:
const map = new svgMap({...});
const resizeHandler = () => {
map.mapPanZoom.resize();
map.mapPanZoom.fit();
map.mapPanZoom.center();
}
Use the resizeHandler as callback from an resizeObserver or window.addEventListener("resize", resizeHander)
resizeHandler