publiclab / Leaflet.DistortableImage

A Leaflet extension to distort or "rubber sheet" images
https://publiclab.github.io/Leaflet.DistortableImage/examples/
BSD 2-Clause "Simplified" License
273 stars 285 forks source link

Error importing into my React component - We need React Support! #1390

Open jarodsim opened 1 year ago

jarodsim commented 1 year ago

We need a React Js support, please. When i add the import to my react component i got this error: image

Here is the import in my react component: image Yes, just importing it already breaks everything

jarodsim commented 1 year ago

Ok, in this repo i has the resolution https://github.com/jarodsim/react-with-leaflet-distorcable-image

u must import manualy

u need to add the leaflet-toolbar lib in ur project to

import L from "leaflet";
import "leaflet-toolbar";
import "leaflet-distortableimage";
import "leaflet-toolbar/dist/leaflet.toolbar.css";
import "leaflet-distortableimage/dist/leaflet.distortableimage.css";