MapOptions
Map initialization options.
undefined
false
true
Enable OSM copyright auto hide after 5 sec
number[]
Map center in geographical coordinates ([longitude, latitude]
).
undefined
string
Set default background color, while style is loading
undefined
false
true
Prevent users from pitching a map.
undefined
false
true
Prevent users from rotating a map.
undefined
false
true
Disable map zoom on scrolling over the map container.
undefined
false
true
Whether a floor control should be added during the map initialization. By default it's false.
undefined
string
The key that allows usage of the API.
undefined
string
The desired map language. short language code 'en', 'ru', ...etc
The map will be constrained to the given bounds, if set.
undefined
number
Maximum map pitch in degrees.
undefined
number
Maximum map zoom.
undefined
number
Minimum map pitch in degrees.
undefined
number
Minimum map zoom.
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
undefined
number
Map pitch in degrees.
undefined
false
true
Set preserveDrawingBuffer option to WebGLRenderingContext.
undefined
number
Map rotation in degrees.
undefined
string
The map style ID, that you can get at https://styles.2gis.com
undefined
{ [key: string]: boolean }
Map style global variables
undefined
number
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.
undefined
false
true
Whether a traffic control should be added during the map initialization. By default it's false.
undefined
number
Map zoom.
undefined
false
true
Whether a zoom control should be added during the map initialization. By default it's true.