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

[Map] [Toc] Enable Zoom limitations for Layer types #381

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

[Map] [Toc] Enable Zoom limitations for Layer types #381

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

Comments

@ChristophMaskos
Copy link
Contributor

Issue description

Please adopt the following properties from the Openlayer API for WMS layers:


minResolution:  (number| undefined) The minimum resolution (inclusive) at which this layer will be visible.
maxResolution:  (number| undefined) The maximum resolution (exclusive) below which this layer will be visible.
minZoom:  (number| undefined) The minimum view zoom level (exclusive) above which this layer will be visible.
maxZoom:  (number| undefined) The maximum view zoom level (inclusive) at which this layer will be visible.

Link

Layers that are not within the permitted zoom range should appear as disable in the Toc. Similar to a failed health check.

Validations

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

mbeckem commented Dec 10, 2024

Good suggestion. For the time being, you can work around this by using the olLayer directly, for example

const layer: WMSLayer = ...;
layer.olLayer.setMaxZoom(...);

However I do agree that this is awkward. And it isn't displayed in the TOC.

Notes

  • Should be implemented for all "real" layers that are backed by an olLayer, not just WMS.
  • Consider adding the extent and opacity properties as well while we're at it.
  • Needs constructor param, getter and setter. The ol properties are observable, so the getters should be reactive.
  • For displaying in the toc: check whether open layers provides the information itself (layer "really" visible in zoom level). Otherwise, compute it based on zoom / resolution.

@mbeckem mbeckem changed the title [Map] [Toc] Enable Zoom limitations for WMS-Layer [Map] [Toc] Enable Zoom limitations for Layer types Dec 10, 2024
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