MapOptions | MapGL | Urbi Documentation

MapOptions

Map initialization options.

Properties
undefinedfalsetrue

Enables OSM copyright auto hide after 5 sec

number[]

Map center in geographical coordinates ([longitude, latitude]).

Partial<Padding>

Sets padding for controls layout

Where to add copyright control during the map initialization. By default it's "bottomRight".

undefinedstring

Sets default background color, while style is loading

undefinedfalsetrue

Prevents the map from dragging.

undefinedfalsetrue

Prevents users from pitching the map.

undefinedfalsetrue

Prevents users from rotating the map.

undefinedfalsetrue

Disables map zoom on scrolling over the map container.

Whether a floor control should be added during the map initialization. By default it's false. Set to true to add the floor control at "topRight" position.

undefinedfalsetrue

Prevents center changing while user is zooming or rotating the map by touch.

undefinedstring

The key that allows usage of the API.

undefinedstring

The desired map language. short language code 'en', 'ru', ...etc

The map will be constrained to the given bounds, if set.

undefinednumber

Maximum map pitch in degrees.

undefinednumber

Maximum map styleZoom.

undefinednumber

Minimum map pitch in degrees.

undefinednumber

Minimum map styleZoom.

Dimensions in pixels applied on each side of the viewport for shifting the vanishing point. the padding on each side has a clamp to a positive value no larger than the map canvas size for either side

undefinednumber

Map pitch in degrees.

undefinedfalsetrue

Sets preserveDrawingBuffer option to WebGLRenderingContext.

undefinednumber

Map rotation in degrees.

Whether a scale control should be added during the map initialization. By default it's false. Set to true to add the scale control at "bottomLeft" position.

undefinedstring

The map style ID, that you can get at https://styles.2gis.com

Partial<StyleOptions>

Map style options. Containts path to style assets - icons and fonts.

Map style global variables

undefinednumber

Map style zoom. Use this option if you want to set the same zoom that is used in the style settings. The styleZoom and zoom options set the same map scale but in different projections. If both options are set, the styleZoom has a higher priority than the zoom option.

undefinednumber

Map rotation threshold with multitouch in degrees. 10 by default.

Whether a traffic control should be added during the map initialization. By default it's false. Set to true to add the traffic control at "topRight" position.

"always-on""always-off""depends-on-language"

Enables map to download additional plugin for RTL-text rendering. Values are:

  • 'always-on' - plugin will be downloaded at map initialization.
  • 'always-off - plugin will not be downloaded.
  • 'depends-on-language' - plugin will be downloaded only if "ar" language is selected.

Default value is 'depends-on-language'.

Fixes WebGL API version to use. If not set map will try to use latest supported on the device version.

undefinednumber

Map zoom.

Whether a zoom control should be added during the map initialization. By default it's "topRight". Set to false to not add the control.