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

CustomLayer visible prop has no effect #94

Closed
m9dfukc opened this issue Aug 23, 2023 · 3 comments
Closed

CustomLayer visible prop has no effect #94

m9dfukc opened this issue Aug 23, 2023 · 3 comments

Comments

@m9dfukc
Copy link

m9dfukc commented Aug 23, 2023

I have the need for imperatively switching a CustomLayer on and off, unfortunately the visible Prop has no effect here and results in a thrown error if switched dynamically with a signal:

Error: The layer 'cl-168' does not exist in the map's style and cannot be styled.

@KaiHuebner
Copy link
Contributor

Thanks for reporting this issue. Fixed in the latest version.

@m9dfukc
Copy link
Author

m9dfukc commented Sep 13, 2023

Hi. Are you sure this is fixed? Doesn't work for me, not with CustomLayers neither with "regular" layers.

@KaiHuebner
Copy link
Contributor

Please have a look at this example
It shows you the two ways you can toggle layer visibility.

I found a minor issue with static boolean values but it works fine with reactive props (signals, stores).
I will try to fix the static value issue.

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