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
In my particular case, there is a loop in the cap.Capability.Layer.Layer.forEach that contains only one layer.
The problem is that cap.Capability.Layer.Layer[0].Layer does contain 21 layers. Without a recursive approach, we miss some available layers and that as the loop never find the "right" layer, it does not add it (because it does a check on capability before adding the layer)
The issue is now to choose if recursive layer search is wanted and if yes, how to implement it properly.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
https://services.sandre.eaufrance.fr/geo/mdo
Hydroecoregions1
I would expect with what look like a permalink (but maybe not !?) that I could see the layer displayed in the new browser tab or window.
I have a dirty implementation where I do not rely on capabilities to see the layer e.g https://labs.webgeodatavore.com/partage/wms_permalink.html#map=5.30%2F2.53%2F46.64&layer=Hydroecoregion1&url=https%3A%2F%2Fservices.sandre.eaufrance.fr%2Fgeo%2Fmdo but I want best of both world e.g the capabilities UI and the ability to share when I have an existing layer already added.
Clues about the bug
After some inspection, it seems to be a bug as in line https://github.com/Viglino/ol-ext/blob/master/examples/layer/map.wmscapabilities.html#L157, I see a reference to a
loadLayer
function. When I look at exact function at https://github.com/Viglino/ol-ext/blob/master/src/control/WMSCapabilities.js#L871 and I also debug using breakpoint with my URL using browser DevTools, I see the issue is that there is no recursive search.In my particular case, there is a loop in the
cap.Capability.Layer.Layer.forEach
that contains only one layer.The problem is that
cap.Capability.Layer.Layer[0].Layer
does contain 21 layers. Without a recursive approach, we miss some available layers and that as the loop never find the "right" layer, it does not add it (because it does a check on capability before adding the layer)The issue is now to choose if recursive layer search is wanted and if yes, how to implement it properly.
The text was updated successfully, but these errors were encountered: