Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use this library with react leaflet #26

Open
vidaHd opened this issue Dec 10, 2022 · 6 comments
Open

how to use this library with react leaflet #26

vidaHd opened this issue Dec 10, 2022 · 6 comments

Comments

@vidaHd
Copy link

vidaHd commented Dec 10, 2022

I tried to use this with react leaflet but i got some problems
Is it compatible with react leaflet?

@AndrejGajdos
Copy link

@vidaHd check this codesandbox

@t3chguy
Copy link

t3chguy commented Nov 24, 2024

@AndrejGajdos that doesn't really answer the question as the codesandbox does not use https://react-leaflet.js.org/

@AndrejGajdos
Copy link

@t3chguy it's super easy based on the codesandbox I provided. React leaflet is just an envelope for Leafet.

@t3chguy
Copy link

t3chguy commented Nov 26, 2024

If only it was that simple

image

react-leaflet does its own magic on leaflet which makes it incompatible with a bunch of plugins

@AndrejGajdos
Copy link

@t3chguy share your code

@t3chguy
Copy link

t3chguy commented Nov 26, 2024

Well trying to reproduce it on CodeSandbox rubber-ducked it enough. It was due to Vite stripping what it believed was not a referenced dependency. Indeed it does work, thanks for jostling that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants