# Module: OLGeocoder

### Requires

- module:WPGMZA.Geocoder

### Classes

OLGeocoder
  OpenLayers geocoder - uses Nominatim by default
OLGeocoder
  OpenLayers geocoder - uses Nominatim by default

### Methods

#### (protected, inner) cacheResponse(address, response) → {void}

Caches a response on the server, usually after it's been returned from Nominatim

##### Parameters:

Name | Type | Description
--- | --- | ---
`address` | string | The street address
`response` | object | array | The response to cache

Source:
  - open-layers/ol-geocoder.js, line 70

##### Returns:

Type
  void

#### (protected, inner) cacheResponse(address, response) → {void}

Caches a response on the server, usually after it's been returned from Nominatim

##### Parameters:

Name | Type | Description
--- | --- | ---
`address` | string | The street address
`response` | object | array | The response to cache

Source:
  - wp-google-maps.combined.js, line 4303

##### Returns:

Type
  void

#### (inner) getLatLngFromAddress(options, callback) → {void}

Attempts to geocode an address, firstly by checking the cache for previous results, if this fails the Nominatim server will be queried, cached and sent to the specified callback

##### Parameters:

Name | Type | Description
--- | --- | ---
`options` | object | An object containing the options for geocoding, address is a mandatory field
`callback` | function | The function to send the results to, as an array

Source:
  - open-layers/ol-geocoder.js, line 90

##### Returns:

Type
  void

#### (inner) getLatLngFromAddress(options, callback) → {void}

Attempts to geocode an address, firstly by checking the cache for previous results, if this fails the Nominatim server will be queried, cached and sent to the specified callback

##### Parameters:

Name | Type | Description
--- | --- | ---
`options` | object | An object containing the options for geocoding, address is a mandatory field
`callback` | function | The function to send the results to, as an array

Source:
  - wp-google-maps.combined.js, line 4323

##### Returns:

Type
  void

#### (protected, inner) getResponseFromCache(address, callback) → {void}

Tries to retrieve cached coordinates from server cache

##### Parameters:

Name | Type | Description
--- | --- | ---
`address` | string | The street address to geocode
`callback` | function | Where to send the results, as an array

Source:
  - open-layers/ol-geocoder.js, line 21

##### Returns:

Type
  void

#### (protected, inner) getResponseFromCache(address, callback) → {void}

Tries to retrieve cached coordinates from server cache

##### Parameters:

Name | Type | Description
--- | --- | ---
`address` | string | The street address to geocode
`callback` | function | Where to send the results, as an array

Source:
  - wp-google-maps.combined.js, line 4254

##### Returns:

Type
  void

#### (protected, inner) getResponseFromNominatim(options, callback)

Queries Nominatim on the specified address

##### Parameters:

Name | Type | Description
--- | --- | ---
`options` | object | An object containing the options for geocoding, address is a mandatory field
`callback` | function | The function to send the results to, as an array

Source:
  - wp-google-maps.combined.js, line 4275

#### (protected, inner) getResponseFromNominatim(options, callback)

Queries Nominatim on the specified address

##### Parameters:

Name | Type | Description
--- | --- | ---
`options` | object | An object containing the options for geocoding, address is a mandatory field
`callback` | function | The function to send the results to, as an array

Source:
  - open-layers/ol-geocoder.js, line 42

### Requires

- module:WPGMZA.Geocoder

### Classes

OLGeocoder
  OpenLayers geocoder - uses Nominatim by default
OLGeocoder
  OpenLayers geocoder - uses Nominatim by default

### Methods

#### (protected, inner) cacheResponse(address, response) → {void}

Caches a response on the server, usually after it's been returned from Nominatim

##### Parameters:

Name | Type | Description
--- | --- | ---
`address` | string | The street address
`response` | object | array | The response to cache

Source:
  - open-layers/ol-geocoder.js, line 70

##### Returns:

Type
  void

#### (protected, inner) cacheResponse(address, response) → {void}

Caches a response on the server, usually after it's been returned from Nominatim

##### Parameters:

Name | Type | Description
--- | --- | ---
`address` | string | The street address
`response` | object | array | The response to cache

Source:
  - wp-google-maps.combined.js, line 4303

##### Returns:

Type
  void

#### (inner) getLatLngFromAddress(options, callback) → {void}

Attempts to geocode an address, firstly by checking the cache for previous results, if this fails the Nominatim server will be queried, cached and sent to the specified callback

##### Parameters:

Name | Type | Description
--- | --- | ---
`options` | object | An object containing the options for geocoding, address is a mandatory field
`callback` | function | The function to send the results to, as an array

Source:
  - open-layers/ol-geocoder.js, line 90

##### Returns:

Type
  void

#### (inner) getLatLngFromAddress(options, callback) → {void}

Attempts to geocode an address, firstly by checking the cache for previous results, if this fails the Nominatim server will be queried, cached and sent to the specified callback

##### Parameters:

Name | Type | Description
--- | --- | ---
`options` | object | An object containing the options for geocoding, address is a mandatory field
`callback` | function | The function to send the results to, as an array

Source:
  - wp-google-maps.combined.js, line 4323

##### Returns:

Type
  void

#### (protected, inner) getResponseFromCache(address, callback) → {void}

Tries to retrieve cached coordinates from server cache

##### Parameters:

Name | Type | Description
--- | --- | ---
`address` | string | The street address to geocode
`callback` | function | Where to send the results, as an array

Source:
  - open-layers/ol-geocoder.js, line 21

##### Returns:

Type
  void

#### (protected, inner) getResponseFromCache(address, callback) → {void}

Tries to retrieve cached coordinates from server cache

##### Parameters:

Name | Type | Description
--- | --- | ---
`address` | string | The street address to geocode
`callback` | function | Where to send the results, as an array

Source:
  - wp-google-maps.combined.js, line 4254

##### Returns:

Type
  void

#### (protected, inner) getResponseFromNominatim(options, callback)

Queries Nominatim on the specified address

##### Parameters:

Name | Type | Description
--- | --- | ---
`options` | object | An object containing the options for geocoding, address is a mandatory field
`callback` | function | The function to send the results to, as an array

Source:
  - wp-google-maps.combined.js, line 4275

#### (protected, inner) getResponseFromNominatim(options, callback)

Queries Nominatim on the specified address

##### Parameters:

Name | Type | Description
--- | --- | ---
`options` | object | An object containing the options for geocoding, address is a mandatory field
`callback` | function | The function to send the results to, as an array

Source:
  - open-layers/ol-geocoder.js, line 42