[leaflet] DivIconOptions.html is too restrictive #75042
Unanswered
MKuranowski
asked this question in
Issues with a @types package
Replies: 2 comments
|
Thanks for the discussion about " Pinging the DT module owners: @alejo90, @atd-schubert, @mcauer, @ronikar, @life777, @henrythasler, @captain-igloo, @someonewithpc. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The
htmlargument to L.divIcon currently is marked asstring | HTMLElement | false | undefined:DefinitelyTyped/types/leaflet/index.d.ts
Line 3026 in ce6d550
This parameter is passed directly to HTMLDivElement.appendChild when
options.html instanceof Element, so DivIcon can accept any elements, not just HTML ones: https://github.com/Leaflet/Leaflet/blob/d15112c9e8ac339f0f74f563959d0423d291308d/src/layer/marker/DivIcon.js#L49.A good example of a non-HTML element which can realistically put as the icon would be an SVGSVGElement.
All reactions