Optional
apiKey?: stringAPI key. The key "calcul" is used by default.
Optional
collapsed?: booleanSpecify if MousePosition control should be collapsed at startup. Default is true.
Optional
displayAltitude?: booleanactivate (true) or deactivate (false) the altitude panel. True by default
Optional
displayCoordinates?: booleanactivate (true) or deactivate (false) the coordinates panel. True by default
Optional
draggable?: booleanSpecify if widget is draggable
Optional
editCoordinates?: booleanIf true, coordinates from the MousePosition control can be edited by users to re-center the view. False by default.
Optional
id?: numberAbility to add an identifier on the widget (advanced option)
Optional
mapCenterCallback?: Functioncallback...
Optional
ssl?: booleanuse of ssl or not (default true, service requested using https protocol)
Optional
systems?: 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 :
Optional
units?: 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
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"]
});
{Boolean} specify if MousePosition control is collapsed (true) or not (false)
Protected
disposedThe object has already been disposed.
{Boolean} specify if MousePosition control is draggable (true) or not (false)
Protected
listenerKey name.
Listener.
Type.
Listener.
Set additional projection system
projection system
Proj4 crs alias (from proj4 defs) e.g. "EPSG:4326"
Optional
label?: stringCRS label to be displayed in control. Default is system.crs alias
Optional
type?: stringCRS units type for coordinates conversion (one of control options.units). Default is "Metric"
Set additional projection systems
Array of system object, with following properties :
Protected
applyProtected
Apply any properties from another object without triggering events.
The source object.
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.
Event object.
false
if anyone called preventDefault on the
event object or if any of the listeners returned false.
Display or hide elevation panel
true to display elevation panel, false to hide it
Display or hide coordinates panel
true to display coordinates panel, false to hide it
Clean up.
Protected
disposeProtected
Extension point for disposable objects.
Get container
container
Get the listeners for a specified event type. Listeners are returned in the order that they will be called in.
Type.
Listeners.
Get an object of all property names and values.
Object.
Optional
type: stringType. If not provided,
true
will be returned if this event target has any listeners.
Has listeners.
The object has properties.
Key name.
Old value.
Protected
onceProtected
onKey name.
Listener.
Type.
Listener.
Remove projection system (in case there are several system with same code, only the first one will be removed)
CRS alias (from proj4 defs)
Set control altitude options (useless if displayAltitude == false)
altitude options
Optional
responseDelay?: numberlatency for elevation request, 500 ms by default
Optional
serviceOptions?: anyoptions of elevation service
Optional
triggerDelay?: numberimmobilisation time of movement on the map to trigger the elevation calculation, 200 ms by default
Collapse or display control main container
True to collapse control, False to display it
Overload ol.control.Control setMap method, called when
the map
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.
Target.
Set control units (to be displayed)
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
Protected
unProtected
Unlisten for a certain type of event.
Type.
Listener.
options for function call.