Skip to content

@smartmaps/smartmaps-gl


@smartmaps/smartmaps-gl / MapOptions

Type Alias: MapOptions

MapOptions: OmitStyleProperty & object & LanguageMapOptions & TerrainMapOptions

The Map options object

Type declaration

apiKey

apiKey: string

channel?

optional channel: string | null

Customer specific value

Default Value

null

contextmenu?

optional contextmenu: boolean | ContextMenuOptions

Adds context menu for the map. Context menu items can be different depending on the target.

fullscreenControl?

optional fullscreenControl: boolean | FullscreenControlOptions

Control to display map navigation controls. Add zoom controls to the map.

Default Value

null

geolocateControl?

optional geolocateControl: boolean | GeolocateControlOptions

Control provides a button that uses the browser's geolocation API to locate the user on the map. Add geolocate control to the map.

Default Value

null

gestureHandling?

optional gestureHandling: boolean | GestureHandlingOptions

Control to enable cooperative gestures with a specific language.

Default Value

null

languageControl?

optional languageControl: boolean | LanguageControlOptions

Control to switch languages dynamically

Default Value

null

optional navigationControl: boolean | NavigationControlOptions

Control to display map navigation controls. Add zoom and rotation controls to the map.

Default Value

null

optional smartmapsLogo: boolean

Specifies whether the SmartmapsLogoControl should be visible.

Default Value

false

style?

optional style: SmartmapsMapStyle | StyleSpecification | string

If a SmartmapsMapStyle, it will append the style to the styleUrl. if a maplibre StyleSpecification, it will use this specification if a string it will use this as styleUrl

Default Value

'light'

zoomControl?

optional zoomControl: boolean

Controls to zoom in and out of the map. Add fullscreen control to the map.

Default Value

null