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

How to change raster layer visibility property at run time #1528

Closed
ansarikhurshid786 opened this issue Mar 7, 2019 · 7 comments
Closed

Comments

@ansarikhurshid786
Copy link

I am new using react native mapbox gl. I can't find how to change raster layer visibility property at runtime?

@ansarikhurshid786
Copy link
Author

ansarikhurshid786 commented Mar 7, 2019

Show / Hide a layer programmatically?
@agius @zugaldia can you help me ?

@ansarikhurshid786
Copy link
Author

My question is related to this issue #789. I don't know how to show and hide layer.

@pinpong
Copy link

pinpong commented Mar 7, 2019

Did you tried to use a filter?
Here is a good example https://github.com/agius/react-native-mapbox-gl/blob/master/example/src/components/EarthQuakes.js

@ansarikhurshid786
Copy link
Author

I have added sources and layers in custom style of map and layout visibility is none. I want dynamic toggle at run time. You can see question at stackoverflow https://stackoverflow.com/questions/55036420/how-to-show-hide-raster-layer-visibility-property-visible-none-at-run-time-in

@ansarikhurshid786
Copy link
Author

@pinpong I will try your given example and let you know.

@ansarikhurshid786
Copy link
Author

ansarikhurshid786 commented Mar 9, 2019

@pinpong filter is not helpful for me.

@ansarikhurshid786
Copy link
Author

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