Geoportal Extension for OpenLayers 3 API Reference

Class: ReverseGeocode

ol.control.ReverseGeocode

ReverseGeocode Control.

new ReverseGeocode(options)

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

ReverseGeocode control options

Name Type Default Description
apiKey String optional

API key for services call (reverse geocode service), mandatory if autoconf service has not been charged in advance

collapsed Boolean true optional

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

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

resources for geocoding, by default : ["StreetAddress", "PositionOfInterest", "CadastralParcel"]. Possible values are : "StreetAddress", "PositionOfInterest", "CadastralParcel", "Administratif". 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.

Example
var iso = ol.control.ReverseGeocode({
     collapsed : false,
     resources : ["StreetAddress", "PositionOfInterest"],
     delimitations : ["Point", "Circle"],
     reverseGeocodeOptions : {}
 });

Extends

  • ol.control.Control

Members

collapsed

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

Methods

getCollapsed(){Boolean}

Ol3/Controls/ReverseGeocode.js, line 107

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

Returns:
- true if widget is collapsed

setCollapsed(collapsed)

Ol3/Controls/ReverseGeocode.js, line 116

Collapse or display widget main container

Name Type Description
collapsed Boolean

True to collapse widget, False to display it

setMap(map)

Ol3/Controls/ReverseGeocode.js, line 137

Overwrite OpenLayers setMap method

Name Type Description
map ol.Map

Map.