once method
Adds a listener that will be called only once to a specified event type.
The listener will be called first time the event fires after the listener is registered.
@param {string} type The event type to listen for.
@param {Function} listener The function to be called when the event is fired the first time.
@returns {Object} this
Implementation
MapboxMap once(String type, Listener listener) =>
MapboxMap.fromJsObject(jsObject.once(type, allowInterop(
(EventJsImpl object) {
listener(Event.fromJsObject(object));
},
)));