Instance Method

addEventListener

Subscribes a listener function to an event type.

Declaration

void addEventListener(String type, function listener, optional Object thisObject);

Parameters

type

The type of event (e.g., "configuration-change").

listener

The callback function to invoke. listener is passed an Event as its sole argument.

thisObject

An object set as the this keyword on the listener function.

See Also

Initialization

Handling Initialization Events

Handle events that trigger when MapKit JS initializes.

init

Initialize MapKit JS by providing an authorization callback function and optional language.

MapKitInitOptions

Initialization options for MapKit JS.

removeEventListener

Unsubscribes a listener function from an event type.