Mattias
Mattias
Jag har testat detta i Hajk2. Kan du hämta ut koden i branch "group_filter/vbg" och testa med Hajk3?
Det verkar som att det finns fler fall än bara att en lagergrupp eventuellt inte har några lager, t ex lagergrupper i lagergrupper. För att göra detta på rätt sätt...
- Support CORS, i.e. add withCredentials or credentials: include when resources are fetched. - Option to save and fetch configuration in a database.
You should also be able to specify that a specific layer is not queryable in a GeoServer group layer. You can specify that in GeoServer, but it would be better...
Since we are looking at this together I answer the questions: 1. Yes, you should use "named tree" in GeoServer to use this. 2. All sublayers are hidden in LayerSwitcher...
The following code works: ``` const imageSource = new ImageWMS({ ...source.getProperties(), projection: source.getProjection(), crossOrigin: source.crossOrigin ?? source.crossOrigin_ ?? "anonymous", params: { ...source.getParams() }, ratio: 1, hidpi: false, }); ```
Yes, in my testing I got a layer that had a value in the source.crossOrigin property. So both should be used (as in my example).