PilotGaea 2D O'view
    正在準備搜尋索引...

    類別 Overlay

    An element to be displayed over the map and attached to a single map location. Like ol.control.Control, Overlays are visible widgets. Unlike Controls, they are not in a fixed position on the screen, but are tied to a geographical coordinate, so panning the map will move an Overlay but not a Control.

    Example:

    var popup = new ol.Overlay({
      element: document.getElementById('popup')
    });
    popup.setPosition(coordinate);
    map.addOverlay(popup);
    

    Overlay options.

    stable

    層級 (查看層級一覽)

    索引

    方法

    • Removes an event listener using the key returned by on() or once().

      參數

      • key: Object | Object[]

        The key returned by on() or once() (or an array of keys).

      回傳 void

      stable

    • Get the DOM element of this overlay.

      回傳 Element

      The Element containing the overlay.

      stable

    • Get the overlay identifier which is set on constructor.

      回傳 string | number

      Id.

    • Get the map associated with this overlay.

      回傳 Map

      The map that the overlay is part of.

      stable

    • Get the offset of this overlay.

      回傳 number[]

      The offset.

      stable

    • Get the current position of this overlay.

      回傳 Coordinate

      The spatial point that the overlay is anchored at.

      stable

    • Get the current positioning of this overlay.

      回傳 OverlayPositioning

      How the overlay is positioned relative to its point on the map.

      stable

    • Set the DOM element to be associated with this overlay.

      參數

      • element: Element

        The Element containing the overlay.

      回傳 void

      stable

    • Set the map to be associated with this overlay.

      參數

      • map: Map

        The map that the overlay is part of.

      回傳 void

      stable

    • Set the offset for this overlay.

      參數

      • offset: number[]

        Offset.

      回傳 void

      stable

    • Set the position for this overlay. If the position is undefined the overlay is hidden.

      參數

      • position: Coordinate

        The spatial point that the overlay is anchored at.

      回傳 void

      stable

    • Set the positioning for this overlay.

      參數

      • positioning: OverlayPositioning

        how the overlay is positioned relative to its point on the map.

      回傳 void

      stable

    • Gets a value.

      參數

      • key: string

        Key name.

      回傳 any

      Value.

      stable

    • Get a list of object property names.

      回傳 string[]

      List of property names.

      stable

    • Get an object of all property names and values.

      回傳 { [k: string]: any }

      Object.

      stable

    • Sets a value.

      參數

      • key: string

        Key name.

      • value: any

        Value.

      • 可選opt_silent: boolean

        Update without triggering an event.

      回傳 void

      stable

    • Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).

      參數

      • values: { [k: string]: any }

        Values.

      • 可選opt_silent: boolean

        Update without triggering an event.

      回傳 void

      stable

    • Unsets a property.

      參數

      • key: string

        Key name.

      • 可選opt_silent: boolean

        Unset without triggering an event.

      回傳 void

      stable

    • Increases the revision counter and dispatches a 'change' event.

      回傳 void

    • 函數

      Dispatches an event and calls all listeners listening for events of this type. The event parameter can either be a string or an Object with a type property.

      參數

      回傳 void

    • Get the version number for this object. Each time the object is modified, its version number will be incremented.

      回傳 number

      Revision.

    • Listen for a certain type of event.

      參數

      • type: string | string[]

        The event type or array of event types.

      • listener: Function

        The listener function.

      • 可選opt_this: Object

        The object to use as this in listener.

      回傳 Object | Object[]

      Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.

      stable

    • Listen once for a certain type of event.

      參數

      • type: string | string[]

        The event type or array of event types.

      • listener: Function

        The listener function.

      • 可選opt_this: Object

        The object to use as this in listener.

      回傳 Object | Object[]

      Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.

      stable

    • Unlisten for a certain type of event.

      參數

      • type: string | string[]

        The event type or array of event types.

      • listener: Function

        The listener function.

      • 可選opt_this: Object

        The object which was used as this by the listener.

      回傳 void

      stable

    • 函數

      Removes an event listener using the key returned by on() or once(). Note that using the ol.Observable.unByKey static function is to be preferred.

      參數

      • key: Object | Object[]

        The key returned by on() or once() (or an array of keys).

      回傳 void

      stable

    構造函數

    • 參數

      回傳 Overlay

      An element to be displayed over the map and attached to a single map location. Like ol.control.Control, Overlays are visible widgets. Unlike Controls, they are not in a fixed position on the screen, but are tied to a geographical coordinate, so panning the map will move an Overlay but not a Control.

      Example:

      var popup = new ol.Overlay({
        element: document.getElementById('popup')
      });
      popup.setPosition(coordinate);
      map.addOverlay(popup);
      

      stable