# all files / ol/ mapevent.js

100% Statements 9/9
100% Branches 2/2
100% Functions 1/1
100% Lines 9/9

    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
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    621×
    1×

    1×

    1×

    1×

    424×

    424×

    424×

    1×
     goog.provide('ol.MapEvent');
    goog.provide('ol.MapEventType');

    goog.require('goog.events.Event');

    /**
     * @enum {string}
     */
    ol.MapEventType = {

      /**
       * Triggered after a map frame is rendered.
       * @event ol.MapEvent#postrender
       * @api
       */
      POSTRENDER: 'postrender',

      /**
       * Triggered after the map is moved.
       * @event ol.MapEvent#moveend
       * @api stable
       */
      MOVEEND: 'moveend'

    };

    /**
     * @classdesc
     * Events emitted as map events are instances of this type.
     * See {@link ol.Map} for which events trigger a map event.
     *
     * @constructor
     * @extends {goog.events.Event}
     * @implements {oli.MapEvent}
     * @param {string} type Event type.
     * @param {ol.Map} map Map.
     * @param {?olx.FrameState=} opt_frameState Frame state.
     */
    ol.MapEvent = function(type, map, opt_frameState) {

      goog.base(this, type);

      /**
       * The map where the event occurred.
       * @type {ol.Map}
       * @api stable
       */
      this.map = map;

      /**
       * The frame state at the time of the event.
       * @type {?olx.FrameState}
       * @api
       */
      this.frameState = opt_frameState !== undefined ? opt_frameState : null;

    };
    goog.inherits(ol.MapEvent, goog.events.Event);