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