interface
AnimationOptions
Common options for map animations. Used by methods such as setCenter, setZoom, etc.
BinaryFeatureStateMap
Binary representation of featureStateMap. Contains usual FeatureStateMap data packed by @2gis/json2pbf library
Example:
import { packJson } from '@2gis/json2pbf';
const featureStateMap = {
"70030076195691401": { "height": 300 },
"70030076130722099": { "height": 200 },
}
const packed = packJson(featureStateMap);
ChangeLanguageEvent
Contains current map language
lang
Language short name.
CircleMarkerOptions
CircleMarker initialization options.
color?
Fill color in hexadecimal RGB (
#ff0000
) or RGBA (
#ff0000ff
) format.
coordinates
Geographical coordinates of the circleMarker center and optional height in meters :
[longitude, latitude, height?]
.
diameter?
CircleMarker diameter in pixels.
interactive?
Allows the circleMarker to emit events (like
mouseover
).
true
by default.
maxZoom?
Maximum display styleZoom.
minZoom?
Minimum display styleZoom.
stroke2Color?
The second stroke color in hexadecimal RGB (
#ff0000
) or RGBA (
#ff0000ff
) format.
[DEPRECATED] Will be removed in the next major release, use additional CircleMarker to draw an extra stroke.
stroke2Width?
The second stroke width in pixels.
[DEPRECATED] Will be removed in the next major release, use additional CircleMarker to draw an extra stroke.
strokeColor?
Stroke color in hexadecimal RGB (
#ff0000
) or RGBA (
#ff0000ff
) format.
strokeWidth?
Stroke width in pixels.
userData?
User defined data
zIndex?
Draw order.
CircleOptions
Circle initialization options.
color?
Fill color in hexadecimal RGB (
#ff0000
) or RGBA (
#ff0000ff
) format.
coordinates
Geographical coordinates of the circle center:
[longitude, latitude]
.
interactive?
Allows the circle to emit events (like
mouseover
).
true
by default.
maxZoom?
Maximum display styleZoom.
minZoom?
Minimum display styleZoom.
radius
Circle radius in meters.
strokeColor?
Stroke color in hexadecimal RGB (
#ff0000
) or RGBA (
#ff0000ff
) format.
strokeWidth?
Stroke width in pixels.
userData?
User specific data.
zIndex?
Draw order.
ControlOptions
Control initialization options.
position?
Position of the control.
By default it's
topRight
.
DefaultEventTargetData
The default targetData of a pointer event.
DestroyMapEvent
Destroy event.
DynamicObjectEventTable
The list of events that can be emitted by markers.
click
Emitted when the marker is clicked.
mousedown
Emitted when the user presses a mouse button over the marker.
mousemove
Emitted when the user moves the pointer over the marker.
mouseout
Emitted when the user moves the mouse away from the marker.
mouseover
Emitted when the user hovers over the marker.
mouseup
Emitted when the user releases the mouse button over the marker.
touchend
Emitted when the user lifts the finger off the marker.
touchstart
Emitted when the user taps on the marker.
DynamicObjectPointerEvent
The event type for pointer-related map object events.
EventTarget
The target of a pointer event.
id
ID of the target object.
FeatureState
FeatureState attributes.
[key: string]
FeatureStateMap
FeatureStateMap source attributes.
Example:
const featureStateMap = {
"70030076195691401": { "height": 300 },
"70030076130722099": { "height": 200 },
}
[key: string]
FitBoundsOptions
Options for fitBounds method.
animation?
Animation options.
considerRotation?
If true the fitBounds will consider the map rotation
maxZoom?
The limit for the maximum zoom.
padding?
The amount of padding in pixels to add to the given bounds.
skipMapPadding?
If true fitBounds ignores the padding property in the map options
FloorControlOptions
Floor control initialization options.
position?
Position of the control.
By default it's
topRight
.
FloorLevel
Contains a floor level data.
FloorLevelChangeEvent
Contains a current floor level data.
FloorPlanHideEvent
Contains a disappeared floor plan data.
floorPlanId
An id of a disappeared floor plan.
FloorPlanShowEvent
Contains an appeared floor plan data.
GeoJsonEventTargetData
The GeoJson target data of a pointer event.
GeoJsonSourceOptions
GeoJson data source initialization options.
attributes?
Data source attributes.
data
GeoJSON collection of feature objects or feature object.
dimensions?
Number of coordinates per vertex in the input array (2 by default)
idScope?
Put IDs of source features to separate ID-scope. If idScope isn't specified, all IDs will be added into the default scope. Objects that have the same ID inside ID-scope will be processed by map as one object. For example, these objects will be selected simultaneously.
Scope of the identifiers is used for objects selection, see method map.setSelectedObjects.
maxZoom?
The maximum zoom value for which geojson tiles will be generated.
modelsPath?
Path to the models. Used when model's url in the source is a relative path
promoteId?
Name of the object attribute to use as ID. If specified, ID will be presented in GeoJsonEventTargetData.
tolerance?
Simplification tolerance (higher means simpler)
GeoJsonViewportSourceOptions
GeoJson viewport data source initialization options.
attributes?
Data source attributes.
data
GeoJSON source data bbox function.
dimensions?
Number of coordinates per vertex in the input array (2 by default)
idScope?
Put IDs of source features to separate ID-scope. If idScope isn't specified, all IDs will be added into the default scope. Objects that have the same ID inside ID-scope will be processed by map as one object. For example, these objects will be selected simultaneously.
Scope of the identifiers is used for objects selection, see method map.setSelectedObjects.
maxZoom?
The maximum zoom value for which geojson tiles will be generated.
modelsPath?
Path to the models. Used when model's url in the source is a relative path
promoteId?
Name of the object attribute to use as ID. If specified, ID will be presented in GeoJsonEventTargetData.
tolerance?
Simplification tolerance (higher means simpler)
viewportPadding?
Viewport padding in pixels to increase the viewport-based area to get data.
GraphicsPreset
Graphics preset.
HtmlMarkerOptions
HtmlMarker initialization options.
anchor?
The position in pixels of the "tip" of the HTML marker relative to its top-left corner.
coordinates
An array of numbers
[longitude, latitude, height?]
, where:
- 'longitude' and 'latitude' are the geographical coordinates of the top-left corner of the HTML marker. Taking into account the 'anchor' option.
- 'height' is an optional number in meters by which the marker will be raised/lowered (depending on the sign of the value) relative to the map surface. 0 by default.
disableRounding?
If true, the marker coordinates will not be rounded. By default it's
false
.
html
HTML content of the HTML marker.
interactive?
HTML marker can be pointer-event target if this option is set to
true
(pointer-events: auto),
otherwise it can't (pointer-events: none).
labeling?
HTML marker labeling options.
- type: 'none' — the marker is always visible and not involved in labeling
- type: 'full' — the marker can hide other labeling elements or can be hidden
- type: 'invincible' — the marker is always visible and can hide other labeling elements
- type: 'pinnedToPoi' — the marker can hide other labeling elements or can be hidden. It's labeling behavior is taken from the linked POI id.
- width — the width of the labeling box
- height — the height of the labeling box
- offset — the offset in pixels of the labeling box. Positive values indicate right and down, while negative values indicate left and up.
- poiId — the linked POI id
maxZoom?
Maximum display styleZoom of the HTML marker.
minZoom?
Minimum display styleZoom of the HTML marker.
preventMapInteractions?
Capture events if set. Otherwise events will passed to the map. By default it's
true
.
userData?
User specific data.
zIndex?
Draw order.
LabelImage
Source image for text label background.
padding?
Sets the space in pixels between the label text box and the edge of the stretched image for all four sides [top, right, bottom, left], like in CSS. [0, 0, 0, 0] by default.
pixelRatio?
The ratio of logical pixels in the image to physical pixels on the screen.
size
[width, height]
— image size in logical pixels
stretchX?
Defines the parts of the image that can be stretched horizontally.
stretchY?
Defines the parts of the image that can be stretched vertically.
url
Source image URL.
LabelOptions
Label initialization options.
anchor?
The offset distance of text box from its
relativeAnchor
.
Positive values indicate left and up, while negative values indicate right and down.
[DEPRECATED] Will be removed in the next major release, use the
offset
option instead.
color?
Text color in hexadecimal RGB (
#ff0000
) or RGBA (
#ff0000ff
) format.
coordinates
An array of numbers
[longitude, latitude, height?]
, where:
- 'longitude' and 'latitude' are the geographical coordinates of the top-left corner of the label.
Taking into account the
relativeAnchoroption. - 'height' is an optional number in meters by which the label will be raised/lowered (depending on the sign of the value) relative to the map surface. 0 by default.
fontSize?
Text size.
haloColor?
Background color of letters (when
haloRadius
is specified). The same format as for
color
.
haloRadius?
Use
haloRadius
to add background behind each letter.
image?
Background image for the label.
interactive?
Allows the label to emit events (like
mouseover
).
false
by default.
labeling?
Labeling options
- none — the label is not involved in the labeling process in any way
- pointLabelsOnly — the label overlaps or can be overlapped by labels having this labeling option specified as type
letterSpacing?
Space between each letter.
lineHeight?
For multiline label
lineHeight
specify how far lines between each other.
maxZoom?
Maximum display styleZoom of the label.
minZoom?
Minimum display styleZoom of the label.
offset?
The offset distance of text box from its
relativeAnchor
.
Positive values indicate right and down, while negative values indicate left and up.
relativeAnchor?
Coordinates (from 0 to 1 in each dimension) of the text box "tip" relative to its top left corner, for example:
[0, 0] value is the top left corner, [0.5, 0.5] — center point, and [1, 1] is the bottom right corner of the box.
The label will be placed so that this point is at geographical
coordinates
respects the absolute
offset
.
text
Label's text.
userData?
User specific data.
zIndex?
Draw order.
Layer
Stub type representing the style layer.
Real style layer types will appear a little bit later.
LngLatBounds
Geographical bounds.
MapEvent
The general event type for map events.
isUser
True if event was emitted by user's interaction.
MapEventTable
The list of events that can be emitted by the map.
center
Emitted repeatedly during any change in the map's center.
centerend
Emitted after any change in the map's center.
centerstart
Emitted before any change in the map's center.
changeLanguage
Emitted after the map language is changed.
click
Emitted when the map is clicked.
contextmenu
Emitted when the map is clicked by right button.
destroy
Emitted after the map is destroyed.
floorlevelchange
Emitted after the floor plan level is changed.
floorplanhide
Emitted after the floor plan is disappeared from the map.
floorplanshow
Emitted after the floor plan is shown on the map.
idle
Emitted when the map becomes idle after some interaction (drag, zoom etc). Idle means that the map is not interacting, all tiles are drawn and labeling is finished. This event doesn't take into account any asset loading (for example, marker icons).
mousedown
Emitted when the user presses a mouse button over the map.
mousemove
Emitted when the user moves the pointer over the map.
mouseout
Emitted when the user moves the mouse away from the map item.
mouseover
Emitted when the user hovers over a map item.
mouseup
Emitted when the user releases the mouse button over the map.
move
Emitted repeatedly during any transition from one map view to another, caused by moving, zooming, rotating, or pitching.
moveend
Emitted after any transition from one map view to another, caused by moving, zooming, rotating, or pitching.
movestart
Emitted before any transition from one map view to another, caused by moving, zooming, rotating, or pitching.
pitch
Emitted repeatedly during any change in the map's pitch.
pitchend
Emitted after any change in the map's pitch.
pitchstart
Emitted before any change in the map's pitch.
resize
Emitted after any change in the map's size.
rotation
Emitted repeatedly during any change in the map's pitch.
rotationend
Emitted after any change in the map's pitch.
rotationstart
Emitted before any change in the map's pitch.
styleload
Emitted after the map style is loaded.
styleloaderror
Emitted after the map style fails to load.
touchend
Emitted when the user lifts the finger off the map.
touchstart
Emitted when the user taps on the map.
traffichide
Emitted after the traffic layer hid from the map.
trafficscore
Emitted after update current traffic score.
trafficshow
Emitted before the traffic layer showed on the map.
zoom
Emitted repeatedly during any change in zoom level.
zoomend
Emitted after any change in zoom level.
zoomstart
Emitted before any change in zoom level.
MapOptions
Map initialization options.
autoHideOSMCopyright?
Enables OSM copyright auto hide after 5 sec
[DEPRECATED] This option is no longer supported and will be removed in the next major release.
center?
Map center in geographical coordinates (
[longitude, latitude]
).
controlsLayoutPadding?
Sets padding for controls layout
copyright?
Where to add copyright control during the map initialization. By default it's
"bottomRight"
.
defaultBackgroundColor?
Sets default background color, while style is loading
disableAntiAliasing?
Disables fullscreen AntiAliasing when map is idle. True by default.
disableDragging?
Prevents the map from dragging.
disableHidingPois?
Disables hiding POIs behind objects such as buildings, 3D models, etc. False by default.
disablePitchByUserInteraction?
Prevents users from pitching the map.
disableRenderingCache?
Disable render caching.
disableRotationByUserInteraction?
Prevents users from rotating the map.
disableZoomOnScroll?
Disables map zoom on scrolling over the map container.
enableTrackResize?
Tracks changes of the map container size and automatically updates the size of the map.
enableTwoFingerDragging?
Enables map dragging using two touches.
If set to true, three touches will pitch map.
Single touch drag will be enabled also, use
disableDragging: true
to disable it.
floorControl?
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.
graphicsPreset?
Sets active graphics preset.
If set map will work in graphics preset mode:
- map takes into an account configured graphics presets in style
- map.getGraphicsPreset() method becomes available
Otherwise, map will ignore graphics presets from style object.
Available values:
- 'light' - light graphics preset
- 'normal' - normal graphics preset
- 'immersive' - immersive graphics preset
- 'auto' - EXPERIMENTAL graphics preset will be set depending on benchmark result
iconIdentifyOpacity?
When rendering icons to the identification scene, pixels with opacity below this value will be ignored. Default value is 0.3.
keepCenterWhileUserZoomRotate?
Prevents center changing while user is zooming or rotating the map by touch.
key?
The key that allows usage of the API.
lang?
The desired map language. short language code 'en', 'ru', ...etc
loopWorld?
Loop the map when rendering at large scales or near the anti-meridian
lowZoomMaxPitch?
Maximum map pitch in degrees for low zoom (zoom < 16.5).
maxBounds?
The map will be constrained to the given bounds, if set.
maxPitch?
Maximum map pitch in degrees.
maxZoom?
Maximum map styleZoom.
minPitch?
Minimum map pitch in degrees.
minZoom?
Minimum map styleZoom.
padding?
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
pitch?
Map pitch in degrees.
preserveDrawingBuffer?
Sets preserveDrawingBuffer option to WebGLRenderingContext.
rotation?
Map rotation in degrees.
scaleControl?
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.
style?
The map style ID, that you can get at https://styles.2gis.com
styleOptions?
Map style options. Containts path to style assets - icons, fonts, models etc. Warning: If the options are incompatible, a broken style might be applied. Map styles are constantly evolving in order to display new cartographic data. By storing the style on your own side, you assume the responsibility to update it periodically and take care of its relevance. It is recommended to use map.setStyleById to update styles during runtime.
styleState?
Map style global variables
styleZoom?
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.
touchRotationThreshold?
Map rotation threshold with multitouch in degrees. 10 by default.
trafficControl?
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.
trafficOn?
Whether traffic layer is enabled on the map.
useRtlTextPlugin?
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'. If the language of the map is not rtl (eg. 'en') and tiles contain rtl labels, you should use 'always-on' to render rtl label properly.
webglVersion?
Sets the map WebGL version. It can be helpful if you use CustomLayer with other WebGL libraries.
zoom?
Map zoom.
zoomControl?
Whether a zoom control should be added during the map initialization. By default it's
"topRight"
.
Set to
false
to not add the control.
MapPointerEvent
The event type for pointer-related map events.
MapSupportOptions
Options for Map.isSupported method.
failIfMajorPerformanceCaveat
Causes isSupported method to return false if the performance of MapGL would be dramatically worse than expected (i.e. a software renderer is would be used)
MarkerIconOptions
Options for marker setIcon and setHoverIcon methods.
anchor?
The position in pixels of the "tip" of the icon (relative to its top left corner). The icon will be aligned so that this point is at the marker's geographical location. Centered by default if size is specified.
icon
Marker icon URL.
opacity?
Marker icon opacity.
size?
Marker icon size
[width, height]
in pixels.
MarkerLabelOptions
Options for the label of marker.
anchor?
The offset distance of text box from its
relativeAnchor
.
Positive values indicate left and up, while negative values indicate right and down.
[DEPRECATED] Will be removed in the next major release, use the
offset
option instead.
color?
Text color in hexadecimal RGB (
#ff0000
) or RGBA (
#ff0000ff
) format.
fontSize?
Text size.
haloColor?
Background color of letters (when
haloRadius
is specified). The same format as for
color
.
haloRadius?
Use
haloRadius
to add background behind each letter.
image?
Background image for the label.
letterSpacing?
Space between each letter.
lineHeight?
For multiline label
lineHeight
specify how far lines between each other.
maxZoom?
Maximum display styleZoom of the label. Note that the label's zoom-dependent visibility is constrained by the marker's minZoom and maxZoom options, if specified.
minZoom?
Minimum display styleZoom of the label. Note that the label's zoom-dependent visibility is constrained by the marker's minZoom and maxZoom options, if specified.
offset?
The offset distance of text box from its
relativeAnchor
.
Positive values indicate right and down, while negative values indicate left and up.
relativeAnchor?
Coordinates (from 0 to 1 in each dimension) of the text box "tip" relative to its top left corner, for example:
[0, 0] value is the top left corner, [0.5, 0.5] — center point, and [1, 1] is the bottom right corner of the box.
The label will be placed so that this point is at geographical
coordinates
respects the absolute
offset
.
text
Label's text.
zIndex?
Draw order.
MarkerOptions
Marker initialization options.
anchor?
The position in pixels of the "tip" of the icon (relative to its top left corner). The icon will be aligned so that this point is at the marker's geographical location. Centered by default if size is specified.
coordinates
Geographical coordinates of marker center
[longitude, latitude, altitude?]
,
where altitude is an optional component in meters.
hoverAnchor?
Icon anchor in hovered state.
hoverIcon?
Marker icon URL in hovered state.
hoverOpacity?
Marker icon opacity in hovered state.
hoverSize?
Marker icon size
[width, height]
in pixels in hovered state.
icon?
Marker icon URL.
interactive?
Allows the marker to emit events (like
mouseover
).
true
by default.
label?
Initialization options of the marker's label.
maxZoom?
Maximum display styleZoom of the marker.
minZoom?
Minimum display styleZoom of the marker.
opacity?
Marker icon opacity.
rotation?
Icon clockwise rotation in the screen plane in degrees.
size?
Marker icon size
[width, height]
in pixels.
userData?
User specific data.
zIndex?
Draw order.
Padding
Padding in pixels on different sides of the container.
PointerEvent
The basic event type for pointer-related events.
PolygonOptions
Polygon initialization options.
color?
Fill color in hexadecimal RGB (
#ff0000
) or RGBA (
#ff0000ff
) format.
coordinates
Geographical coordinates of polygon points in format:
[outerEdges, cropEdges1, cropEdges2, ...]
.
The first section is
outerEdges
which describes an array of outer edges:
[firstPoint, secondPoint, ..., firstPoint]
.
Each point is a geographical point:
[longitude, latitude]
. The last point should be the same as the first.
Then optionally you can crop some polygons from the main one (outer) by specifying
cropEdges1
,
cropEdges2
and so on.
A format is the same as the main section:
[firstPoint, secondPoint, ..., firstPoint]
each point is
[longitude, latitude]
.
Important:
outerEdges
and
cropEdgesN
must not touch or intersect each other.
Only the first section (
outerEdges
) is required. There may be many
cropEdges
sections.
interactive?
Allows the polygon to emit events (like
mouseover
).
true
by default.
maxZoom?
Maximum display styleZoom.
minZoom?
Minimum display styleZoom.
strokeColor?
Stroke color in hexadecimal RGB (
#ff0000
) or RGBA (
#ff0000ff
) format.
strokeWidth?
Stroke width in pixels.
userData?
User specific data.
zIndex?
Draw order.
PolylineOptions
Polyline initialization options.
color?
The line color in hexadecimal RGB (
#ff0000
) or RGBA (
#ff0000ff
) format.
color2?
The second line color in hexadecimal RGB (
#ff0000
) or RGBA (
#ff0000ff
) format.
[DEPRECATED] Will be removed in the next major release, use additional Polyline to draw an extra line with a different color.
color3?
The third line color in hexadecimal RGB (
#ff0000
) or RGBA (
#ff0000ff
) format.
[DEPRECATED] Will be removed in the next major release, use additional Polyline to draw an extra line with a different color.
coordinates
An array of polyline coordinates:
[firstPoint, secondPoint, ...]
.
Each point is a geographical point:
[longitude, latitude]
.
dashLength?
The length of the dash in pixels. If no dash length is specified, a polyline will be drawn.
gapColor?
The gap color in hexadecimal RGB (
#ff0000
) or RGBA (
#ff0000ff
) format.
gapLength?
The length of the gap in pixels. The default gap length is equal to the dash length.
hiddenPartColor?
The color of a line section that is hidden by other objects in '3d' rendering mode
in RGB hexadecimal (
#ff0000
) or RGBA (
#ff0000ff
) format.
hiddenPartGapColor?
The gap color of a line section that is hidden by other objects in '3d' rendering mode
in RGB hexadecimal (
#ff0000
) or RGBA (
#ff0000ff
) format.
interactive?
Allows the polyline to emit events (like
mouseover
).
true
by default.
maxZoom?
Maximum display styleZoom.
minZoom?
Minimum display styleZoom.
renderingMode?
Rendering mode. '2d' is default.
userData?
User specific data.
width?
The line width in pixels.
width2?
The second line width in pixels.
[DEPRECATED] Will be removed in the next major release, use additional Polyline to draw an extra line with a different width.
width3?
The third line width in pixels.
[DEPRECATED] Will be removed in the next major release, use additional Polyline to draw an extra line with a different width.
zIndex?
Draw order of the first line.
zIndex2?
Draw order of second line.
[DEPRECATED] Will be removed in the next major release, use additional Polyline to draw an extra line with a different zIndex.
zIndex3?
Draw order of third line.
[DEPRECATED] Will be removed in the next major release, use additional Polyline to draw an extra line with a different zIndex.
RasterOptions
Options for the raster.
RasterSource
Source image for the raster.
url
Url of the image for the raster.
RasterTileSourceOptions
RasterTileSource initialization options.
attributes?
Data source attributes.
attribution?
Contains an attribution to be displayed when the map is shown to a user.
maxZoom?
The maximum zoom value for which source data exists.
minZoom?
The minimum zoom value for which source data exists.
url
Convert tile coordinates to URL.
RotationAnimationOptions
Options for map rotation animations.
animate?
Determines if the transform should be animated.
duration?
Duration of the animation in milliseconds.
easing?
Easing function to be used with the animation.
normalize?
If enabled, the desired rotation will be normalized to (–180°; 180°], and
the direction of the rotation will be chosen so that the map makes less
than half a turn.
normalize: false
is useful for animating one of more
full turns of the map. Enabled by default.
SourceAttributes
Data source attributes.
[key: string]
Style
Stub type representing the style.
Real style types will appear a little bit later.
StyleIconConfig
Config of an original user icon. Only SVG images are supported.
url
URL path to an icon:
-
absolute:
//external.domain/some_path/some_icon.svg -
template:
//{appHost}/some_path/some_icon.svg
StyleLoadErrorEvent
Contains currently loaded error style response
style
ID or URL. Depends on the way the style was set.
StyleLoadEvent
Contains currently loaded style response
style
Style object, ID or URL. Depends on the way the style was set.
StyleOptions
Style options - paths to icons and fonts.
StyleState
Style state. _activeFloorBuildingIds — an array of building IDs with active floor plans; _activeFloorIds — an array of active floor IDs from buildings with active floor plans; _activeFloorIsMetro - a flag which tells if active floors plan is a metro schema; trafficOn - a flag which tells if traffic is enabled; parkingOn - a flag which tells if parking is enabled (used in native version of 2gis); navigatorOn - a flag which tells if navigator is enabled (used in native version of 2gis); immersiveRoadsOn - a flag which tells if immersive roads are enabled; terrainEnabled - a flag which tells if 3d terrain is enabled; graphicsPreset - current graphics preset. Available values: 'light', 'normal', 'immersive'.
[key: string]
TierOption
Settings for drawing an object on the surface of another map object
TrafficScoreEvent
Contains current traffic score.
score
Current traffic score
TrafficVisibilityEvent
Emitted when traffic visibility state changes
ZenithSourceOptions
Zenith data source initialization options
idScope?
Put IDs of source features to separate ID-scope. If idScope isn't specified, all IDs will be added into the "default" ID-scope. Objects that have the same ID inside ID-scope will be processed by map as one object. For example, these objects will be selected simultaneously.
Scope of the identifiers is used for objects selection, see method map.setSelectedObjects.
layerId?
ID of the layer stored on the Tile Server used to fetch tiles and other resources. "layerId" overrides the tileTemplateUrl and the metatileTemplateUrl options if they are provided,
maxZoom?
The maximum zoom level at which there will be zenith tiles of the source.
metatileTemplateUrl?
URL template used to fetch meta-tiles. If it is provided alongside the "layerId" option, "layerId" is not used.
minZoom?
The minimum zoom level at which there will be zenith tiles of the source.
promoteAttributes?
Attributes provided to the data source by every object
promoteId?
Name of the object attribute to use as id.
sourceAttributes?
Data source attributes.
tileTemplateUrl?
URL template used to fetch tiles. If it is provided alongside the "layerId" option, "layerId" is not used.
ZoomAnimationOptions
Animation options for zoom.
animate?
Determines if the transform should be animated.
duration?
Duration of the animation in milliseconds.
easing?
Easing function to be used with the animation.
useHeightForAnimation?
Intermediate zoom values will be calculated using camera's height.
- false (default): zoom values will be calculated using provided easing function.
- true: intermediate camera height calculated then converted into zoom.
Initial and final zoom values are same for both modes, only timing function changes.
true value is useful for simultaneous animation of map's center and zoom. In that case camera will fly in a straight line.
Example: map.setCenter([82.920412, 55.030111], {easing: 'easeOutCubic', duration: 800}); map.setZoom(18, {easing: 'easeOutCubic', useHeightForAnimation: true, duration: 800});