Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maintain layer order within source #50

Open
wants to merge 4 commits into
base: gh-pages
Choose a base branch
from

Conversation

hpfast
Copy link

@hpfast hpfast commented Sep 21, 2017

fixes #19

Layers within a source should remain in the same order when they are interacted with by client code or user. I.e. when they are added/removed with the layer control. This pull request implements this by maintaining an internal array of sublayers and ensuring they are ordered according to this list before re-sending the WMS request.

In relation to issue #19, note that this ONLY addresses the bug as originally reported: order of layers within one source. It does not (yet) address the case mentioned in later comments, concerning layers from different sources not having their order preserved.

when sublayers are toggled in the layercontrol, the last one activated comes on top. This commit maintains the order that they were originally added to the source.
AlexCortinas added a commit to AlexCortinas/leaflet.wms that referenced this pull request Feb 15, 2019
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.

Toggling layers rearranges order of layers
1 participant