MTMapOptions

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.


constructor(projection: MTProjectionType?, space: MTSpaceOption?)

Initializes map options with projection and space option.


constructor(space: MTSpace)

Convenience: configuration-only space.


constructor(spaceEnabled: Boolean)

Convenience: enable space with default preset.


constructor(halo: MTHalo)

Convenience: configuration-only halo.


constructor(halo: MTHaloOption?)

Convenience: pass halo option directly (enabled or config).


constructor(projection: MTProjectionType?, halo: MTHaloOption?)

Convenience: projection + halo option (enabled or config).


constructor(language: MTLanguage? = null, center: LngLat? = null, projection: MTProjectionType? = null, zoom: Double? = null, maxZoom: Double? = null, minZoom: Double? = null, bearing: Double? = null, bearingSnap: Double? = null, pitch: Double? = null, maxPitch: Double? = null, minPitch: Double? = null, roll: Double? = null, rollIsEnabled: Boolean? = null, elevation: Double? = null, terrainIsEnabled: Boolean? = null, terrainExaggeration: Double? = null, cancelPendingTileRequestsWhileZooming: Boolean? = null, isCenterClampedToGround: Boolean? = null, shouldCollectResourceTiming: Boolean? = null, crossSourceCollisionsAreEnabled: Boolean? = null, fadeDuration: Double? = null, isInteractionEnabled: Boolean? = null, logoPosition: MTMapCorner? = MTMapCorner.TOP_LEFT, maptilerLogoIsVisible: Boolean? = null, maxTileCacheSize: Double? = null, maxTileCacheZoomLevels: Double? = null, shouldPitchWithRotate: Boolean? = null, shouldRefreshExpiredTiles: Boolean? = null, shouldRenderWorldCopies: Boolean? = null, shouldDragToPitch: Boolean? = null, shouldPinchToRotateAndZoom: Boolean? = null, doubleTapShouldZoom: Boolean? = null, dragPanIsEnabled: Boolean? = null, dragRotateIsEnabled: Boolean? = null, shouldValidateStyle: Boolean? = null, minimapIsVisible: Boolean? = false, attributionControlIsVisible: Boolean? = null, geolocateControlIsVisible: Boolean? = false, navigationControlIsVisible: Boolean? = false, projectionControlIsVisible: Boolean? = false, scaleControlIsVisible: Boolean? = false, terrainControlIsVisible: Boolean? = false, space: MTSpaceOption? = null, halo: MTHaloOption? = null, isSessionLogicEnabled: Boolean = true)

Flexible constructor: all options optional so you can mix and match with named args.

Example usages:

  • MTMapOptions(projection = MTProjectionType.GLOBE, space = MTSpaceOption.Enabled, halo = MTHaloOption.Enabled)

  • MTMapOptions(projection = MTProjectionType.GLOBE, halo = MTHaloOption.Config(MTHalo(scale = 1.2)))

  • MTMapOptions(center = LngLat(14.4, 50.1), zoom = 6.0, pitch = 45.0)