Geoportal Extension for OpenLayers API Reference

Class: ReverseGeocode

ol.control.ReverseGeocode

ReverseGeocode Control.

new ReverseGeocode(options)

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

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.

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.

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

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}

OpenLayers/Controls/ReverseGeocode.js, line 95

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

Returns:
- true if widget is collapsed

setCollapsed(collapsed)

OpenLayers/Controls/ReverseGeocode.js, line 104

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 125

Overwrite OpenLayers setMap method

Name Type Description
map ol.Map

Map.