Hierarchy (View Summary)

Constructors

  • Parameters

    • options: {
          apiKey?: string;
          collapsed?: boolean;
          displayAltitude?: boolean;
          displayCoordinates?: boolean;
          draggable?: boolean;
          editCoordinates?: boolean;
          id?: number;
          mapCenterCallback?: Function;
          ssl?: boolean;
          systems?: any[];
          units?: any[];
      }

      options for function call.

      • OptionalapiKey?: string

        API key. The key "calcul" is used by default.

      • Optionalcollapsed?: boolean

        Specify if MousePosition control should be collapsed at startup. Default is true.

      • OptionaldisplayAltitude?: boolean

        activate (true) or deactivate (false) the altitude panel. True by default

      • OptionaldisplayCoordinates?: boolean

        activate (true) or deactivate (false) the coordinates panel. True by default

      • Optionaldraggable?: boolean

        Specify if widget is draggable

      • OptionaleditCoordinates?: boolean

        If true, coordinates from the MousePosition control can be edited by users to re-center the view. False by default.

      • Optionalid?: number

        Ability to add an identifier on the widget (advanced option)

      • OptionalmapCenterCallback?: Function

        callback...

      • Optionalssl?: boolean

        use of ssl or not (default true, service requested using https protocol)

      • Optionalsystems?: any[]

        list of projection systems, default are Geographical ("EPSG:4326"), Web Mercator ("EPSG:3857"), Lambert 93 ("EPSG:2154") and extended Lambert 2 ("EPSG:27572"). Each array element (=system) is an object with following properties :

      • Optionalunits?: any[]

        list of coordinates units, to be displayed in control units list. Values may be "DEC" (decimal degrees), "DMS" (sexagecimal), "RAD" (radians) and "GON" (grades) for geographical coordinates, and "M" or "KM" for metric coordinates

    Returns MousePosition

    var MousePosition = new ol.control.GeoportalMousePosition({
    "collapsed" : false,
    "graggable" : true,
    "displayCoordinates" : true,
    "displayAltitude" : true,
    "altitude" : {
    "triggerDelay" : 100,
    "responseDelay" : 500,
    "noDataValue" : -99999,
    "noDataValueTolerance" : 99000,
    "serviceOptions" : {}
    },
    "systems" : [
    {
    "crs" : "EPSG:3857",
    "label" : "Web Mercator",
    "type" : "Metric"
    },
    {
    "crs" : "EPSG:4326",
    "label" : "Géographiques",
    "type" : "Geographical"
    },
    {
    "label" : "Lambert 93",
    "crs" : "EPSG:2154",
    "type" : "Metric",
    "geoBBox" : {
    "left" : -9.86,
    "bottom" : 41.15,
    "right" : 10.38,
    "top" : 51.56
    }
    }
    ],
    "units" : ["DEC", "DMS"]
    });

Properties

_panelCloseButton: any
_panelHeaderContainer: any
_panelTitleContainer: any
_projectionSystemsContainer: any
_showMousePositionButton: any
collapsed: any

{Boolean} specify if MousePosition control is collapsed (true) or not (false)

container: HTMLElement
description: any
disposed: boolean

The object has already been disposed.

draggable: any

{Boolean} specify if MousePosition control is draggable (true) or not (false)

editing: any
element: HTMLElement
listable: boolean
listenerKey: undefined | null | EventsKey
listenerKeys: EventsKey[]
on: ObjectOnSignature<EventsKey>
once: ObjectOnSignature<EventsKey>
options: any
un: ObjectOnSignature<void>

Methods

  • Parameters

    • key: string

      Key name.

    • listener: Listener

      Listener.

    Returns void

  • Parameters

    • type: string

      Type.

    • listener: Listener

      Listener.

    Returns void

  • Set additional projection system

    Parameters

    • system: { crs: string; label?: string; type?: string }

      projection system

      • crs: string

        Proj4 crs alias (from proj4 defs) e.g. "EPSG:4326"

      • Optionallabel?: string

        CRS label to be displayed in control. Default is system.crs alias

      • Optionaltype?: string

        CRS units type for coordinates conversion (one of control options.units). Default is "Metric"

    Returns void

  • Protected

    Apply any properties from another object without triggering events.

    Parameters

    • source: BaseObject

      The source object.

    Returns void

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

    Returns 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.

    Parameters

    • event: string | BaseEvent

      Event object.

    Returns undefined | boolean

    false if anyone called preventDefault on the event object or if any of the listeners returned false.

  • Clean up.

    Returns void

  • Protected

    Extension point for disposable objects.

    Returns void

  • Gets a value.

    Parameters

    • key: string

      Key name.

    Returns any

    Value.

  • Get a list of object property names.

    Returns string[]

    List of property names.

  • Get the listeners for a specified event type. Listeners are returned in the order that they will be called in.

    Parameters

    • type: string

      Type.

    Returns undefined | Listener[]

    Listeners.

  • Get the map associated with this control.

    Returns null | Map

    Map.

  • Get an object of all property names and values.

    Returns { [x: string]: any }

    Object.

  • Get an object of all property names and values.

    Returns null | { [x: string]: any }

    Object.

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

    Returns number

    Revision.

  • Parameters

    • Optionaltype: string

      Type. If not provided, true will be returned if this event target has any listeners.

    Returns boolean

    Has listeners.

  • Returns boolean

    The object has properties.

  • Parameters

    • key: string

      Key name.

    • oldValue: any

      Old value.

    Returns void

  • Protected

    Parameters

    • type: string | string[]

      Type.

    • listener: (arg0: Event | BaseEvent) => unknown

      Listener.

    Returns EventsKey | EventsKey[]

    Event key.

  • Protected

    Parameters

    • type: string | string[]

      Type.

    • listener: (arg0: Event | BaseEvent) => unknown

      Listener.

    Returns EventsKey | EventsKey[]

    Event key.

  • Parameters

    • key: string

      Key name.

    • listener: Listener

      Listener.

    Returns void

  • Parameters

    • type: string

      Type.

    • listener: Listener

      Listener.

    Returns void

  • Remove projection system (in case there are several system with same code, only the first one will be removed)

    Parameters

    • systemCrs: string

      CRS alias (from proj4 defs)

    Returns void

  • Renders the control.

    Parameters

    • mapEvent: MapEvent

      Map event.

    Returns void

  • Sets a value.

    Parameters

    • key: string

      Key name.

    • value: any

      Value.

    • Optionalsilent: boolean

      Update without triggering an event.

    Returns void

  • Set control altitude options (useless if displayAltitude == false)

    Parameters

    • options: { responseDelay?: number; serviceOptions?: any; triggerDelay?: number }

      altitude options

      • OptionalresponseDelay?: number

        latency for elevation request, 500 ms by default

      • OptionalserviceOptions?: any

        options of elevation service

      • OptionaltriggerDelay?: number

        immobilisation time of movement on the map to trigger the elevation calculation, 200 ms by default

    Returns void

  • 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).

    Parameters

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

      Values.

    • Optionalsilent: boolean

      Update without triggering an event.

    Returns void

  • This function is used to set a target element for the control. It has no effect if it is called after the control has been added to the map (i.e. after setMap is called on the control). If no target is set in the options passed to the control constructor and if setTarget is not called then the control is added to the map's overlay container.

    Parameters

    • target: string | HTMLElement

      Target.

    Returns void

  • Set control units (to be displayed)

    Parameters

    • units: any[]

      list of all coordinates units, to be displayed in control units list. Values may be "DEC" (decimal degrees), "DMS" (sexagecimal), "RAD" (radians) and "GON" (grades) for geographical coordinates, and "M" or "KM" for metric coordinates

    Returns void

  • Protected

    Unlisten for a certain type of event.

    Parameters

    • type: string | string[]

      Type.

    • listener: (arg0: Event | BaseEvent) => unknown

      Listener.

    Returns void

  • Unsets a property.

    Parameters

    • key: string

      Key name.

    • Optionalsilent: boolean

      Unset without triggering an event.

    Returns void