---
title: "VisibilityExpression | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface VisibilityExpression

interface VisibilityExpression {  
    [evaluate](#evaluate): () \=> "none" | "visible";  
    [getGlobalStateRefs](#getglobalstaterefs): () \=> Set<string\>;  
    [setValue](#setvalue): (visibility: [VisibilitySpecification](https://docs.maptiler.com/sdk-js/api-reference/types/VisibilitySpecification/)) \=> void;  
}

##### Index

### Properties[](#properties)

[evaluate](#evaluate) [getGlobalStateRefs](#getglobalstaterefs) [setValue](#setvalue)

## Properties[](#properties-1)

### evaluate[](#evaluate)

evaluate: () \=> "none" | "visible"

Evaluates the visibility expression and returns either 'visible' or 'none'.

### getGlobalStateRefs[](#getglobalstaterefs)

getGlobalStateRefs: () \=> Set<string\>

Returns the set of global state properties referenced by the expression.

### setValue[](#setvalue)

setValue: (visibility: [VisibilitySpecification](https://docs.maptiler.com/sdk-js/api-reference/types/VisibilitySpecification/)) \=> void

Updates the visibility specification.
