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

Enable automatic configuration of sublayers #380

Open
3 tasks done
ChristophMaskos opened this issue Dec 6, 2024 · 1 comment
Open
3 tasks done

Enable automatic configuration of sublayers #380

ChristophMaskos opened this issue Dec 6, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ChristophMaskos
Copy link
Contributor

Issue description

Currently, each sublayer of a WMS-service must be configured individually. This is impractical for WMS -Layers that have more than just a few sublayers.

Here is an example of a WMS-service that has a single sublayer per year:
Link

This is not only tiring, but also increases the size of the code base unnecessarily.

The default case should be that all sublayers are configured, unless you have specified an array of sublayers in the configuration. This should apply to all types of layers with sublayers. But most urgently for WMS Layer.

Validations

@ChristophMaskos ChristophMaskos added the enhancement New feature or request label Dec 6, 2024
@mbeckem
Copy link
Contributor

mbeckem commented Dec 10, 2024

Agreed, this would be welcome improvement. We're not likely to work on that right now during maintenance (focusing on chakra v3 and other technical issues). This will likely have to be an outside contribution or part of a future feature sprint.

Notes

Example syntax:

new WMSLayer({
    sublayers: "*" // also the default
});
  • Requires fetching and parsing WMS capabilities (to figure out which sublayers exist) when the layer is created
    • Note: fetching can only happen after the layer has been attached to the map, so it cannot be started from the layer's constructor
    • Should support cancellation (abort triggered from destroy()).
  • After capabilities have been parsed, the layer.sublayers collection should be populated automatically
  • Note: requires the introduction of a loaded state (e.g. not-loaded / loading / loaded / error).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants