Skip to content

Fix the marker shape for hex Icon colors - #2300

Open
xecanto wants to merge 1 commit into
python-visualization:mainfrom
xecanto:fix-hex-icon-marker-shape
Open

xecanto wants to merge 1 commit into
python-visualization:mainfrom
xecanto:fix-hex-icon-marker-shape

Conversation

@xecanto

@xecanto xecanto commented Oct 15, 2026

Copy link
Copy Markdown

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.

This branch has not been deployed

No deployments
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

1 participant