Enumeration

mapkit.FeatureVisibility

Constants indicating the visibility of different adaptive map features.

Declaration

interface mapkit.FeatureVisibility {
    const String Adaptive;
    const String Hidden;
    const String Visible;
};

Overview

Indicates whether adaptive features like the scale, compass, and annotation title and subtitle text are hidden, visible, or adaptive. The display of an adaptive feature depends on the current map state. Controls that are not adaptive, such as the map type control or zoom controls, can be shown or hidden by setting map properties to true or false, respectively.

To show the compass only when map rotation is changing and hide the zoom controls:

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

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

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

Topics

Feature Visibility Values

mapkit.FeatureVisibility.Adaptive

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

mapkit.FeatureVisibility.Hidden

A constant indicating that the feature is always hidden.

mapkit.FeatureVisibility.Visible

A constant indicating that the feature is always visible.

See Also

Map View Customization

mapkit.Padding

The values that define content padding within the map view frame.