Class: IWGeocoderClient

IWGeocoderClient

A geocoder client is necessary in order to convert an address into coordinates.

This class is part of the module geocoding.


new IWGeocoderClient()

Creates a new geocoder client.

Methods


geocodeAddress(address, maxHits, object)

Geocodes an address into a coordinate. This is an asynchronous operation which will trigger an ongeocode event.
Parameters:
Name Type Description
address IWAddress an address
maxHits number maximum number of returned addresses (optional)
object Object reserved for a user defined object (optional)
Returns:
Type
void

geocodeAddressString(address, countryCode, maxHits, object)

Geocode an address. This is an asynchronous operation which will trigger an ongeocode event.
Parameters:
Name Type Description
address String the address to geocode, e.g. 'Riemenschneiderstr. 11, 53225 Bonn'
countryCode String the country the address is in, e.g. 'D'
maxHits number maximum number of returned addresses (optional, defaults to 1)
object Object reserved for IWa user defined object (optional)
Returns:
Type
void

geocodedErrorCallback(error, inputAddress, parameterObject)

Callback to be called with an error answer
Parameters:
Name Type Description
error
inputAddress
parameterObject

reverseGeocodeByHits(coordinate, maxHits, object)

Searchs up to the specified number of addresses for a given coordinate. This is an asynchronous operation which will trigger an onreversegeocode event.
Parameters:
Name Type Description
coordinate IWCoordinate the search coordinate
maxHits number the number of addresses to return
object Object reserved for a user defined object (optional)
Returns:
Type
void

reverseGeocodeByRadius(coordinate, radius, object)

Searchs addresses for a given coordinate within the specified radius. This is an asynchronous operation which will trigger an onreversegeocode event.
Parameters:
Name Type Description
coordinate IWCoordinate the search coordinate
radius number search radius in meter (max. 10 km)
object Object reserved for a user defined object (optional)
Returns:
Type
void

toString()

Returns a string representation.
Returns:
Type
String