Fix node with several layer names not correctly removed or added #1674
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.
The purpose of this pull request is to fix an issue related to node corresponding to several LAYERS params (ie. several mapfile layers).
Currently in the "OSM Functions" group, there's a node called "two_layers" which actually displays "sustenance" and "entertainment" features on the map.
Steps to reproduce bug:
Current:
https://camptocamp.github.io/ngeo/master/examples/contribs/gmf/apps/desktop_alt/?baselayer_ref=map&lang=en&map_x=601000&map_y=207500&map_zoom=4&rl_features&tree_groups=OSM%20functions&tree_group_layers_OSM%20functions=sustenance%2Centertainment%2Cosm_time%2Cosm_time2%2Cosm_scale%2Cosm_open%2Cbank%2Csustenance%2Centertainment%2Chalf_query%2Csrtm%2Caster
After fix:
https://pgiraud.github.io/ngeo/fix_two_layers/examples/contribs/gmf/apps/desktop_alt?baselayer_ref=map&lang=en&map_x=601000&map_y=207500&map_zoom=4&rl_features&tree_groups=OSM%20functions&tree_group_layers_OSM%20functions=sustenance%2Centertainment%2Cosm_time%2Cosm_time2%2Cosm_scale%2Cosm_open%2Cbank%2Csustenance%2Centertainment%2Chalf_query%2Csrtm%2Caster
The problem comes from the fact that we try to remove "foo,bar" from ["foo", "bar", "dude"] and eventually nothing is removed.
Please review.