Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MapOptions

Options to configure the map display.

Hierarchy

  • MapOptions

Index

Properties

Optional backgroundColor

backgroundColor: Color

The default background color of the map is white. To achieve a transparent map background, you can set it to "rgba(0, 0, 0, 0)" or simply use the keyword "transparent".

defaultvalue

"white"

Optional behavior

behavior: { drag?: boolean; pitch?: boolean; rotate?: boolean; zoom?: true | false | "fixed" | "float" }

Behavior options of the map. Allow user to "drag" / "rotate" / "pitch" or "zoom" the map by mouse/touch interaction.

"drag" / "rotate" and "pitch" are booleans indicating if user interaction is possible or not. Possible values for "zoom" property are

Type declaration

  • Optional drag?: boolean

    enable or disable dragging the map

    defaultvalue

    true

  • Optional pitch?: boolean

    enable or disable pitching the map

    defaultvalue

    false

  • Optional rotate?: boolean

    enable or disable rotating the map

    defaultvalue

    falses

  • Optional zoom?: true | false | "fixed" | "float"

    configure map zoom behavior:

    • false: disable zoom
    • true: enable zoom ("float")
    • "fixed": fixed zoom animation to next integer zoomlevel. floating zoomlevels are not allowed (eg 14.4)
    • "float": allow floating zoomlevels [default]
    defaultvalue

    'float'

Optional center

center: GeoPoint

Center coordinate of the map.

defaultvalue

{longitude: 8.534, latitude: 50.162}

Optional debug

debug: boolean

enable or disable debug tile grid

defaultvalue

false

Optional layers

layers: TileLayer[]

add layers to display.

Optional maxLevel

maxLevel: number

the maximum zoom level the map can be zoomed in

defaultvalue

20

Optional maxPitch

maxPitch: number

The maximum angle in degrees the map can be pitched

defaultvalue

50

Optional minLevel

minLevel: number

the minimum zoom level the map can be zoomed out

defaultvalue

2

Optional minPanMapThreshold

minPanMapThreshold: number

The minimum threshold in pixels to enable the pan map gesture.

defaultvalue

4

Optional minPitchMapThreshold

minPitchMapThreshold: number

The minimum threshold in pixels to enable the pitch map gesture.

defaultvalue

4

Optional minRotateMapThreshold

minRotateMapThreshold: number

The minimum threshold in pixels to enable the rotate map gesture.

defaultvalue

4

Optional pitch

pitch: number

initial pitch (tilt) of the map in degree.

defaultvalue

0

Optional rotate

rotate: number

initial rotation of the map in degree.

defaultvalue

0

Optional singleWorldView

singleWorldView: boolean | "both" | "latitude"

Specifies whether the map should display the world only once at the maximum zoom-out level, and along which axes.

  • true: Restricts repetition on both the latitude (Y-axis) and longitude (X-axis).
  • false: Allows infinite repetition on both axes.
  • 'latitude': Restricts repetition only on the latitude (Y-axis), allowing infinite panning on the X-axis.
  • 'both': Restricts repetition on both latitude and longitude axes.

When set to true or 'latitude', zooming out is limited to prevent the map from repeating, allowing it to cover the entire visible area without repetition.

default

false

Optional ui

ui: {}

Configure visibility and position of ui components

Type declaration

Optional zoomAnimationMs

zoomAnimationMs: number

duration of a zoom level change animation in milliseconds.

defaultvalue

100

Optional zoomlevel

zoomlevel: number

zoomlevel of the map.

defaultvalue

18

Generated using TypeDoc