---
title: "MinimapOptions | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface MinimapOptions

Construct a type with the properties of T except for those in type K.

interface MinimapOptions {  
    [anisotropicFilterPitch](#anisotropicfilterpitch)?: number | null;  
    [apiKey](#apikey)?: string;  
    [aroundCenter](#aroundcenter)?: boolean;  
    [attributionControl](#attributioncontrol)?: [AttributionControlOptions](https://docs.maptiler.com/sdk-js/api-reference/interfaces/AttributionControlOptions/);  
    [bearing](#bearing)?: number;  
    [bearingSnap](#bearingsnap)?: number;  
    [bounds](#bounds)?: [LngLatBoundsLike](https://docs.maptiler.com/sdk-js/api-reference/types/LngLatBoundsLike/);  
    [boxZoom](#boxzoom)?: boolean | [BoxZoomHandlerOptions](https://docs.maptiler.com/sdk-js/api-reference/types/BoxZoomHandlerOptions/);  
    [cancelPendingTileRequestsWhileZooming](#cancelpendingtilerequestswhilezooming)?: boolean;  
    [canvasContextAttributes](#canvascontextattributes)?: [WebGLContextAttributesWithType](https://docs.maptiler.com/sdk-js/api-reference/types/WebGLContextAttributesWithType/);  
    [center](#center)?: [LngLatLike](https://docs.maptiler.com/sdk-js/api-reference/types/LngLatLike/);  
    [centerClampedToGround](#centerclampedtoground)?: boolean;  
    [clickTolerance](#clicktolerance)?: number;  
    [collectResourceTiming](#collectresourcetiming)?: boolean;  
    [container](#container): string | [HTMLElement](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLElement/);  
    [containerStyle](#containerstyle): [Record](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Record/)<string, string\>;  
    [cooperativeGestures](#cooperativegestures)?: boolean;  
    [crossSourceCollisions](#crosssourcecollisions)?: boolean;  
    [customAttribution](#customattribution)?: string | string\[\];  
    [customControls](#customcontrols)?: string | boolean;  
    [doubleClickZoom](#doubleclickzoom)?: boolean;  
    [dragPan](#dragpan)?: boolean | [DragPanOptions](https://docs.maptiler.com/sdk-js/api-reference/types/DragPanOptions/);  
    [dragRotate](#dragrotate)?: boolean;  
    [elevation](#elevation)?: number;  
    [experimentalZoomLevelsToOverscale](#experimentalzoomlevelstooverscale)?: number;  
    [fadeDuration](#fadeduration)?: number;  
    [fitBoundsOptions](#fitboundsoptions)?: [FitBoundsOptions](https://docs.maptiler.com/sdk-js/api-reference/types/FitBoundsOptions/);  
    [forceNoAttributionControl](#forcenoattributioncontrol)?: boolean;  
    [fullscreenControl](#fullscreencontrol)?: boolean | [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/);  
    [geolocate](#geolocate)?: boolean | "POINT" | "COUNTRY";  
    [geolocateControl](#geolocatecontrol)?: boolean | [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/);  
    [hash](#hash)?: string | boolean;  
    [interactive](#interactive)?: boolean;  
    [keyboard](#keyboard)?: boolean;  
    [language](#language)?: string | [LanguageInfo](https://docs.maptiler.com/sdk-js/api-reference/types/LanguageInfo/);  
    [locale](#locale)?: [Record](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Record/)<string, string\>;  
    [localIdeographFontFamily](#localideographfontfamily)?: string | false;  
    [logoPosition](#logoposition)?: [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/);  
    [logSDKVersion](#logsdkversion)?: boolean;  
    [maptilerLogo](#maptilerlogo)?: boolean;  
    [maxBounds](#maxbounds)?: [LngLatBoundsLike](https://docs.maptiler.com/sdk-js/api-reference/types/LngLatBoundsLike/);  
    [maxCanvasSize](#maxcanvassize)?: \[number, number\];  
    [maxPitch](#maxpitch)?: number | null;  
    [maxTileCacheSize](#maxtilecachesize)?: number | null;  
    [maxTileCacheZoomLevels](#maxtilecachezoomlevels)?: number;  
    [maxZoom](#maxzoom)?: number | null;  
    [minimap](#minimap)?: boolean | [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/) | [MinimapOptionsInput](https://docs.maptiler.com/sdk-js/api-reference/interfaces/MinimapOptionsInput/);  
    [minPitch](#minpitch)?: number | null;  
    [minZoom](#minzoom)?: number | null;  
    [navigationControl](#navigationcontrol)?: boolean | [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/);  
    [parentRect](#parentrect)?: [ParentRect](https://docs.maptiler.com/sdk-js/api-reference/interfaces/ParentRect/);  
    [pitch](#pitch)?: number;  
    [pitchAdjust](#pitchadjust): boolean;  
    [pitchWithRotate](#pitchwithrotate)?: boolean;  
    [pixelRatio](#pixelratio)?: number;  
    [projection](#projection)?: [ProjectionTypes](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.ProjectionTypes/);  
    [projectionControl](#projectioncontrol)?: boolean | [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/);  
    [reduceMotion](#reducemotion)?: boolean;  
    [refreshExpiredTiles](#refreshexpiredtiles)?: boolean;  
    [renderWorldCopies](#renderworldcopies)?: boolean;  
    [roll](#roll)?: number;  
    [rollEnabled](#rollenabled)?: boolean;  
    [rtlTextPlugin](#rtltextplugin)?: string | boolean;  
    [scaleControl](#scalecontrol)?: boolean | [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/);  
    [scrollZoom](#scrollzoom)?: boolean | [AroundCenterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/AroundCenterOptions/);  
    [style](#style)?: string | [StyleSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSpecification/) | [ReferenceMapStyle](https://docs.maptiler.com/sdk-js/api-reference/classes/ReferenceMapStyle/) | [MapStyleVariant](https://docs.maptiler.com/sdk-js/api-reference/classes/MapStyleVariant/);  
    [terrain](#terrain)?: boolean;  
    [terrainControl](#terraincontrol)?: boolean | [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/);  
    [terrainExaggeration](#terrainexaggeration)?: number;  
    [touchPitch](#touchpitch)?: boolean | [AroundCenterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/AroundCenterOptions/);  
    [touchZoomRotate](#touchzoomrotate)?: boolean | [AroundCenterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/AroundCenterOptions/);  
    [trackResize](#trackresize)?: boolean;  
    [transformCameraUpdate](#transformcameraupdate)?: [CameraUpdateTransformFunction](https://docs.maptiler.com/sdk-js/api-reference/types/CameraUpdateTransformFunction/) | null;  
    [transformConstrain](#transformconstrain)?: [TransformConstrainFunction](https://docs.maptiler.com/sdk-js/api-reference/types/TransformConstrainFunction/) | null;  
    [transformRequest](#transformrequest)?: [RequestTransformFunction](https://docs.maptiler.com/sdk-js/api-reference/types/RequestTransformFunction/) | null;  
    [useExperimentalTilePreloading](#useexperimentaltilepreloading)?: boolean;  
    [validateStyle](#validatestyle)?: boolean;  
    [zoom](#zoom)?: number;  
    [zoomAdjust](#zoomadjust): number;  
    [zoomSnap](#zoomsnap)?: number;  
}

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#MinimapOptions))

-   [Omit](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Omit/)<[MapOptions](https://docs.maptiler.com/sdk-js/api-reference/types/MapOptions/), "space" | "halo"\>
    -   MinimapOptions

##### Index

### Properties[](#properties)

[anisotropicFilterPitch?](#anisotropicfilterpitch) [apiKey?](#apikey) [aroundCenter?](#aroundcenter) [attributionControl?](#attributioncontrol) [bearing?](#bearing) [bearingSnap?](#bearingsnap) [bounds?](#bounds) [boxZoom?](#boxzoom) [cancelPendingTileRequestsWhileZooming?](#cancelpendingtilerequestswhilezooming) [canvasContextAttributes?](#canvascontextattributes) [center?](#center) [centerClampedToGround?](#centerclampedtoground) [clickTolerance?](#clicktolerance) [collectResourceTiming?](#collectresourcetiming) [container](#container) [containerStyle](#containerstyle) [cooperativeGestures?](#cooperativegestures) [crossSourceCollisions?](#crosssourcecollisions) [customAttribution?](#customattribution) [customControls?](#customcontrols) [doubleClickZoom?](#doubleclickzoom) [dragPan?](#dragpan) [dragRotate?](#dragrotate) [elevation?](#elevation) [experimentalZoomLevelsToOverscale?](#experimentalzoomlevelstooverscale) [fadeDuration?](#fadeduration) [fitBoundsOptions?](#fitboundsoptions) [forceNoAttributionControl?](#forcenoattributioncontrol) [fullscreenControl?](#fullscreencontrol) [geolocate?](#geolocate) [geolocateControl?](#geolocatecontrol) [hash?](#hash) [interactive?](#interactive) [keyboard?](#keyboard) [language?](#language) [locale?](#locale) [localIdeographFontFamily?](#localideographfontfamily) [logoPosition?](#logoposition) [logSDKVersion?](#logsdkversion) [maptilerLogo?](#maptilerlogo) [maxBounds?](#maxbounds) [maxCanvasSize?](#maxcanvassize) [maxPitch?](#maxpitch) [maxTileCacheSize?](#maxtilecachesize) [maxTileCacheZoomLevels?](#maxtilecachezoomlevels) [maxZoom?](#maxzoom) [minimap?](#minimap) [minPitch?](#minpitch) [minZoom?](#minzoom) [navigationControl?](#navigationcontrol) [parentRect?](#parentrect) [pitch?](#pitch) [pitchAdjust](#pitchadjust) [pitchWithRotate?](#pitchwithrotate) [pixelRatio?](#pixelratio) [projection?](#projection) [projectionControl?](#projectioncontrol) [reduceMotion?](#reducemotion) [refreshExpiredTiles?](#refreshexpiredtiles) [renderWorldCopies?](#renderworldcopies) [roll?](#roll) [rollEnabled?](#rollenabled) [rtlTextPlugin?](#rtltextplugin) [scaleControl?](#scalecontrol) [scrollZoom?](#scrollzoom) [style?](#style) [terrain?](#terrain) [terrainControl?](#terraincontrol) [terrainExaggeration?](#terrainexaggeration) [touchPitch?](#touchpitch) [touchZoomRotate?](#touchzoomrotate) [trackResize?](#trackresize) [transformCameraUpdate?](#transformcameraupdate) [transformConstrain?](#transformconstrain) [transformRequest?](#transformrequest) [useExperimentalTilePreloading?](#useexperimentaltilepreloading) [validateStyle?](#validatestyle) [zoom?](#zoom) [zoomAdjust](#zoomadjust) [zoomSnap?](#zoomsnap)

## Properties[](#properties-1)

### `Optional`anisotropicFilterPitch[](#anisotropicfilterpitch)

anisotropicFilterPitch?: number | null

The pitch above which to apply anisotropic filtering to the map's raster layers (0-180).

#### Default Value[](#default-value)

```typescript
20
```

Inherited from Omit.anisotropicFilterPitch

### `Optional`apiKey[](#apikey)

apiKey?: string

Define the MapTiler Cloud API key to be used. This is strictly equivalent to setting `config.apiKey` and will overwrite it.

Inherited from Omit.apiKey

### `Optional`aroundCenter[](#aroundcenter)

aroundCenter?: boolean

Determines the rotation interaction model:

-   When true: Uses "Orbital" logic where rotation is relative to the pivot center. Dragging right at the top rotates clockwise, while dragging right at the bottom rotates counter-clockwise (like spinning a physical globe).
-   When false: Uses "Linear" logic where horizontal mouse movement translates directly to bearing change regardless of cursor position.

Inherited from Omit.aroundCenter

### `Optional`attributionControl[](#attributioncontrol)

attributionControl?: [AttributionControlOptions](https://docs.maptiler.com/sdk-js/api-reference/interfaces/AttributionControlOptions/)

Options for an [AttributionControl](https://docs.maptiler.com/sdk-js/api-reference/classes/AttributionControl/).

Inherited from Omit.attributionControl

### `Optional`bearing[](#bearing)

bearing?: number

The initial bearing (rotation) of the map, measured in degrees counter-clockwise from north. If `bearing` is not specified in the constructor options, MapLibre GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `0`.

#### Default Value[](#default-value-1)

```typescript
0
```

Inherited from Omit.bearing

### `Optional`bearingSnap[](#bearingsnap)

bearingSnap?: number

The threshold, measured in degrees, that determines when the map's bearing will snap to north. For example, with a `bearingSnap` of 7, if the user rotates the map within 7 degrees of north, the map will automatically snap to exact north.

#### Default Value[](#default-value-2)

```typescript
7
```

Inherited from Omit.bearingSnap

### `Optional`bounds[](#bounds)

bounds?: [LngLatBoundsLike](https://docs.maptiler.com/sdk-js/api-reference/types/LngLatBoundsLike/)

The initial bounds of the map. If `bounds` is specified, it overrides `center` and `zoom` constructor options.

Inherited from Omit.bounds

### `Optional`boxZoom[](#boxzoom)

boxZoom?: boolean | [BoxZoomHandlerOptions](https://docs.maptiler.com/sdk-js/api-reference/types/BoxZoomHandlerOptions/)

If `true`, the "box zoom" interaction is enabled (see [BoxZoomHandler](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.BoxZoomHandler/)). An `Object` value configures [BoxZoomHandler](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.BoxZoomHandler/) options. If `boxZoomEnd` is provided, the callback runs instead of the default fit-to-box zoom.

#### Default Value[](#default-value-3)

```typescript
true
```

Inherited from Omit.boxZoom

### `Optional`cancelPendingTileRequestsWhileZooming[](#cancelpendingtilerequestswhilezooming)

cancelPendingTileRequestsWhileZooming?: boolean

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.

-   If `true`, when zooming in, tiles which didn't manage to load for previous zoom levels will become canceled. This might save some computing resources for slower devices, but the map details might appear more abruptly at the end of the zoom.
-   If `false`, when zooming in, the previous zoom level(s) tiles will progressively appear, giving a smoother map details experience. However, more tiles will be rendered in a short period of time.

#### Default Value[](#default-value-4)

```typescript
true
```

Inherited from Omit.cancelPendingTileRequestsWhileZooming

### `Optional`canvasContextAttributes[](#canvascontextattributes)

canvasContextAttributes?: [WebGLContextAttributesWithType](https://docs.maptiler.com/sdk-js/api-reference/types/WebGLContextAttributesWithType/)

Set of WebGLContextAttributes that are applied to the WebGL context of the map. See [https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext) for more details. `contextType` can be set to `webgl2` or `webgl` to force a WebGL version. Not setting it, Maplibre will do it's best to get a suitable context.

#### Default Value[](#default-value-5)

```typescript
antialias: false, powerPreference: 'high-performance', preserveDrawingBuffer: false, failIfMajorPerformanceCaveat: false, desynchronized: false, contextType: 'webgl2withfallback'
```

Inherited from Omit.canvasContextAttributes

### `Optional`center[](#center)

center?: [LngLatLike](https://docs.maptiler.com/sdk-js/api-reference/types/LngLatLike/)

The initial geographical centerpoint of the map. If `center` is not specified in the constructor options, MapLibre GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `[0, 0]` !!! note MapLibre GL JS uses longitude, latitude coordinate order (as opposed to latitude, longitude) to match GeoJSON.

#### Default Value[](#default-value-6)

```json
[0, 0]
```

Inherited from Omit.center

### `Optional`centerClampedToGround[](#centerclampedtoground)

centerClampedToGround?: boolean

If true, the elevation of the center point will automatically be set to the terrain elevation (or zero if terrain is not enabled). If false, the elevation of the center point will default to sea level and will not automatically update. Defaults to true. Needs to be set to false to keep the camera above ground when pitch > 90 degrees.

Inherited from Omit.centerClampedToGround

### `Optional`clickTolerance[](#clicktolerance)

clickTolerance?: number

The max number of pixels a user can shift the mouse pointer during a click for it to be considered a valid click (as opposed to a mouse drag).

#### Default Value[](#default-value-7)

```typescript
3
```

Inherited from Omit.clickTolerance

### `Optional`collectResourceTiming[](#collectresourcetiming)

collectResourceTiming?: boolean

If `true`, Resource Timing API information will be collected for requests made by GeoJSON and Vector Tile web workers (this information is normally inaccessible from the main Javascript thread). Information will be returned in a `resourceTiming` property of relevant `data` events.

#### Default Value[](#default-value-8)

```typescript
false
```

Inherited from Omit.collectResourceTiming

### container[](#container)

container: string | [HTMLElement](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLElement/)

The HTML element in which MapLibre GL JS will render the map, or the element's string `id`. The specified element must have no children.

Inherited from Omit.container

### containerStyle[](#containerstyle)

containerStyle: [Record](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Record/)<string, string\>

### `Optional`cooperativeGestures[](#cooperativegestures)

cooperativeGestures?: boolean

If `true` or set to an options object, the map is only accessible on desktop while holding Command/Ctrl and only accessible on mobile with two fingers. Interacting with the map using normal gestures will trigger an informational screen. With this option enabled, "drag to pitch" requires a three-finger gesture. Cooperative gestures are disabled when a map enters fullscreen using [FullscreenControl](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.FullscreenControl/).

#### Default Value[](#default-value-9)

```typescript
false
```

Inherited from Omit.cooperativeGestures

### `Optional`crossSourceCollisions[](#crosssourcecollisions)

crossSourceCollisions?: boolean

If `true`, symbols from multiple sources can collide with each other during collision detection. If `false`, collision detection is run separately for the symbols in each source.

#### Default Value[](#default-value-10)

```typescript
true
```

Inherited from Omit.crossSourceCollisions

### `Optional`customAttribution[](#customattribution)

customAttribution?: string | string\[\]

Attributions to show in addition to any other attributions in an [AttributionControl](https://docs.maptiler.com/sdk-js/api-reference/classes/AttributionControl/).

Inherited from Omit.customAttribution

### `Optional`customControls[](#customcontrols)

customControls?: string | boolean

Detect custom external controls. (default: `false`, will detect automatically if `true`)

Inherited from Omit.customControls

### `Optional`doubleClickZoom[](#doubleclickzoom)

doubleClickZoom?: boolean

If `true`, the "double click to zoom" interaction is enabled (see [DoubleClickZoomHandler](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.DoubleClickZoomHandler/)).

#### Default Value[](#default-value-11)

```typescript
true
```

Inherited from Omit.doubleClickZoom

### `Optional`dragPan[](#dragpan)

dragPan?: boolean | [DragPanOptions](https://docs.maptiler.com/sdk-js/api-reference/types/DragPanOptions/)

If `true`, the "drag to pan" interaction is enabled. An `Object` value is passed as options to [DragPanHandler.enable](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.DragPanHandler/#enable).

#### Default Value[](#default-value-12)

```typescript
true
```

Inherited from Omit.dragPan

### `Optional`dragRotate[](#dragrotate)

dragRotate?: boolean

If `true`, the "drag to rotate" interaction is enabled (see [DragRotateHandler](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.DragRotateHandler/)).

#### Default Value[](#default-value-13)

```typescript
true
```

Inherited from Omit.dragRotate

### `Optional`elevation[](#elevation)

elevation?: number

The elevation of the initial geographical centerpoint of the map, in meters above sea level. If `elevation` is not specified in the constructor options, it will default to `0`.

#### Default Value[](#default-value-14)

```typescript
0
```

Inherited from Omit.elevation

### `Optional`experimentalZoomLevelsToOverscale[](#experimentalzoomlevelstooverscale)

experimentalZoomLevelsToOverscale?: number

Allows overzooming by splitting vector tiles after max zoom. Defines the number of zoom level that will overscale from map's max zoom and below. For example if the map's max zoom is 20 and this is set to 3, the zoom levels of 20, 19 and 18 will be overscaled and the rest will be split. When undefined, all zoom levels after source's max zoom will be overscaled. This can help in reducing the size of the overscaling and improve performance in high zoom levels. The drawback is that it changes rendering for polygon centered labels and changes the results of query rendered features.

#### Default Value[](#default-value-15)

```typescript
undefined
```

#### Experimental[](#experimental)

Inherited from Omit.experimentalZoomLevelsToOverscale

### `Optional`fadeDuration[](#fadeduration)

fadeDuration?: number

Controls the duration of the fade-in/fade-out animation for label collisions after initial map load, in milliseconds. This setting affects all symbol layers. This setting does not affect the duration of runtime styling transitions or raster tile cross-fading.

#### Default Value[](#default-value-16)

```typescript
300
```

Inherited from Omit.fadeDuration

### `Optional`fitBoundsOptions[](#fitboundsoptions)

fitBoundsOptions?: [FitBoundsOptions](https://docs.maptiler.com/sdk-js/api-reference/types/FitBoundsOptions/)

A [FitBoundsOptions](https://docs.maptiler.com/sdk-js/api-reference/types/FitBoundsOptions/) options object to use _only_ when fitting the initial `bounds` provided above.

Inherited from Omit.fitBoundsOptions

### `Optional`forceNoAttributionControl[](#forcenoattributioncontrol)

forceNoAttributionControl?: boolean

attributionControl

Inherited from Omit.forceNoAttributionControl

### `Optional`fullscreenControl[](#fullscreencontrol)

fullscreenControl?: boolean | [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/)

Show the full screen control. (default: `false`, will show if `true`)

Inherited from Omit.fullscreenControl

### `Optional`geolocate[](#geolocate)

geolocate?: boolean | "POINT" | "COUNTRY"

Method to position the map at a given geolocation. Only if:

-   `hash` is `false`
-   `center` is not provided

If the value is `true` of `"POINT"` (given by `GeolocationType.POINT`) then the positionning uses the MapTiler Cloud Geolocation to find the non-GPS location point. The zoom level can be provided in the `Map` constructor with the `zoom` option or will be `13` if not provided.

If the value is `"COUNTRY"` (given by `GeolocationType.COUNTRY`) then the map is centered around the bounding box of the country. In this case, the `zoom` option will be ignored.

If the value is `false`, no geolocation is performed and the map centering and zooming depends on other options or on the built-in defaults.

If this option is non-false and the options `center` is also provided, then `center` prevails.

Default: `false`

Inherited from Omit.geolocate

### `Optional`geolocateControl[](#geolocatecontrol)

geolocateControl?: boolean | [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/)

Show the geolocate control. (default: `true`, will hide if `false`)

Inherited from Omit.geolocateControl

### `Optional`hash[](#hash)

hash?: string | boolean

If `true`, the map's position (zoom, center latitude, center longitude, bearing, and pitch) will be synced with the hash fragment of the page's URL. For example, `https://example.com#2.59/39.26/53.07/-24.1/60`.

An additional string may optionally be provided as an alternative to indicate a parameter-styled hash. For example, passing `hash: "foo"` will produce a hash like `https://example.com#foo=2.59/39.26/53.07/-24.1/60`. This is usefull for allowing multiple maps or other state.

#### Default Value[](#default-value-17)

```typescript
false
```

Inherited from Omit.hash

### `Optional`interactive[](#interactive)

interactive?: boolean

If `false`, no mouse, touch, or keyboard listeners will be attached to the map, so it will not respond to interaction.

#### Default Value[](#default-value-18)

```typescript
true
```

Inherited from Omit.interactive

### `Optional`keyboard[](#keyboard)

keyboard?: boolean

If `true`, keyboard shortcuts are enabled (see [KeyboardHandler](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.KeyboardHandler/)).

#### Default Value[](#default-value-19)

```typescript
true
```

Inherited from Omit.keyboard

### `Optional`language[](#language)

language?: string | [LanguageInfo](https://docs.maptiler.com/sdk-js/api-reference/types/LanguageInfo/)

Define the language of the map. This can be done directly with a language ISO code (eg. "en"), the ISO code prepended with the OSM flag (eg. "name:en" or even just "name"), or with a built-in shorthand (eg. Language.ENGLISH). Note that this is equivalent to setting the `config.primaryLanguage` and will overwrite it.

Inherited from Omit.language

### `Optional`locale[](#locale)

locale?: [Record](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Record/)<string, string\>

A patch to apply to the default localization table for UI strings, e.g. control tooltips. The `locale` object maps namespaced UI string IDs to translated strings in the target language; see `src/ui/default_locale.js` for an example with all supported string IDs. The object may specify all UI strings (thereby adding support for a new translation) or only a subset of strings (thereby patching the default translation table). For an example, see [https://maplibre.org/maplibre-gl-js/docs/examples/locale-switching/](https://maplibre.org/maplibre-gl-js/docs/examples/locale-switching/) Alternatively, search the official plugins page for plugins related to localization.

#### Default Value[](#default-value-20)

```typescript
null
```

Inherited from Omit.locale

### `Optional`localIdeographFontFamily[](#localideographfontfamily)

localIdeographFontFamily?: string | false

Defines a CSS font-family for locally overriding generation of Chinese, Japanese, and Korean characters. For these characters, font settings from the map's style will be ignored, except for font-weight keywords (light/regular/medium/bold). Set to `false`, to enable font settings from the map's style for these glyph ranges. The purpose of this option is to avoid bandwidth-intensive glyph server requests.

#### See[](#see)

[Use locally generated ideographs](https://maplibre.org/maplibre-gl-js/docs/examples/use-locally-generated-ideographs/)

#### Default Value[](#default-value-21)

```typescript
'sans-serif'
```

Inherited from Omit.localIdeographFontFamily

### `Optional`logoPosition[](#logoposition)

logoPosition?: [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/)

A string representing the position of the MapLibre wordmark on the map. Valid options are `top-left`,`top-right`, `bottom-left`, or `bottom-right`.

#### Default Value[](#default-value-22)

```typescript
'bottom-left'
```

Inherited from Omit.logoPosition

### `Optional`logSDKVersion[](#logsdkversion)

logSDKVersion?: boolean

Whether to log the SDK version to the console. Default: Unless this is set explicitly to false, the SDK version will be logged to the console.

Inherited from Omit.logSDKVersion

### `Optional`maptilerLogo[](#maptilerlogo)

maptilerLogo?: boolean

Shows or hides the MapTiler logo in the bottom left corner (only for paid plans). Default is `false` for paid plans.

For free plans the MapTiler logo is always visible, and cannot be disabled.

#### Example[](#example)

```typescript
mapTilerLogo: false // hides the logo
```

#### Example[](#example-1)

```typescript
mapTilerLogo: true // shows the logo
```

Inherited from Omit.maptilerLogo

### `Optional`maxBounds[](#maxbounds)

maxBounds?: [LngLatBoundsLike](https://docs.maptiler.com/sdk-js/api-reference/types/LngLatBoundsLike/)

If set, the map will be constrained to the given bounds.

Inherited from Omit.maxBounds

### `Optional`maxCanvasSize[](#maxcanvassize)

maxCanvasSize?: \[number, number\]

The canvas' `width` and `height` max size. The values are passed as an array where the first element is max width and the second element is max height. You shouldn't set this above WebGl `MAX_TEXTURE_SIZE`.

#### Default Value[](#default-value-23)

```typescript
[4096, 4096].
```

Inherited from Omit.maxCanvasSize

### `Optional`maxPitch[](#maxpitch)

maxPitch?: number | null

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

#### Default Value[](#default-value-24)

```typescript
60
```

Inherited from Omit.maxPitch

### `Optional`maxTileCacheSize[](#maxtilecachesize)

maxTileCacheSize?: number | null

The maximum number of tiles stored in the tile cache for a given source. If omitted, the cache will be dynamically sized based on the current viewport which can be set using `maxTileCacheZoomLevels` constructor options.

#### Default Value[](#default-value-25)

```typescript
null
```

Inherited from Omit.maxTileCacheSize

### `Optional`maxTileCacheZoomLevels[](#maxtilecachezoomlevels)

maxTileCacheZoomLevels?: number

The maximum number of zoom levels for which to store tiles for a given source. Tile cache dynamic size is calculated by multiplying `maxTileCacheZoomLevels` with the approximate number of tiles in the viewport for a given source.

#### Default Value[](#default-value-26)

```typescript
5
```

Inherited from Omit.maxTileCacheZoomLevels

### `Optional`maxZoom[](#maxzoom)

maxZoom?: number | null

The maximum zoom level of the map. Users cannot zoom in beyond this level. (0–24)

#### Default Value[](#default-value-27)

```typescript
22
```

Inherited from Omit.maxZoom

### `Optional`minimap[](#minimap)

minimap?: boolean | [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/) | [MinimapOptionsInput](https://docs.maptiler.com/sdk-js/api-reference/interfaces/MinimapOptionsInput/)

Display a minimap in a user defined corner of the map. (default: `bottom-left` corner) If set to true, the map will assume it is a minimap and forego the attribution control.

Inherited from Omit.minimap

### `Optional`minPitch[](#minpitch)

minPitch?: number | null

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

#### Default Value[](#default-value-28)

```typescript
0
```

Inherited from Omit.minPitch

### `Optional`minZoom[](#minzoom)

minZoom?: number | null

The minimum zoom level of the map. Users cannot zoom out beyond this level. (0–24)

#### Default Value[](#default-value-29)

```typescript
0
```

Inherited from Omit.minZoom

### `Optional`navigationControl[](#navigationcontrol)

navigationControl?: boolean | [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/)

Show the navigation control. (default: `true`, will hide if `false`)

Inherited from Omit.navigationControl

### `Optional`parentRect[](#parentrect)

parentRect?: [ParentRect](https://docs.maptiler.com/sdk-js/api-reference/interfaces/ParentRect/)

### `Optional`pitch[](#pitch)

pitch?: number

The initial pitch (tilt) of the map, measured in degrees away from the plane of the screen (0-85). If `pitch` is not specified in the constructor options, MapLibre GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `0`. Values greater than 60 degrees are experimental and may result in rendering issues. If you encounter any, please raise an issue with details in the MapLibre project.

#### Default Value[](#default-value-30)

```typescript
0
```

Inherited from Omit.pitch

### pitchAdjust[](#pitchadjust)

pitchAdjust: boolean

### `Optional`pitchWithRotate[](#pitchwithrotate)

pitchWithRotate?: boolean

If `false`, the map's pitch (tilt) control with "drag to rotate" interaction will be disabled.

#### Default Value[](#default-value-31)

```typescript
true
```

Inherited from Omit.pitchWithRotate

### `Optional`pixelRatio[](#pixelratio)

pixelRatio?: number

The pixel ratio. The canvas' `width` attribute will be `container.clientWidth * pixelRatio` and its `height` attribute will be `container.clientHeight * pixelRatio`. Defaults to `devicePixelRatio` if not specified.

Inherited from Omit.pixelRatio

### `Optional`projection[](#projection)

projection?: [ProjectionTypes](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.ProjectionTypes/)

Whether the projection should be "mercator" or "globe". If not provided, the style takes precedence. If provided, overwrite the style.

Inherited from Omit.projection

### `Optional`projectionControl[](#projectioncontrol)

projectionControl?: boolean | [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/)

Show the projection control. (default: `false`, will show if `true`)

Inherited from Omit.projectionControl

### `Optional`reduceMotion[](#reducemotion)

reduceMotion?: boolean

If `true`, gesture inertia (such as panning) is disabled. If not provided, gesture inertia defaults to the user's device settings.

#### Default Value[](#default-value-32)

```typescript
undefined
```

Inherited from Omit.reduceMotion

### `Optional`refreshExpiredTiles[](#refreshexpiredtiles)

refreshExpiredTiles?: boolean

If `false`, the map won't attempt to re-request tiles once they expire per their HTTP `cacheControl`/`expires` headers.

#### Default Value[](#default-value-33)

```typescript
true
```

Inherited from Omit.refreshExpiredTiles

### `Optional`renderWorldCopies[](#renderworldcopies)

renderWorldCopies?: boolean

If `true`, multiple copies of the world will be rendered side by side beyond -180 and 180 degrees longitude. If set to `false`:

-   When the map is zoomed out far enough that a single representation of the world does not fill the map's entire container, there will be blank space beyond 180 and -180 degrees longitude.
-   Features that cross 180 and -180 degrees longitude will be cut in two (with one portion on the right edge of the map and the other on the left edge of the map) at every zoom level.

#### Default Value[](#default-value-34)

```typescript
true
```

Inherited from Omit.renderWorldCopies

### `Optional`roll[](#roll)

roll?: number

The initial roll angle of the map, measured in degrees counter-clockwise about the camera boresight. If `roll` is not specified in the constructor options, MapLibre GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `0`.

#### Default Value[](#default-value-35)

```typescript
0
```

Inherited from Omit.roll

### `Optional`rollEnabled[](#rollenabled)

rollEnabled?: boolean

If `false`, the map's roll control with "drag to rotate" interaction will be disabled.

#### Default Value[](#default-value-36)

```typescript
false
```

Inherited from Omit.rollEnabled

### `Optional`rtlTextPlugin[](#rtltextplugin)

rtlTextPlugin?: string | boolean

Whether to enable the RTL plugin or import a different one. Default is undefined, which means the plugin is enabled by default.

Inherited from Omit.rtlTextPlugin

### `Optional`scaleControl[](#scalecontrol)

scaleControl?: boolean | [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/)

Show the scale control. (default: `false`, will show if `true`)

Inherited from Omit.scaleControl

### `Optional`scrollZoom[](#scrollzoom)

scrollZoom?: boolean | [AroundCenterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/AroundCenterOptions/)

If `true`, the "scroll to zoom" interaction is enabled. [AroundCenterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/AroundCenterOptions/) are passed as options to [ScrollZoomHandler.enable](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.ScrollZoomHandler/#enable).

#### Default Value[](#default-value-37)

```typescript
true
```

Inherited from Omit.scrollZoom

### `Optional`style[](#style)

style?: string | [StyleSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSpecification/) | [ReferenceMapStyle](https://docs.maptiler.com/sdk-js/api-reference/classes/ReferenceMapStyle/) | [MapStyleVariant](https://docs.maptiler.com/sdk-js/api-reference/classes/MapStyleVariant/)

Style of the map. Can be:

-   a full style URL (possibly with API key)
-   a shorthand with only the MapTIler style name (eg. `"streets-v2"`)
-   a longer form with the prefix `"maptiler://"` (eg. `"maptiler://streets-v2"`)

Inherited from Omit.style

### `Optional`terrain[](#terrain)

terrain?: boolean

Enables 3D terrain if `true`. (default: `false`)

Inherited from Omit.terrain

### `Optional`terrainControl[](#terraincontrol)

terrainControl?: boolean | [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/)

Show the terrain control. (default: `false`, will show if `true`)

Inherited from Omit.terrainControl

### `Optional`terrainExaggeration[](#terrainexaggeration)

terrainExaggeration?: number

Exaggeration factor of the terrain. (default: `1`, no exaggeration)

Inherited from Omit.terrainExaggeration

### `Optional`touchPitch[](#touchpitch)

touchPitch?: boolean | [AroundCenterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/AroundCenterOptions/)

If `true`, the "drag to pitch" interaction is enabled. An `Object` value is passed as options to [TwoFingersTouchPitchHandler.enable](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.TwoFingersTouchPitchHandler/#enable).

#### Default Value[](#default-value-38)

```typescript
true
```

Inherited from Omit.touchPitch

### `Optional`touchZoomRotate[](#touchzoomrotate)

touchZoomRotate?: boolean | [AroundCenterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/AroundCenterOptions/)

If `true`, the "pinch to rotate and zoom" interaction is enabled. An `Object` value is passed as options to [TwoFingersTouchZoomRotateHandler.enable](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.TwoFingersTouchZoomRotateHandler/#enable).

#### Default Value[](#default-value-39)

```typescript
true
```

Inherited from Omit.touchZoomRotate

### `Optional`trackResize[](#trackresize)

trackResize?: boolean

If `true`, the map will automatically resize when the browser window resizes.

#### Default Value[](#default-value-40)

```typescript
true
```

Inherited from Omit.trackResize

### `Optional`transformCameraUpdate[](#transformcameraupdate)

transformCameraUpdate?: [CameraUpdateTransformFunction](https://docs.maptiler.com/sdk-js/api-reference/types/CameraUpdateTransformFunction/) | null

A callback run before the map's camera is moved due to user input or animation. The callback can be used to modify the new center, zoom, pitch and bearing. Expected to return an object containing center, zoom, pitch or bearing values to overwrite.

#### Default Value[](#default-value-41)

```typescript
null
```

Inherited from Omit.transformCameraUpdate

### `Optional`transformConstrain[](#transformconstrain)

transformConstrain?: [TransformConstrainFunction](https://docs.maptiler.com/sdk-js/api-reference/types/TransformConstrainFunction/) | null

A callback that overrides how the map constrains the viewport's lnglat and zoom to respect the longitude and latitude bounds.

#### See[](#see-1)

[Customize the map transform constrain](https://maplibre.org/maplibre-gl-js/docs/examples/customize-the-map-transform-constrain/) Expected to return an object containing center and zoom.

#### Default Value[](#default-value-42)

```typescript
null
```

Inherited from Omit.transformConstrain

### `Optional`transformRequest[](#transformrequest)

transformRequest?: [RequestTransformFunction](https://docs.maptiler.com/sdk-js/api-reference/types/RequestTransformFunction/) | null

A callback run before the Map makes a request for an external URL. The callback can be used to modify the url, set headers, or set the credentials property for cross-origin requests. Expected to return an object with a `url` property and optionally `headers` and `credentials` properties.

#### Default Value[](#default-value-43)

```typescript
null
```

Inherited from Omit.transformRequest

### `Optional`useExperimentalTilePreloading[](#useexperimentaltilepreloading)

useExperimentalTilePreloading?: boolean

Whether to enable the experimental tile preloading feature. Default is false.

#### Experimental[](#experimental-1)

#### Remarks[](#remarks)

**API Key Usage**: Each tile request counts against your MapTiler Cloud API key quota. Use with caution.

Inherited from Omit.useExperimentalTilePreloading

### `Optional`validateStyle[](#validatestyle)

validateStyle?: boolean

If false, style validation will be skipped. Useful in production environments due to enabling tree-shaking of the validation code in some environments and minor performance improvements. Disabling this option comes at the cost of less clear error messages

#### Default Value[](#default-value-44)

```typescript
true
```

Inherited from Omit.validateStyle

### `Optional`zoom[](#zoom)

zoom?: number

The initial zoom level of the map. If `zoom` is not specified in the constructor options, MapLibre GL JS will look for it in the map's style object. If it is not specified in the style, either, it will default to `0`.

#### Default Value[](#default-value-45)

```typescript
0
```

Inherited from Omit.zoom

### zoomAdjust[](#zoomadjust)

zoomAdjust: number

### `Optional`zoomSnap[](#zoomsnap)

zoomSnap?: number

The step increment the zoom level will snap to. For example, if `zoomSnap` is 1, the map will snap to whole integers during discrete zoom operations. If set to 0, zooming is continuous.

#### Default Value[](#default-value-46)

```typescript
0
```

Inherited from Omit.zoomSnap
