Maps SDK for Web
tt.Map
The Map object represents the map on your page. It exposes methods and properties that enable you to programmatically change the map and fires events as users interact with it. You create a Map by specifying a container and other options.
Constructor
tt.Map(options)
Example
new tt.map(options)
Parameters
Name | Description |
---|---|
options
Object default:None |
Object with options. |
options.key
String default:None |
Maps key. |
options.container
HTMLElement | String default:None |
The HTML element representig map container or id of that element. |
options.basePath
String default:'/sdk' |
Base path to sdk directory. |
options.stylesDirectoryPath
String default:'/styles' |
Styles directory path relative to base path. |
options.language
String default:None |
Map language. |
options.geopoliticalView
String default:None |
Map geopolitical view. |
options.theme
IMapThemeOptions default:None |
Object defining style of the map. Either this option or style may be provided but not both. |
options.initialized
Function default:None |
Callback function that is run after map initialization. |
options.minZoom
Number default:None |
The minimum zoom level of the map (0-24). |
options.maxZoom
Number default:None |
The maximum zoom level of the map (0-24). |
options.style
Object | String default:None |
The map's style. This must be a JSON object conforming to the schema described in this compatible specification or, a URL to such JSON. Either this option or theme may be provided but not both. |
options.hash
Boolean default:false |
If true, the map's position (zoom, center latitude, center longitude, bearing, and pitch) will be synced with the hash fragment of the page's URL. For example, http://path/to/my/page.html#2.59/39.26/53.07/-24.1/60 . |
options.interactive
Boolean default:true |
If false, no mouse, touch, or keyboard listeners will be attached to the map, so it will not respond to interaction. |
options.bearingSnap
Number default:7 |
The threshold, measured in degrees, that determines when the map's bearing will snap to north. For example, with a bearingSnap of 7, if the user rotates the map within 7 degrees of north, the map will automatically snap to exact north. |
options.pitchWithRotate
Boolean default:true |
If false, the map's pitch (tilt) control with "drag to rotate" interaction will be disabled. |
options.clickTolerance
Number default:3 |
The max number of pixels a user can shift the mouse pointer during a click for it to be considered a valid click (as opposed to a mouse drag). |
options.failIfMajorPerformanceCaveat
Boolean default:false |
If true, map creation will fail if the performance of Map would be dramatically worse than expected (i.e., a software renderer would be used). |
options.preserveDrawingBuffer
Boolean default:false |
If true, the map's canvas can be exported to a PNG using tt.map.getCanvas().toDataURL(). This is false by default as a performance optimization. |
options.refreshExpiredTiles
Boolean default:true |
If false, the map won't attempt to re-request tiles once they expire per their HTTP cacheControl / expires headers. |
options.maxBounds
Maps.LngLat default:None |
If set, the map will be constrained to the given bounds. |
options.scrollZoom
Boolean | Object default:true |
If true, the "scroll to zoom" interaction is enabled. |
options.boxZoom
Boolean default:true |
If true, the "box zoom" interaction is enabled. |
options.dragRotate
Boolean default:true |
If true, the "drag to rotate" interaction is enabled. |
options.dragPan
Boolean default:true |
If true, the "drag to pan" interaction is enabled. |
options.keyboard
Boolean default:true |
If true, keyboard shortcuts are enabled. |
options.doubleClickZoom
Boolean default:true |
If true, the "double click to zoom" interaction is enabled. |
options.touchZoomRotate
Boolean | Object default:true |
If true, the "pinch to rotate and zoom" interaction is enabled. |
options.trackResize
Boolean | Object default:true |
If true, the map will automatically resize when the browser window resizes. |
options.center
Maps.LngLat default:None |
The inital geographical center point of the map. If center is not specified in the constructor options, the Maps SDK will look for it in the map's style object. If it is not specified in the style it will default to (0, 0). Note: The Maps SDK uses longitude, latitude coordinate order (as opposed to latitude, longitude) to match GeoJSON. |
options.zoom
Number default:0 |
The initial zoom level of the map. If zoom is not specified in the constructor options, the Maps SDK will look for it in the map's style object. If it is not specified in the style it will default to 0. |
options.bearing
Number default:0 |
The initial bearing (rotation) of the map, measured in degrees counter-clockwise from north. If bearing is not specified in the constructor options, the Maps SDK will look for it in the map's style object. If it is not specified in the style it will default to 0. |
options.pitch
Number default:0 |
The initial pitch (tilt) of the map, measured in degrees away from the plane of the screen (0-60). If pitch is not specified in the constructor options, the Maps SDK will look for it in the map's style object. If it is not specified in the style, it will default to 0. |
options.bounds
Maps.LngLat default:None |
The initial bounds of the map. If bounds is specified, it overrides center and zoom constructor options. |
options.fitBoundsOptions
Object default:None |
A fitBounds options object to use only when fitting the initial bounds provided above. |
options.renderWorldCopies
Boolean default:None |
If true, multiple copies of the world will be rendered when zoomed out. |
options.maxTileCacheSize
Number default:null |
The maximum number of tiles stored in the tile cache for a given source. If omitted, the cache will be dynamically sized based on the current viewport. |
options.localIdeographFontFamily
String default:null |
If specified, defines a CSS font-family for locally overriding the generation of glyphs in the 'CJK Unified Ideographs' and 'Hangul Syllables' ranges. In these ranges, font settings from the map's style will be ignored except for font-weight keywords (light/regular/medium/bold). The purpose of this option is to avoid bandwidth-intensive glyph server requests. |
options.collectResourceTiming
Boolean default:false |
If true, Resource Timing API information will be collected for requests made by GeoJSON and Vector Tile Web Workers (this information is normally inaccessible from the main JavaScript thread). Information will be returned in a resourceTiming property of relevant data events. |
options.fadeDuration
Number default:300 |
Controls the duration of the fade-in/fade-out animation for label collisions in milliseconds. This setting affects all symbol layers. This setting does not affect the duration of runtime styling transitions or raster tile cross-fading. |
options.crossSourceCollisions
Boolean default:true |
Controls the duration of the fade-in/fade-out animation for label. |
options.attributionControlPosition
String default:'bottom-right' |
Sets position of attribution control. |
Properties
boxZoom: Maps.BoxZoomHandler
doubleClickZoom: Maps.DoubleClickZoomHandler
dragPan: Maps.DragPanHandler
dragRotate: Maps.DragRotateHandler
keyboard: Maps.KeyboardHandler
- = / +: Increase the zoom level by 1.
- Shift-= / Shift-+: Increase the zoom level by 2.
- -: Decrease the zoom level by 1.
- Shift--: Decrease the zoom level by 2.
- Arrow keys: Pan by 100 pixels.
- Shift+⇢: Increase the rotation by 15 degrees.
- Shift+⇠: Decrease the rotation by 15 degrees.
- Shift+⇡: Increase the pitch by 10 degrees.
- Shift+⇣: Decrease the pitch by 10 degrees.
scrollZoom: Maps.ScrollZoomHandler
touchZoomRotate: Maps.TouchZoomRotateHandler
Methods
addControl(plugin, [position]): Maps.Map
Add plugin to the map.
Parameters
Returns
Map instance
addLayer(layer, [before]): Maps.Map
Adds a style layer to the map's style. A layer defines styling for data from a specified source.
Parameters
Returns
This
addSource(id, source): Maps.Map
addTier(tier): Promise
Adds a tier.
Parameters
Name | Description |
---|---|
tier
Object default:None |
For example, a TrafficIncidentTier or TrafficFlowTilesTier instance. |
Returns
Returns "false" if a tier was already added, "true" otherwise.
areTilesLoaded( ): Boolean
Returns a Boolean indicating whether all tiles in the viewport from all sources on the style are loaded.
Returns
A Boolean indicating whether all tiles are loaded.
easeTo(options, [eventData]): Maps.Map
Changes any combination of center, zoom, bearing, and pitch,
with an animated transition between old and new values.
The map will retain its current values for any details not specified in options
.
Parameters
Name | Description |
---|---|
options
ICameraOptions | IAnimationOptions default:None |
Camera and animation options. |
eventData
Object default:None |
Additional properties to be added to event objects of events triggered by this method. |
Returns
Map instance
fitBounds(bounds, [options]): Maps.Map
Pans and zooms the map to contain its visible area within the specified geographical bounds. This function will also reset the map's bearing to 0 if the bearing is nonzero.
Example
var bounds = [[-10, 52], [10, 55]];
tt.map.fitBounds(bounds, {
padding: { top: 10, bottom:25, left: 15, right: 5 }
maxZoom: 12
});
Parameters
Name | Description |
---|---|
bounds
Maps.LngLatBounds default:None |
Center these bounds in the viewport and use the highest zoom level up to and including getMaxZoom that fits them in the viewport. |
options
Object default:None |
Options supports all properties from IAnimationOptions and ICameraOptions in addition to the fields below. |
options.padding
Object default:None |
The amount of padding in pixels to add to the given bounds. |
options.linear
Boolean default:None |
If true, the map transitions using Map#easeTo.
If false , the map transitions using Map#flyTo.
See those functions and AnimationOptions for information about the options available.
|
options.easing
Function default:None |
An easing function for the animated transition. |
options.offset
Maps.Point default:None |
The center of the given bounds relative to the map's center measured in pixels. |
options.maxZoom
Number default:None |
The maximum zoom level to allow when the map view transitions to the specified bounds and fields listed in the example. |
Returns
Map instance
flyTo([options], [eventData]): Maps.Map
Changes any combination of center, zoom, bearing, and pitch, animating the transition along a curve that evokes flight. The animation seamlessly incorporates zooming and panning to help users maintain their bearings even after traversing a great distance.
Parameters
Name | Description |
---|---|
options
Object default:None |
Options supports all properties from IAnimationOptions and ICameraOptions in addition to the fields below. |
options.curve
Number default:1.42 |
The zooming "curve" that will occur along the flight path. A high value maximizes zooming for an exaggerated animation, while a low value minimizes zooming for an effect closer to Map#easeTo. 1.42 is the average value selected by participants in the user study discussed in van Wijk (2003). A value of Math.pow(6, 0.25) would be equivalent to the root mean squared average velocity. A value of 1 would produce a circular motion. |
options.minZoom
Number default:None |
The zero-based zoom level at the peak of the flight path. If options.curve is specified, this option is ignored. |
options.speed
Number default:1.2 |
The average speed of the animation defined in relation to options.curve. A speed of 1.2 means that the map appears to move along the flight path by 1.2 times options.curve screenfuls every second. A screenful is the map's visible span. It does not correspond to a fixed physical distance, but varies by zoom level. |
options.screenSpeed
Number default:None |
The average speed of the animation measured in screenfuls per second assuming a linear timing curve. If options.speed is specified, this option is ignored. |
options.maxDuration
Number default:None |
The animation's maximum duration measured in milliseconds. If duration exceeds maximum duration it resets to 0. |
eventData
Object default:None |
Additional properties to be added to event objects of events triggered by this method. |
Returns
Map instance
getAttributionControl( ): Maps.TomTomAttributionControl
Returns a TomTomAttributionControl instance.
Returns
getBearing( ): Number
Returns the map's current bearing. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that east is up.
Returns
The map's current bearing.
getBounds( ): Maps.LngLatBounds
Returns the map's geographical bounds. When the bearing or pitch is non-zero, the visible region is not an axis-aligned rectangle, and the result is the smallest bounds that encompasses the visible region.
Returns
getCanvas( ): HTMLCanvasElement
Returns the map's <canvas>
element.
Returns
The map's canvas element.
getCanvasContainer( ): HTMLElement
Returns the HTML element containing the map's <canvas>
element.
If you want to add non-GL overlays to the map, you should append them to this element.
This is the element to which event bindings for map interactivity (such as panning and zooming) are attached.
It will receive bubbled events from child elements such as the <canvas>
, but not from map controls.
Returns
The container of the map's canvas.
getCenter( ): Maps.LngLat
The map's geographical centerpoint.
Returns
getContainer( ): HTMLElement
Returns the map's containing HTML element.
Returns
The map's container.
getFilter(layer): Array
Returns the filter applied to the specified style layer.
Parameters
Name | Description |
---|---|
layer
String default:None |
The ID of the style layer whose filter to get. |
Returns
The layer's filter.
getGeopoliticalView( ): String
This method returns a geopolitical view set.
Returns
getLanguage( ): String
This method returns a language set.
Returns
getLayer(id): Object
Returns the layer with the specified ID in the map's style.
Parameters
Name | Description |
---|---|
id
String default:None |
The ID of the layer to get. |
Returns
The layer with the specified ID, or undefined if the ID corresponds to no existing layers.
getLayoutProperty(layer, name): Any
getMaxBounds( ): Maps.LngLatBounds | Null
Returns the maximum geographical bounds the map is constrained to, or null
if none set.
Returns
getMaxZoom( ): Number
Returns the map's maximum allowable zoom level.
Returns
maxZoom.
getMinZoom( ): Number
Returns the map's minimum allowable zoom level.
Returns
minZoom.
getPaintProperty(layer, name): Any
getPitch( ): Number
Returns the map's current pitch (tilt).
Returns
The map's current pitch measured in degrees away from the plane of the screen.
getSource(id): Object
Returns the source with the specified ID in the map's style.
Parameters
Name | Description |
---|---|
id
String default:None |
The ID of the source to get. |
Returns
The style source with the specified ID, or undefined if the ID corresponds to no existing sources.
getStyle( ): Object
Returns the map's style object which can be used to recreate the map's style.
Returns
The map's style object.
getZoom( ): Number
Returns the map's current zoom level.
Returns
The map's current zoom level.
isMoving( ): Boolean
Returns true if the map is panning, zooming, rotating, or pitching due to a camera animation or user gesture.
Returns
isRotating( ): Boolean
Returns true if the map is rotating due to a camera animation or user gesture.
Returns
isSourceLoaded(id): Boolean
Returns a Boolean indicating whether the source is loaded.
Parameters
Name | Description |
---|---|
id
String default:None |
The ID of the source to be checked. |
Returns
A Boolean indicating whether the source is loaded.
isStyleLoaded( ): Boolean
Returns a Boolean indicating whether the map's style is fully loaded.
Returns
A Boolean indicating whether the style is fully loaded.
isZooming( ): Boolean
Returns true if the map is zooming due to a camera animation or user gesture.
Returns
jumpTo([options], [eventData]): Maps.Map
Changes any combination of center, zoom, bearing, and pitch, without an animated transition.
The map will retain its current values for any details not specified in options
.
Parameters
Name | Description |
---|---|
options
Object default:None |
Options supports all properties from ICameraOptions. |
eventData
Object default:None |
Additional properties to be added to event objects of events triggered by this method. |
Returns
Map instance
loaded( ): Boolean
Returns a Boolean indicating whether the map is fully loaded. Returns false if the style is not yet fully loaded, or if there has been a change to the sources or style that has not yet fully loaded.
Returns
A Boolean indicating whether the map is fully loaded.
moveLayer(id, [beforeId]): Maps.Map
Moves a layer to a different z-position.
Parameters
Returns
This
off(type, listener): Maps.Map
on(type, listener): Maps.Map
Adds a listener for events of a specified type.
Parameters
Returns
This
once(type, listener): Maps.Map
Adds a listener that will be called only once to a specified event type. The listener will be called the first time the event fires after the listener is registered.
Parameters
Returns
This
panTo(lnglat, [options], [eventData]): Maps.Map
Pans the map to the specified location with an animated transition.
Parameters
Name | Description |
---|---|
lnglat
Maps.LngLat default:None |
The location to pan the map to. |
options
Object default:None |
Animation options. |
eventData
Object default:None |
Additional properties to be added to event objects of events triggered by this method. |
Returns
Map instance
project(lnglat): Maps.Point
Returns a Point representing pixel coordinates, relative to the map's container that correspond to the specified geographical location.
Parameters
Name | Description |
---|---|
lnglat
Maps.LngLat default:None |
The geographical location to project. |
Returns
The Point corresponding to lnglat relative to the map's container.
remove( )
Clean up and release all internal resources associated with this map. This includes DOM elements, event bindings, Web Workers, and WebGL resources. Use this method when you are done using the map and wish to ensure that it no longer consumes browser resources. Afterwards, you must not call any other methods on the map.
removeControl(plugin): Maps.Map
Removes the plugin from the map.
Parameters
Name | Description |
---|---|
plugin
Plugin default:None |
The plugin to remove. |
Returns
Map instance
removeLayer(id)
Removes the layer with the given id from the map's style. If no such layer exists, an error event is fired.
Parameters
Name | Description |
---|---|
id
String default:None |
The ID of the layer to remove. |
removeSource(id): Maps.Map
Removes a source from the map's style.
Parameters
Name | Description |
---|---|
id
String default:None |
The ID of the source to remove. |
Returns
This
removeTier(tierId): Promise
Removes a tier.
Parameters
Name | Description |
---|---|
tierId
String default:None |
The tier id. |
Returns
Returns "false" if a tier was not in the list of tiers, "true" otherwise.
resize([eventData]): Maps.Map
Resizes the map according to the dimensions of its container element. This method must be called after the map's container is resized by another script or when the map is shown after being initially hidden with CSS.
Parameters
Name | Description |
---|---|
eventData
Object default:None |
Additional properties to be added to event objects of events triggered by this method. |
Returns
Map instance
rotateTo(bearing, [options], [eventData]): Maps.Map
Rotates the map to the specified bearing with an animated transition. The bearing is the compass direction that is "up"; for example, a bearing of 90° orients the map so that East is up.
Example
var bounds = [[-10, 52], [10, 55]];
tt.map.rotateTo(30, {
duration: 5000,
easing: function(t) { return t; }
offset: [0, 50],
animate: true
});
Parameters
Name | Description |
---|---|
bearing
Number default:None |
The desired bearing. |
options
ICameraOptions default:None |
Animation options. |
duration
Number default:None |
The animation's duration measured in milliseconds. |
easing
Function default:None |
A function taking a time in the range 0..1 and returning a number where 0 is the initial state and 1 is the final state. |
offset
Maps.Point default:None |
Offset of the target center relative to the real map container center at the end of animation. |
animate
Boolean default:None |
If false , no animation will occur.
|
eventData
Object default:None |
Additional properties to be added to event objects of events triggered by this method. |
Returns
Map instance
setBearing(bearing, [eventData]): Maps.Map
Sets the map's bearing (rotation). The bearing is the compass direction that is "up";
for example, a bearing of 90° orients the map so that East is up.
Equivalent to jumpTo({bearing: bearing})
.
Parameters
Returns
Map instance
setCenter(lnglat, [eventData]): Maps.Map
Sets the map's geographical centerpoint. Equivalent to jumpTo({center: center})
.
Parameters
Name | Description |
---|---|
lnglat
Maps.LngLat default:None |
The centerpoint to set. |
eventData
Object default:None |
Additional properties to be added to event objects of events triggered by this method. |
Returns
Map instance
setFilter(layer, filter, [options={}]): Maps.Map
Sets the filter for the specified style layer.
Example
map.setFilter('my-layer', ['==', 'name', 'USA']);
Parameters
Name | Description |
---|---|
layer
String default:None |
The ID of the layer to which the filter will be applied. |
filter
Array | Null | Undefined default:None |
The filter, conforming to the style specification's filter definition. If null or undefined is provided, the function removes any existing filter from the layer. |
options
Object default:{} |
|
options.validate
Object default:true |
Whether to check if the filter conforms to the style specification. Disabling validation is a performance optimization that should only be used if you have previously validated the values you will be passing to this function. |
Returns
This
setGeopoliticalView(geopoliticalView): Promise
This method sets a geopolitical view for a given map. This setting will only affect map tiles and not other services, e.g., search. Providing an empty string ('') as an input value will unset this option. Supported geopolitical views can be obtained from here.
Parameters
Name | Description |
---|---|
geopoliticalView
String default:None |
Returns
setLanguage(language): Promise
This method sets a language for a given map. This setting will affect only map tiles and not other services, e.g., search. Providing an empty string ('') as an input value will unset this option. Supported languages can be obtained from the list of: Supported Languages page.
Parameters
Name | Description |
---|---|
language
String default:None |
Returns
setLayerZoomRange(layerId, minzoom, maxzoom): Maps.Map
The ID of the layer to which the zoom extent will be applied.
Example
map.setLayerZoomRange('my-layer', 2, 5);
Parameters
Returns
This
setLayoutProperty(layer, name, value, [options={}]): Maps.Map
Sets the value of a layout property in the specified style layer.
Parameters
Name | Description |
---|---|
layer
String default:None |
The ID of the layer to set the layout property in. |
name
String default:None |
The name of the layout property to set. |
value
Any default:None |
The value of the layout propery. Must be of a type appropriate for the property. |
options
Object default:{} |
|
options.validate
Object default:true |
Whether to check if the filter conforms to the style specification. Disabling validation is a performance optimization that should only be used if you have previously validated the values you will be passing to this function. |
Returns
This
setMaxBounds(bounds): Maps.Map
Sets or clears the map's geographical bounds. Pan and zoom operations are constrained within these bounds. If a pan or zoom is performed that would display regions outside of these bounds, the map will instead display a position and zoom level as close as possible to the operation's request while still remaining within the bounds.
Parameters
Name | Description |
---|---|
bounds
Maps.LngLatBounds | Null | Undefined default:None |
The maximum bounds to set.
If null or undefined is provided, the function removes the map's maximum bounds.
|
Returns
Map instance
setMaxZoom(maxZoom): Maps.Map
Sets or clears the map's maximum zoom level. If the map's current zoom level is higher than the new maximum, the map will zoom to the new maximum.
Parameters
Name | Description |
---|---|
maxZoom
Number | Null | Undefined default:None |
The maximum zoom level to set.
If null or undefined is provided, the function removes the current maximum zoom (sets it to 22).
|
Returns
Map instance
setMinZoom(minZoom): Maps.Map
Sets or clears the map's minimum zoom level. If the map's current zoom level is lower than the new minimum, the map will zoom to the new minimum.
Parameters
Name | Description |
---|---|
minZoom
Number | Null | Undefined default:None |
The minimum zoom level to set (0-24).
If null or undefined is provided, the function removes the current minimum zoom (i.e., sets it to 0).
|
Returns
Map instance
setPaintProperty(layer, name, value, [options={}]): Maps.Map
Sets the value of a paint property in the specified style layer.
Parameters
Name | Description |
---|---|
layer
String default:None |
The ID of the layer to set the paint property in. |
name
String default:None |
The name of the paint property to set. |
value
Any default:None |
The value of the paint propery to set. Must be of a type appropriate for the property. |
options
Object default:{} |
|
options.validate
Object default:true |
Whether to check if the filter conforms to the style specification. Disabling validation is a performance optimization that should only be used if you have previously validated the values you will be passing to this function. |
Returns
This
setPitch(pitch, [eventData]): Maps.Map
Sets the map's pitch (tilt). Equivalent to jumpTo({pitch: pitch})
.
Parameters
Returns
Map instance
setStyle(style, [options={}], [localIdeographFontFamily=null]): Maps.Map
Updates the map's style object with a new value. If a style already is set and options.diff is true, this compares the style against the map's current state and only performs the changes necessary to make the map style match the desired state.
Parameters
Name | Description |
---|---|
style
Object | String | Null default:None |
A JSON object conforming to the schema described in the style specification, or a URL to such JSON. |
options
Object default:{} |
|
options.diff
Boolean default:true |
If false, force a 'full' update, removing the current style and building the given one instead of attempting a diff-based update. |
localIdeographFontFamily
String default:null |
If non-null, defines a CSS font-family for locally overriding the generation of glyphs in the 'CJK Unified Ideographs' and 'Hangul Syllables' ranges. Forces a full update. |
Returns
This
setZoom(zoom, [eventData]): Maps.Map
stop( ): Maps.Map
Stops any animated transition underway.
Returns
Map instance
triggerRepaint( )
Trigger the rendering of a single frame. Use this method with custom layers to repaint the map when the layer changes. Calling this multiple times before the next frame is rendered will still result in only a single frame being rendered.
unproject(point): Maps.LngLat
Returns a LngLat representing geographical coordinates that correspond to the specified pixel coordinates.
Parameters
Name | Description |
---|---|
point
Maps.Point default:None |
The pixel coordinates to unproject. |
Returns
The LngLat corresponding to point.
zoomTo(zoom, [options], [eventData]): Maps.Map
Zooms the map to the specified zoom level with an animated transition.
Parameters
Returns
Map instance
Events
All the class events are keys of the Events static member.
To learn more about how to listen events please refer to the Evented class.
boxzoomcancel : Maps.BoxZoomEvent
boxzoomend : Maps.BoxZoomEvent
boxzoomstart : Maps.BoxZoomEvent
click : Maps.MapMouseEvent
contextmenu : Maps.MapMouseEvent
data : Maps.MapDataEvent
dataloading : Maps.MapDataEvent
dblclick : Maps.MapMouseEvent
drag : Maps.MapMouseEvent | Maps.MapTouchEvent
dragsend : DragEvent
dragstart : DragEvent
error : Object
idle
- No camera transitions are in progress.
- All currently requested tiles have loaded.
- All fade/transition animations have completed.
load
mousedown : Maps.MapMouseEvent
mouseenter : Maps.MapMouseEvent
mouseleave : Maps.MapMouseEvent
mousemove : Maps.MapMouseEvent
mouseout : Maps.MapMouseEvent
mouseover : Maps.MapMouseEvent
mouseup : Maps.MapMouseEvent
move : Maps.MapMouseEvent | Maps.MapTouchEvent
movesend : DragEvent
movestart : DragEvent
pitch : Maps.MapEventData
pitchend : Maps.MapEventData
pitchstart : Maps.MapEventData
remove
render
- A change to the map's position, zoom, pitch, or bearing.
- A change to the map's style.
- A change to a GeoJSON source.
- The loading of a vector tile, GeoJSON file, glyph, or sprite.