MapEvents

class MapEvents

List of supported event types by the `map` and `map snapshotter` objects, and event data format specification for each event. ``` text Simplified diagram for events emitted by the map object. ┌─────────────┐ ┌─────────┐ ┌──────────────┐ │ Application │ │ Map │ │ResourceLoader│ └──────┬──────┘ └────┬────┘ └───────┬──────┘ │ │ │ ├───────setStyleURI────────▶│ │ │ ├───────────get style───────────▶│ │ │ │ │ │◀─────────style data────────────┤ │ │ │ │ ├─parse style─┐ │ │ │ │ │ │ StyleDataLoaded ◀─────────────┘ │ │◀────{"type": "style"}─────┤ │ │ ├─────────get sprite────────────▶│ │ │ │ │ │◀────────sprite data────────────┤ │ │ │ │ ├──────parse sprite───────┐ │ │ │ │ │ │ StyleDataLoaded ◀─────────────────────────┘ │ │◀───{"type": "sprite"}─────┤ │ │ ├─────get source TileJSON(s)────▶│ │ │ │ │ SourceDataLoaded │◀─────parse TileJSON data───────┤ │◀──{"type": "metadata"}────┤ │ │ │ │ │ │ │ │ StyleDataLoaded │ │ │◀───{"type": "sources"}────┤ │ │ ├──────────get tiles────────────▶│ │ │ │ │◀───────StyleLoaded────────┤ │ │ │ │ │ SourceDataLoaded │◀─────────tile data─────────────┤ │◀────{"type": "tile"}──────┤ │ │ │ │ │ │ │ │◀────RenderFrameStarted────┤ │ │ ├─────render─────┐ │ │ │ │ │ │ ◀────────────────┘ │ │◀───RenderFrameFinished────┤ │ │ ├──render, all tiles loaded──┐ │ │ │ │ │ │ ◀────────────────────────────┘ │ │◀────────MapLoaded─────────┤ │ │ │ │ │ │ │ │◀─────────MapIdle──────────┤ │ │ ┌ ─── ─┴─ ─── ┐ │ │ │ offline │ │ │ └ ─── ─┬─ ─── ┘ │ │ │ │ ├─────────setCamera────────▶│ │ │ ├───────────get tiles───────────▶│ │ │ │ │ │┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ │◀─────────MapIdle──────────┤ waiting for connectivity │ │ │ ││ Map renders cached data │ │ │ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ │ │ │ ```

Properties

CAMERA_CHANGED
Link copied to clipboard
val CAMERA_CHANGED: String
The camera has changed.
MAP_IDLE
Link copied to clipboard
val MAP_IDLE: String
The `map` has entered the idle state.
MAP_LOADED
Link copied to clipboard
val MAP_LOADED: String
The style has been fully loaded, and the `map` has rendered all visible tiles.
MAP_LOADING_ERROR
Link copied to clipboard
val MAP_LOADING_ERROR: String
Describes an error that has occured while loading the Map.
RENDER_FRAME_FINISHED
Link copied to clipboard
val RENDER_FRAME_FINISHED: String
The `map` finished rendering a frame.
RENDER_FRAME_STARTED
Link copied to clipboard
val RENDER_FRAME_STARTED: String
The `map` started rendering a frame.
RESOURCE_REQUEST
Link copied to clipboard
val RESOURCE_REQUEST: String
The `ResourceRequest` event allows client to observe resource requests made by a `map` or `map snapshotter` objects.
SOURCE_ADDED
Link copied to clipboard
val SOURCE_ADDED: String
The source has been added with `addStyleSource` method.
SOURCE_DATA_LOADED
Link copied to clipboard
val SOURCE_DATA_LOADED: String
A source data has been loaded.
SOURCE_REMOVED
Link copied to clipboard
val SOURCE_REMOVED: String
The source has been removed with `removeStyleSource` method.
STYLE_DATA_LOADED
Link copied to clipboard
val STYLE_DATA_LOADED: String
The requested style data has been loaded.
STYLE_IMAGE_MISSING
Link copied to clipboard
val STYLE_IMAGE_MISSING: String
A style has a missing image.
STYLE_IMAGE_REMOVE_UNUSED
Link copied to clipboard
val STYLE_IMAGE_REMOVE_UNUSED: String
An image added to the style is no longer needed and can be removed using `removeStyleImage` method.
STYLE_LOADED
Link copied to clipboard
val STYLE_LOADED: String
The requested style has been fully loaded, including the style, specified sprite and sources' metadata.