Zum Inhalt

@smartmaps/smartmaps-gl


@smartmaps/smartmaps-gl / MapOptions

Type Alias: MapOptions

Nur auf Englisch verfügbar

Diese Seite gehört zur technischen API-Referenz. Sie wird automatisch aus dem Quellcode erzeugt und liegt daher ausschließlich auf Englisch vor. Die einführenden Seiten und Leitfäden sind auf Deutsch verfügbar.

MapOptions = OmitCustomProperties & 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.

cooperativeGestures?

optional cooperativeGestures?: boolean | GestureHandlingOptions | GestureOptions

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.

See

maplibreGL Documentation

Default Value

null

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

globeControl?

optional globeControl?: boolean | GlobeControlOptions

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

projection?

optional projection?: ProjectionType | string

Defines in which kind of SmartmapsProjectionType the map is initialized If set to auto, value will be taken from style, if undefined there fallback is mercator

Default Value

'auto'

setRTLTextPlugin?

optional setRTLTextPlugin?: boolean | string

Defines whether RTLTextPlugin should be used. If true or url in RTLTextPlugin is undefined, the default is used.

Default Value

true

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'

styleControl?

optional styleControl?: boolean | StyleControlOptions

Control to switch styles dynamically

Default Value

false

zoomControl?

optional zoomControl?: boolean

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

Default Value

null