/
showHideLayersByType()
showHideLayersByType()
Information
Implementation version: beta 1.01
Updated in: beta 1.09
Description
Shows or hides all the layers of a particular type, or of all the types.
Invocation
showHideLayersByType( showProperty, layerType )
Input parameters
showProperty
parameter collecting whether you want to show or hide the layers. This parameter is entered as a text string, and can be:
- show: to show the layers of that type.
- hide: to hide the layers of that type.
layerType
Parameter that includes the type of layers whose visibility you want to modify. This parameter is also entered as a text string, and accepts one of the following options:
- all: to consider all types of layers.
- dataSources: to modify only the entities contained in dataSources.
- entities: to modify only the entities contained in the viewer and outside a dataSource.
- heatmaps: to modify only heat maps.
- primitives: to modify only the primitives contained in the viewer's scene.
Use examples
Hide all types of layers present on the map:
showHideLayersByType( 'hide', 'all' )
Show all types of layers present on the map:
showHideLayersByType( 'hide', 'all' )
Examples symbology
City icons (aquamarine color) are entities contained in a dataSource; red dots are primitive; and the purple image corresponds to a heat map.
Hide only entity dataSources:
showHideLayersByType( 'hide', 'dataSources' )
Show only entity dataSources:
showHideLayersByType( 'show', 'dataSources' )
, multiple selections available,
Related content
showHideLayerByName()
showHideLayerByName()
More like this
(ES) showHideLayerByName()
(ES) showHideLayerByName()
More like this
handleLayerVisibilityByHeight()
handleLayerVisibilityByHeight()
More like this
layerVisibilitySelectorCheckbox()
layerVisibilitySelectorCheckbox()
More like this
(ES) handleLayerVisibilityByHeight()
(ES) handleLayerVisibilityByHeight()
More like this
updateLayer()
updateLayer()
More like this