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

New isVisible() and getAttributions() methods on Layer #14476

Merged
merged 1 commit into from Feb 2, 2023

Conversation

ahocevar
Copy link
Member

@ahocevar ahocevar commented Feb 1, 2023

This pull request adds something that I've been wishing for often when working with layers - an isVisible(view) method on the layer. And a getAttributions(view) method which makes use of the former, to make it easier to collect attributions from all or some layers of the map. This new method also simplifies the Attribution control's collectSourceAttributions_() method.

Replaces and closes #14454.
Fixes #14453.

@github-actions
Copy link

github-actions bot commented Feb 1, 2023

📦 Preview the website for this branch here: https://deploy-preview-14476--ol-site.netlify.app/.

@simonseyock
Copy link
Member

This looks very handy! I just had some minuscule remarks.

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

Successfully merging this pull request may close these issues.

Make collectSourceAttributions_ of ol/control/Attribution accessible for custom attribution controls
3 participants