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

Check layer format in layer decorator #1895

Merged

Conversation

dbauszus-glx
Copy link
Member

@dbauszus-glx dbauszus-glx commented Feb 11, 2025

Instead of checking for the format in the addLayer method before calling the layer decorator method the layer format should be checked in the layer decorator method itself as this method will also be called from the [location] layer entry method which will otherwise err.

With the check for the format a warning will be issued if the format is missing in the infoj layer entry method.

The layer entry decorate method should shortcircuit on the existence of the openlayers layer property .L not the show method instead of conditionally calling the decorator method on a nullish condition of the show [method] entry property.

┆Issue is synchronized with this Asana task by Unito

@dbauszus-glx dbauszus-glx self-assigned this Feb 11, 2025
@dbauszus-glx dbauszus-glx added the Bug A genuine bug. There must be some form of error exception to work with. label Feb 11, 2025
@dbauszus-glx dbauszus-glx linked an issue Feb 11, 2025 that may be closed by this pull request
Copy link
Contributor

@simon-leech simon-leech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working for me - tested providing a bogus layer entry and correctly see a warning from that

@RobAndrewHurst RobAndrewHurst merged commit 6babb25 into GEOLYTIX:minor Feb 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A genuine bug. There must be some form of error exception to work with.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Layer decorator fail
4 participants