Skip to content

Fix the marker shape for hex Icon colors - #2300

Merged
hansthen merged 1 commit into
python-visualization:mainfrom
xecanto:fix-hex-icon-marker-shape
Oct 17, 2026
Merged

hansthen merged 1 commit into
python-visualization:mainfrom
xecanto:fix-hex-icon-marker-shape

Conversation

@xecanto

@xecanto xecanto commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Closes #2293

Hex colors (#2211) render as a lopsided blob because Leaflet's inline transform overrides the CSS rotation. The pin is now drawn on a ::before sized like the sprite markers. This also restores the warning for a non-string color, which raised AttributeError.

Leaflet positions the marker with an inline transform, which replaced
the rotation in the generated CSS and left a lopsided shape with a
tilted glyph. Draw the pin on a pseudo-element instead, sized like the
sprite markers. Also warn again for a non-string color instead of
raising AttributeError.
@hansthen

hansthen commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Looks good to me. Do not worry about the failing docs publishing test. This will be fixed when we issue a new release. @xecanto Do you want me to merge this?

@xecanto

xecanto commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

Yes please, thanks!

@hansthen
hansthen merged commit 4b80e22 into python-visualization:main Oct 17, 2026
15 of 16 checks passed

This branch was successfully deployed

1 active deployment
pypi — 1e22983c Deployed Oct 15, 2026 by xecanto via packages #1969
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

Successfully merging this pull request may close these issues.

Allow custom colors in folium.Icon

2 participants