Module: OLGeocoder

Requires

  • module:WPGMZA.Geocoder

Classes

OLGeocoder
OpenLayers geocoder - uses Nominatim by default

Methods


<protected, inner> cacheResponse(address, response)

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
Returns:
Type
void

<protected, inner> getResponseFromCache(address, callback)

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
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