sigma-geosistemas / Leaflet.awesome-markers

Colorful, iconic & retina-proof markers for Leaflet, based on the Font Awesome/Twitter Bootstrap icons.
MIT License
42 stars 20 forks source link

how to use this library with react leaflet #26

Open vidaHd opened 1 year ago

vidaHd commented 1 year ago

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

AndrejGajdos commented 1 year ago

@vidaHd check this codesandbox

t3chguy commented 1 week ago

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

AndrejGajdos commented 6 days ago

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

t3chguy commented 6 days ago

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 commented 6 days ago

@t3chguy share your code

t3chguy commented 5 days ago

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.