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

Add catch error for undefined layers in mapbook #844

Open
chughes-lincoln opened this issue Jul 27, 2023 · 1 comment
Open

Add catch error for undefined layers in mapbook #844

chughes-lincoln opened this issue Jul 27, 2023 · 1 comment

Comments

@chughes-lincoln
Copy link
Contributor

If there's an undefined layer in your map, the entire map will fail to load, rather than just that layer (similar to how the map wouldn't load if a layer was favorited that no longer exists - #812).

This is most commonly an issue when the admin makes a typo adding a new layer, and the name in the catalog doesn't match the name in the map-source.

This is more of an issue if you're trying to remove a layer that already exists. For example, if I have the demo open and the admin removes the parcels layer, refreshing my browser causes the catalog, map, and toolbar to not load. In this case there's also no obvious way for the user to fix the issue because the Start Over button doesn't load.

It would be very helpful if some sort of safety check could be added so that the undefined layer doesn't load, but the rest of the site works as expected.

@klassenjs
Copy link
Member

And maybe a ! or something in the catalog next to the bad layer? Or maybe a console.error/console.warning with more info for the admin of what happened.

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

No branches or pull requests

2 participants