leaflet-groupedlayercontrol
leaflet-groupedlayercontrol copied to clipboard
Unable to control the order in which grouped layers appear in the control
It appears that the layer groups draw in the order in which they are added to the control. There are some situations where this may or may not be feasible, and you may want to manually specify the ordering of the layer groups when the control is initialized.
Do you know how the standard leaflet layer control works in this regard? Most of the code for this control comes from that implementation, and we only add the extra group stuff. If the leaflet control works differently, then perhaps our implementation needs to be updated (recopied, basically).
Would the PR #43 fix this issue for you?
The default sort in my PR is to sort alphabetically. A lazy hack to get some layers to show up at the top is to prefix the name with an html comment, e.g. '<!--sort:4-->
'
@ismyrnow sorry to bother you, do you think it would be possible to merge my #43 please?
This is great, thanks!