publiclab / Leaflet.DistortableImage

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

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

Open jarodsim opened 10 months ago

jarodsim commented 10 months 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 10 months 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";