I've got this react code to wrap the grid lines
import { useEffect } from "react";
import { useMap } from "react-leaflet";
import AutoGraticule from "leaflet-auto-graticule";
export function GridlinesLayer() {
const map = useMap();
useEffect(() => {
const graticule = new AutoGraticule({
redraw: "moveend",
}).addTo(map);
return () => {
map.removeLayer(graticule)
};
}, [map]);
return null;
}
it results in labels that are not formatted correctly:
Any ideas? I'd be happy to take a look if you have any pointers?
Versions
| package |
version |
| leaflet |
^1.9.4 |
| leaflet-auto-graticule |
^2.0.0 |
| react |
^19.2.4 |
| react-leaflet |
^5.0.0 |
Latest Chrome browser on MacOS Tahoe 26.3
I've got this react code to wrap the grid lines
it results in labels that are not formatted correctly:
Any ideas? I'd be happy to take a look if you have any pointers?
Versions
Latest Chrome browser on MacOS Tahoe 26.3