PaulLeCam / react-leaflet

React components for Leaflet maps
https://react-leaflet.js.org
Other
5.19k stars 887 forks source link

Custom Icon Marker #1078

Closed leopalazzi closed 6 months ago

leopalazzi commented 1 year ago

Bug report in v4

Before opening an issue, make sure to read the contributing guide and understand this is a bug tracker, not a support platform.

Please make sure to check the following boxes before submitting an issue.\ Issues opened without using this template will be closed unless they have a good reason not to follow this template.

Expected behavior

Not using L.icon() function to add a custom icon on the Marker.

Actual behavior

When we want to customize the icon of a Marker, we shouldn't have to import the leaflet but use a directly a props icon.

Steps to reproduce

Please provide the simplest example possible to reproduce the issue, based on this StackBlitz.

adamscybot commented 4 months ago

You can use https://github.com/adamscybot/react-leaflet-component-marker