Geoportal Extension for OpenLayers API Reference

Class: ReverseGeocode

ol.control.ReverseGeocode

ReverseGeocode Control.

new ReverseGeocode(options)

OpenLayers/Controls/ReverseGeocode.js, line 74
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}

OpenLayers/Controls/ReverseGeocode.js, line 139

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

Returns:
- true if widget is collapsed

getData(){Object}

OpenLayers/Controls/ReverseGeocode.js, line 210

Get locations data

Returns:
- locations

setCollapsed(collapsed)

OpenLayers/Controls/ReverseGeocode.js, line 148

Collapse or display widget main container

Name Type Description
collapsed Boolean

True to collapse widget, False to display it

setMap(map)

OpenLayers/Controls/ReverseGeocode.js, line 169

Overwrite OpenLayers setMap method

Name Type Description
map ol.Map

Map.