How to show/hide a PictureMarkerSymbol in ArcGIS API for JavaScript? You can take this example: https://developers.arcgis.com/javascript/latest/sample-code/satellites-3d/ . I would like to show/hide the satellites on the globe by clicking in a button.
Solved! Go to Solution.
Here's an example of how to use LayerList within the context of the satellites sample: https://codepen.io/kekenes/pen/abEdJjo?editors=100
You can use the LayerList widget
https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-LayerList.html
Here's an example of how to use LayerList within the context of the satellites sample: https://codepen.io/kekenes/pen/abEdJjo?editors=100
do you know how to disable LayerList for one of these elements(layers)? for example satellite tracks
You need to set the visibilityMode of the layer to "hide" https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#listMode
do you know if there's an way to show/hide two or more layers in the same time when showing/hiding one of them? maybe connecting them somehow.
Thank you guys!