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

Grey out layers in the toc if not visible due to scale #13

Open
umbe1987 opened this issue Sep 10, 2018 · 1 comment
Open

Grey out layers in the toc if not visible due to scale #13

umbe1987 opened this issue Sep 10, 2018 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@umbe1987
Copy link
Owner

umbe1987 commented Sep 10, 2018

According to the official OGC WMS 1.3.0 specification:

The <MinScaleDenominator> and <MaxScaleDenominator> elements define the range of scales for which it is appropriate to generate a map of a Layer.

It would be nice to grey out layers in the toc if layers are not visible due to scale.
Use this to get current scale with OL and compare it with WMS capabilities.

@umbe1987 umbe1987 added the enhancement New feature or request label Sep 10, 2018
@umbe1987 umbe1987 self-assigned this Sep 10, 2018
@umbe1987 umbe1987 added bug Something isn't working and removed enhancement New feature or request labels Nov 22, 2018
@umbe1987
Copy link
Owner Author

Implemented as of df646eb. At present, seems to work fine for desktop monitors but not for smaler devices (i.e. smartphones).

The symptom: layers get greyed out in the ToC although they're still visible in the view.
For possible solution, see this link and try to make adjustments in https://github.com/umbe1987/shire/blob/master/js/get_scale.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant