Is there a way to get the corresponding DOM element of a Marker or Layer with Leaflet, like it is with Google Maps?
You can use the internal ._container
property on most Leaflet objects, like layers and markers. Note that it's internal for a reason - if you use Canvas mode or Leaflet decides to change its internal API, your code will break.
-
It seems odd that vector layers (now) support the
className
option for use with the SVG renderer but not a way to change the class list after instantiation. – rensa Jun 20 '18 at 0:59