Geoportal Extension for OpenLayers
API Reference

Class: ReverseGeocode

ol.control.ReverseGeocode

ReverseGeocode Control.

new ReverseGeocode(options)

Controls/ReverseGeocode/ReverseGeocode.js, line 78
Name Type Description
options Object

ReverseGeocode control options

Name Type Default Description
apiKey String optional

API key for services call (reverse geocode service). The key "calcul" is used by default.

ssl String true optional

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

collapsed Boolean true optional

Specify if widget has to be collapsed (true) or not (false) on map loading. Default is true.

draggable Boolean false optional

Specify if widget is draggable

resources Object ["StreetAddress", "PositionOfInterest", "CadastralParcel"] optional

resources for geocoding, by default : ["StreetAddress", "PositionOfInterest", "CadastralParcel"]. Possible values are : "StreetAddress", "PositionOfInterest", "CadastralParcel". Resources will be displayed in the same order in widget list.

delimitations Object ["Point", "Circle", "Extent"] optional

delimitations for reverse geocoding, by default : ["Point", "Circle", "Extent"]. Possible values are : "Point", "Circle", "Extent". Delimitations will be displayed in the same order in widget list.

reverseGeocodeOptions Object {} optional

reverse geocode service options. see Gp.Services.reverseGeocode() to know all reverse geocode options.

layerDescription Object {} optional

Layer informations to be displayed in LayerSwitcher widget (only if a LayerSwitcher is also added to the map)

Name Type Default Description
title String "Saisie (recherche inverse)" optional

Layer title to be displayed in LayerSwitcher

description String "Couche de saisie d'une zone de recherche pour la recherche inverse" optional

Layer description to be displayed in LayerSwitcher

Fires:
  • reversegeocode:compute
  • reversegeocode:onclickresult
Example
var iso = ol.control.ReverseGeocode({
     "collapsed" : false,
     "draggable" : true,
     "resources" : ["StreetAddress", "PositionOfInterest"],
     "delimitations" : ["Point", "Circle"],
     "reverseGeocodeOptions" : {}
 });

Extends

  • ol.control.Control

Members

collapsed

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

draggable

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

Methods

getCollapsed(){Boolean}

Controls/ReverseGeocode/ReverseGeocode.js, line 125

Returns true if widget is collapsed (minimized), false otherwise

Returns:
- true if widget is collapsed

getContainer(){DOMElement}

Controls/ReverseGeocode/ReverseGeocode.js, line 220

Get container

getData(){Object}

Controls/ReverseGeocode/ReverseGeocode.js, line 211

Get locations data

Returns:
- locations

setCollapsed(collapsed)

Controls/ReverseGeocode/ReverseGeocode.js, line 134

Collapse or display widget main container

Name Type Description
collapsed Boolean

True to collapse widget, False to display it

setMap(map)

Controls/ReverseGeocode/ReverseGeocode.js, line 155

Overwrite OpenLayers setMap method

Name Type Description
map ol.Map

Map.