Class mxn.Geocoder
Defined in: mxn.geocoder.js.
Constructor Attributes | Constructor Name and Description |
---|---|
mxn.Geocoder(api, callback, error_callback)
Geocoder instantiates a geocoder with some API choice
|
Field Attributes | Field Name and Description |
---|---|
Change the geocoding API in use
|
Method Attributes | Method Name and Description |
---|---|
geocode(address)
Geocodes the provided address.
|
Class Detail
mxn.Geocoder(api, callback, error_callback)
Geocoder instantiates a geocoder with some API choice
- Parameters:
- {String} api
- The API to use, currently only 'mapquest' is supported
- {Function} callback
- The function to call when a geocode request returns (function(waypoint))
- {Function} error_callback
- The optional function to call when a geocode request fails
Field Detail
swap
Change the geocoding API in use
Method Detail
geocode(address)
Geocodes the provided address.
- Parameters:
- {Object} address
- Address hash, keys are: street, locality, region, country.