MTMapOptions

@Serializable
class MTMapOptions

Parameters of the map object.

Constructors

constructor(center: LngLat?, zoom: Double?, bearing: Double?, pitch: Double?)

Initializes map options with center, zoom, bearing, and pitch.

constructor(center: LngLat?, zoom: Double?)

Initializes map options with center and zoom.

constructor(center: LngLat?, zoom: Double?, language: MTLanguage)

Initializes map options with center, zoom and language.

constructor(center: LngLat?, zoom: Double?, terrainIsEnabled: Boolean?, terrainExaggeration: Double?)

Initializes map options with center, zoom and terrain.

constructor(center: LngLat?, zoom: Double?, projection: MTProjectionType?)

Initializes map options with center, zoom and projection.

constructor()

Full constructor with optional parameters for all properties.

Properties

@SerialName(value = "attributionControl")
var attributionControlIsVisible: Boolean?

Boolean indicating whether attribution control is added directly to the map.

The bearing of the map, measured in degrees counter-clockwise from north.

The threshold, measured in degrees, that determines when the map's bearing will snap to north.

Determines whether to cancel, or retain, tiles from the current viewport which are still loading but which belong to a farther (smaller) zoom level than the current one.

The geographical centerpoint of the map.

@SerialName(value = "crossSourceCollisions")
var crossSourceCollisionsAreEnabled: Boolean?

Boolean indicating whether cross source collisions are enabled.

@SerialName(value = "doubleClickZoom")
var doubleTapShouldZoom: Boolean?

Boolean indicating whether the double tap to zoom interaction is enabled.

@SerialName(value = "dragPan")
var dragPanIsEnabled: Boolean?

Boolean indicating whether the drag to pan interaction is enabled.

@SerialName(value = "dragRotate")
var dragRotateIsEnabled: Boolean?

Boolean indicating whether the drag to rotate interaction is enabled.

The elevation of the geographical centerpoint of the map, in meters above sea level.

The duration of the fade-in/fade-out animation for label collisions, in milliseconds.

@SerialName(value = "geolocateControl")
var geolocateControlIsVisible: Boolean?

Boolean indicating whether geolocate control is added directly to the map.

@SerialName(value = "centerClampedToGround")
var isCenterClampedToGround: Boolean?

Boolean indicating whether center is clamped to the ground.

@SerialName(value = "interactive")
var isInteractionEnabled: Boolean?

Boolean indicating whether interaction on the map is enabled.

Boolean indicating whether session logic is enabled.

The language of the map.

A value representing the position of the MapTiler wordmark on the map.

@SerialName(value = "maptilerLogo")
var maptilerLogoIsVisible: Boolean?

Boolean indicating whether MapTiler logo is visible on the map.

The maximum pitch of the map (0-180).

The maximum number of tiles stored in the tile cache for a given source.

The maximum number of zoom levels for which to store tiles for a given source.

The maximum zoom level of the map (0-24).

@SerialName(value = "minimap")
var minimapIsVisible: Boolean?

Boolean indicating whether minimap control is added directly to the map.

The minimum pitch of the map (0-85).

The minimum zoom level of the map (0-24).

@SerialName(value = "navigationControl")
var navigationControlIsVisible: Boolean?

Boolean indicating whether navigation control is added directly to the map.

The pitch (tilt) of the map, measured in degrees away from the plane of the screen (0-85).

Projection type of the map object.

@SerialName(value = "projectionControl")
var projectionControlIsVisible: Boolean?

Boolean indicating whether projection control is added directly to the map.

var roll: Double?

The roll angle of the map, measured in degrees counter-clockwise about the camera boresight.

@SerialName(value = "rollEnabled")
var rollIsEnabled: Boolean?

Boolean indicating whether the map's roll control with "drag to rotate" interaction is enabled.

@SerialName(value = "scaleControl")
var scaleControlIsVisible: Boolean?

Boolean indicating whether scale control is added directly to the map.

@SerialName(value = "collectResourceTiming")
var shouldCollectResourceTiming: Boolean?

Boolean indicating whether Resource Timing API information will be collected.

@SerialName(value = "touchPitch")
var shouldDragToPitch: Boolean?

Boolean indicating whether the drag to pitch" interaction is enabled.

@SerialName(value = "touchZoomRotate")
var shouldPinchToRotateAndZoom: Boolean?

Boolean indicating whether the pinch to rotate and zoom interaction is enabled.

@SerialName(value = "pitchWithRotate")
var shouldPitchWithRotate: Boolean?

Boolean indicating whether the map's pitch control with drag to rotate interaction will be disabled.

@SerialName(value = "refreshExpiredTiles")
var shouldRefreshExpiredTiles: Boolean?

Boolean indicating whether the map won't attempt to re-request tiles once they expire.

@SerialName(value = "renderWorldCopies")
var shouldRenderWorldCopies: Boolean?

Boolean indicating whether multiple copies of the world will be rendered side by side beyond -180 and 180 degrees longitude.

Boolean indicating whether style should be validated.

@SerialName(value = "terrainControl")
var terrainControlIsVisible: Boolean?

Boolean indicating whether terrain control is added directly to the map.

3D terrain exaggeration factor.

@SerialName(value = "terrain")
var terrainIsEnabled: Boolean?

Boolean indicating whether 3D terrain is enabled.

var zoom: Double?

The zoom level of the map.