You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Adding multiple FeatureGroups to a LayerControl where some are named using a numerical string causes those groups to always come first in the layer control on the map, even though feature groups named using alphanumeric strings are unsorted and sortLayers argument is set to False.
Screenshot:
I have not managed to find any documentation saying that this is intended behaviour.
Expected behavior FeatureGroups appearing in the LayerControl in the order they were added to the map when sortLayers argument is set to False.
In the case of the example: z -> a -> 2a -> 1
Environment (please complete the following information):
Jupyter Notebook
Python version: 3.12.6
folium version 0.18.0
Additional context
--
Possible solutions
Inserting a space/any other symbol after the number makes it appear where I would expect it to
I tried supplying a js sortFunction to LayerControl as a string, but it resulted in the layer control not showing up. Is this not supposed to be used in Python?
The text was updated successfully, but these errors were encountered:
Describe the bug
Adding multiple
FeatureGroup
s to aLayerControl
where some are named using a numerical string causes those groups to always come first in the layer control on the map, even though feature groups named using alphanumeric strings are unsorted andsortLayers
argument is set toFalse
.Screenshot:
I have not managed to find any documentation saying that this is intended behaviour.
To Reproduce
Expected behavior
FeatureGroup
s appearing in theLayerControl
in the order they were added to the map whensortLayers
argument is set toFalse
.In the case of the example: z -> a -> 2a -> 1
Environment (please complete the following information):
Additional context
--
Possible solutions
sortFunction
toLayerControl
as a string, but it resulted in the layer control not showing up. Is this not supposed to be used in Python?The text was updated successfully, but these errors were encountered: