Closed ansarikhurshid786 closed 5 years ago
Show / Hide a layer programmatically? @agius @zugaldia can you help me ?
My question is related to this issue https://github.com/agius/react-native-mapbox-gl/issues/789. I don't know how to show and hide layer.
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
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
@pinpong I will try your given example and let you know.
@pinpong filter is not helpful for me.
I got solution. I put solution at https://stackoverflow.com/questions/55036420/how-to-show-hide-raster-layer-visibility-property-visible-none-at-run-time-in
I am new using react native mapbox gl. I can't find how to change raster layer visibility property at runtime?