<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/FeatureVisibility",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "enum/mapkit.FeatureVisibility"
  },
  "title" : "FeatureVisibility"
}
-->

# FeatureVisibility

Constants indicating the visibility of different adaptive map features.

```
const FeatureVisibility: Readonly<{
    readonly Adaptive: "adaptive";
    readonly Hidden: "hidden";
    readonly Visible: "visible";
}>
type FeatureVisibility =
    (typeof FeatureVisibility)[keyof typeof FeatureVisibility];
```

## Overview

Indicates whether the map shows adaptive features like the scale, compass, and annotation title and subtitle text. The display of an adaptive feature depends on the current map state. You can show or hide controls that aren’t adaptive, such as the map type control or zoom controls, by setting map properties to `true` or `false`, respectively.

The following example shows the compass only when the map rotation is changing, and hides the zoom controls:

```javascript
// Create a map.
const map = new mapkit.Map("my-map-element-id");

// Show the compass only when the rotation is actively changing.
map.showsCompass = mapkit.FeatureVisibility.Adaptive;

// Hide the zoom controls.
map.showsZoomControl = false;
```

## Topics

### Feature visibility values

[`readonly Adaptive: "adaptive";`](/documentation/MapKitJS/FeatureVisibility/Adaptive)

A constant indicating that feature visibility adapts to the current map state.

[`readonly Hidden: "hidden";`](/documentation/MapKitJS/FeatureVisibility/Hidden)

A constant indicating that the feature is always hidden.

[`readonly Visible: "visible";`](/documentation/MapKitJS/FeatureVisibility/Visible)

A constant indicating that the feature is always visible.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)