Geoportal Extension for OpenLayers API Reference

Global

Members

Interactions

HOWTO
Pourquoi et comment l'utiliser ?
Cette classe permet de gérer les interactions entre chaque extension.
Une extension qui active une interaction avec la carte, doit desactiver
les autres interactions issues d'autre extensions.
La désactivation d'une interaction s'accompagne d'actions telles que
le nettoyage des dessins, l'état du composant graphique, ...

Ex
// desactive toutes les interactions avec l'opération par defaut : clean
Interactions.unset(map);
// desactive les interactions sauf celles de Drawing. On execute des
// operations particulieres : status, collapse et message
Interactions.unset(map, {
current : "Drawing",
status : false,
collapse : true,
messsage : ["WARNING", "Ceci est un avertissement !"]
});

Dans le code de l'extension, il faut placer des informations dans l'interaction :
interaction.setProperties({
name : "Drawing",
source : this
});

LocationSelector

Example
var locationselector = new LocationSelector({
     apiKey : "",
     tag : {
        id : 1,
        groupId : null,
        label : "Départ",
        markerOpts : {
             url : "...",
             offset : [0,0]
        },
        display : true
     },
     autocompleteOptions : {}
 });

Measures

Measures Tools :

  • length
  • aera
  • azimut

Register

Register definition for IGNF, and EPSG CRS.

Example
Gp.Register.IGNF.AMST63
  // return : "+title=Amsterdam 1963 +proj=geocent +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs"
Gp.Register.get("IGNF:AMST63")
  // same as Gp.Register.IGNF.AMST63

SelectorID

formalisme d'un tag ID :
-> NAME(_ORDER)-1460636385836

Ex.
GProutePoints-1460636385836
GProutePoint_10-1460636385836

Methods

_resetCoordinateElements(editCoordinates, currentProjectionType, currentProjectionUnits)

Common/Controls/MousePositionDOM.js, line 688
Name Type Description
editCoordinates Boolean

edit coordinates option

currentProjectionType String

current projection type

currentProjectionUnits String

current projection unit

_setEditMode(editing)

Common/Controls/MousePositionDOM.js, line 731

Set/unset editing mode

Name Type Description
editing Boolean

active edit coordinates mode

addSystem(system)

OpenLayers/Controls/MousePosition.js, line 250

Set additional projection system

Name Type Description
system Object

projection system

Name Type Description
crs String

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

label String optional

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

type String optional

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

getLayerInfo(layer){Object}

OpenLayers/Controls/LayerSwitcher.js, line 1047

Get layer informations : title, description, quicklookurl, legends, metadata

Name Type Description
layer Object

the ol.layer object

Returns:
- layer informations

isInRange(layer, map){Boolean}

OpenLayers/Controls/LayerSwitcher.js, line 1019

Check if map view is out of layer range (in terms of extent and zoom)

Name Type Description
layer Object

the ol.layer object

map Object

the ol.Map object

Returns:
- false if map view is out of layer range

onFailure()

OpenLayers/Controls/SearchEngine.js, line 1316

callback onFailure

onMousePositionEditModeClick(editing)

OpenLayers/Controls/MousePosition.js, line 1420

this method is called by event 'click' on input coordinate

Name Type Description
editing Boolean

editing mode

Events

attributions:update

OpenLayers/Controls/GeoportalAttribution.js, line 223

event triggered when the attributions are updated

Type:
  • Object
Properties:
Name Type Description
attributions Array

list of attributions

elevationpath:drawend

OpenLayers/Controls/ElevationPath.js, line 981

event triggered at the end of drawing input

elevationpath:drawstart

OpenLayers/Controls/ElevationPath.js, line 971

event triggered at the start of drawing input

isocurve:drawend

OpenLayers/Controls/Isocurve.js, line 827

event triggered at the end of drawing input

isocurve:drawstart

OpenLayers/Controls/Isocurve.js, line 804

event triggered at the start of drawing input

route:drawend

OpenLayers/Controls/Route.js, line 959

event triggered at the end of drawing input

route:drawstart

OpenLayers/Controls/Route.js, line 967

event triggered at the start of drawing input