Repository navigation
Keep radius=0 on Circle and CircleMarker - #2370
Open
KhadeerBasha1232 wants to merge 1 commit into
Open
KhadeerBasha1232 wants to merge 1 commit into
KhadeerBasha1232 wants to merge 1 commit into
Conversation
path_options only added the radius when it was truthy, so radius=0 was dropped and Leaflet fell back to its default of 10 (pixels for CircleMarker, meters for Circle). Zero-valued points were drawn as visible circles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KhadeerBasha1232
temporarily deployed
to
pypi
November 20, 2026 14:48 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keep
radius=0onCircleandCircleMarkerThe problem
A radius of 0 is dropped, so Leaflet falls back to its default radius of 10: 10 pixels for a
CircleMarker, 10 meters for aCircle. This comes up when circles are sized from data and some values are zero:BandDhave a count of 0, but they're drawn as 10px red circles, which reads as roughly two-thirds ofC's 15.The cause
path_optionsonly adds the radius when it's truthy:The fix
Check
radius is not Noneinstead.Nonestill means "don't set a radius", which is whatPolygon,PolyLine,Rectangleand the encoded polyline plugins rely on. Only an explicit0changes behaviour.Before / after
The example above, opened in Chrome. The zero-count points now show only their stroke, at radius 0.
Tests
Added
test_zero_radius_is_kepttotests/test_vector_layers.py. It coverspath_options,CircleandCircleMarkerwithradius=0, and checks thatradius=Nonestill leaves the key out.