forked from openlayers/openlayers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMapEvent.js
36 lines (32 loc) · 908 Bytes
/
MapEvent.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
* @module ol/MapEvent
*/
import Event from './events/Event.js';
/**
* @classdesc
* Events emitted as map events are instances of this type.
* See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map event.
*/
class MapEvent extends Event {
/**
* @param {string} type Event type.
* @param {import("./PluggableMap.js").default} map Map.
* @param {?import("./PluggableMap.js").FrameState} [opt_frameState] Frame state.
*/
constructor(type, map, opt_frameState) {
super(type);
/**
* The map where the event occurred.
* @type {import("./PluggableMap.js").default}
* @api
*/
this.map = map;
/**
* The frame state at the time of the event.
* @type {?import("./PluggableMap.js").FrameState}
* @api
*/
this.frameState = opt_frameState !== undefined ? opt_frameState : null;
}
}
export default MapEvent;