---
title: "handleLayerVisibilityByHeight()"
canonical: "https://onesaitplatform.refined.site/space/DOCT/2220801208/handleLayerVisibilityByHeight()"
format: markdown
---
> ℹ️ **Information**
> ℹ️ 
> ℹ️ Implementation version: beta 1.08
> ℹ️ 
> ℹ️ Updated in: beta 1.10

# Description

Modifuies the visibility of a layer in a range of heights.

# Invocation

```javascript
handleLayerVisibilityByHeight(
	layerList,
	visibilityOption,
	maxHeight,
	minHeight
)
```

# Input parameteres

## layerList

List of names of the layers to which to apply this visual restriction. It consists of a list of text strings with the name of the layers to take into account (featureCollection.name).

## visibilityOption

Parameter collecting whether you want to show or hide the layer in the given range. It is received as a text string, accepting one of these two options:

1. **show**: to show the layer in that range.
2. **hide**: to hide the layer in that range.

## maxHeight

Numerical value with the maximum altitude of the display range.

## minHeight

Numerical value with the minimum altitude of the display range.

# Use examples

Hide a layer of points below 1,000 meters and above 4,000 meters; in other words, it is only seen between 1,000 and 4,000 meters.

```javascript
handleLayerVisibilityByHeight(
	['points single'],
	'show',
	4000,
	1000
)
```

![image](media://c12ce15b-be7b-45ab-b6e6-542c5e39640c)