::map::geocode::nominatimrequestor ?-baseurlurl? ?-callbackcallback? ?-errorerrorcallback?
Creates a geocoding request object requestor, which will send its requests to the Nominatim
server.
The result of the command is name.
OPTIONS-baseurlurl
The base URL of the Nominatim service. Default value is OpenStreetMap's service at
http://nominatim.openstreetmap.org/search A possible free alternative is at
http://open.mapquestapi.com//nominatim/v1/search-callbackcmdprefix
A command prefix to be invoked when search result become available. The default setting, active
when nothing was specified on object creation, is to print the result (see below) to stdout. The
result of the command prefix is ignored. Errors thrown by the command prefix are caught and cause
the invokation of the error callback (see option -error below), with the error message as
argument.
The signature of the command prefix is:
$cmdprefixresult
The result is a list of dictionaries, containing one item per hit. Each dictionary will
have the following entries:
place_id
The place ID (FIXME: what's this?)
licence
The data licence string
osm_type
The OSM type of the location
osm_id FIXME
boundingbox
The coordinates of the bounding box (min and max latitude, min and max longitude)
lat The location's latitude
lon The location's longitude
display_name
the location's human readable name
class FIXME
type FIXME
icon FIXME
-errorcmdprefix
A command prefix to be invoked when encountering errors. Typically these are HTTP errors. The
default setting, active when nothing was specified on object creation, is to print the errorstring
(see below) to stderr. The result of the command prefix is ignored. Errors thrown by the command
prefix are passed to higher levels.
The signature of the command prefix is:
$cmdprefixerrorstringMETHODSrequestorsearchquery
This method returns a list of dictionaries, one item per hit for the specified query.