You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently updated to Leaflet 1.9.1 and the L object does not have GeometryUtil, which this package relies on to work.
I could not find a way to get this working without just downgrading Leaflet.
Also do you plan to update this for React 17/18 ?
The text was updated successfully, but these errors were encountered:
Hmmmm, I have not tried this with 1.9 yet, but I imagine the removal of the L global in leaflet 1.9 is going to cause alot of problems with tons of plugins in the leaflet ecosystem. The 1.9 release notes do mention
we will provide a shim that can be imported manually that will restore this functionality
Though I have no idea when that will happen. Ultimately this problem is upstream, with leaflet-geometryutil and leaflet itself. But, it does bother me, so there's a pretty simple shim you can do yourself to get this working with leaflet ^1.9
Install leaflet-geometryutil as a dependency of your project
npm i leaflet-geometryutil
When you import 'leaflet-arrowheads', attach GeometryUtil to L yourself:
import L from "leaflet";
import "leaflet-arrowheads";
import GeometryUtil from "leaflet-geometryutil";
L.GeometryUtil = GeometryUtil;
Recently updated to Leaflet 1.9.1 and the L object does not have GeometryUtil, which this package relies on to work.
I could not find a way to get this working without just downgrading Leaflet.
Also do you plan to update this for React 17/18 ?
The text was updated successfully, but these errors were encountered: