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
Aah, that explains it! In that case, I'd propose to offer this functionality in a different way, since it probably doesn't make too much sense offering it as a property of the eox-map.
I propose to export it in the main file (e.g. export { getFlatLayersArray }) and expand the description in layer.ts to:
/**
* Returns a flat array of provided layers, including groups
* To get all layers without groups, you can use the native
* OL `getAllLayers` method on the map itself:
* https://openlayers.org/en/latest/apidoc/module-ol_Map-Map.html#getAllLayers
*
* @param layers layers Array
* @example getFlatLayersArray(eoxMap.map.getAllLayers())
*/
This needs adaptations in e.g. tests and is generally a breaking change, so moving this to v2 milestone.
Although we could add this now in an v1.x update, and deprecate the property with v2.
The helper function
getFlatLayersArray()
sometimes fails sincelayers
sometimes seems to beundefined
and therefore can't be spread at:EOxElements/elements/map/src/layer.ts
Line 27 in 94eff0c
The text was updated successfully, but these errors were encountered: