MapOptions | MapGL | 2GIS Documentation

MapOptions

Map initialization options.

Properties
undefinedfalsetrue

Enable OSM copyright auto hide after 5 sec

number[]

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

undefinedstring

Set default background color, while style is loading

undefinedfalsetrue

Prevent users from pitching a map.

undefinedfalsetrue

Prevent users from rotating a map.

undefinedfalsetrue

Disable map zoom on scrolling over the map container.

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 zoom.

undefinednumber

Minimum map pitch in degrees.

undefinednumber

Minimum map zoom.

undefinednumber

Map pitch in degrees.

undefinedfalsetrue

Set preserveDrawingBuffer option to WebGLRenderingContext.

undefinednumber

Map rotation in degrees.

undefinedstring

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

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.

undefinedfalsetrue

Whether a traffic control should be added during the map initialization. By default it's false.

undefinednumber

Map zoom.

undefinedfalsetrue

Whether a zoom control should be added during the map initialization. By default it's true.