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

# Adaptive

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

```
readonly Adaptive: "adaptive";
```

## Discussion

Use `mapkit.FeatureVisibility.Adaptive` to show adaptive controls only when the map is in a given state. You can show or hide controls that aren’t adaptive by setting map properties to `true` or `false`, respectively.

The following example sets the adaptive visibility for the compass and scale, and hides the map type and 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;

// Show the scale only when the zoom level is actively changing.
map.showsScale = mapkit.FeatureVisibility.Adaptive;

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

---

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)