You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
838 B
37 lines
838 B
/**
|
|
* @module ol/MapEvent
|
|
*/
|
|
import Event from './events/Event.js';
|
|
|
|
/**
|
|
* @classdesc
|
|
* Events emitted as map events are instances of this type.
|
|
* See {@link module:ol/Map~Map} for which events trigger a map event.
|
|
*/
|
|
class MapEvent extends Event {
|
|
/**
|
|
* @param {string} type Event type.
|
|
* @param {import("./Map.js").default} map Map.
|
|
* @param {?import("./Map.js").FrameState} [frameState] Frame state.
|
|
*/
|
|
constructor(type, map, frameState) {
|
|
super(type);
|
|
|
|
/**
|
|
* The map where the event occurred.
|
|
* @type {import("./Map.js").default}
|
|
* @api
|
|
*/
|
|
this.map = map;
|
|
|
|
/**
|
|
* The frame state at the time of the event.
|
|
* @type {?import("./Map.js").FrameState}
|
|
* @api
|
|
*/
|
|
this.frameState = frameState !== undefined ? frameState : null;
|
|
}
|
|
}
|
|
|
|
export default MapEvent;
|