GetGeocode.Apis.Nominatim (GetGeocode v0.0.3) View Source
Nominatim API.
Link to this section Summary
Functions
Gets data from an address.
Link to this section Functions
Gets data from an address.
Results in a list with the data, or a tuple {:ok, "No result"}.
Examples
iex> GetGeocode.Apis.Nominatim.get_data "Rua Izaurina Braga"
%{
"boundingbox" => ["-3.1058605", "-3.105157", "-60.0550895", "-60.0542833"],
"class" => "highway",
"display_name" => "Rua Izaurina Braga, Compensa, Manaus, Região Geográfica Imediata de Manaus, Região Geográfica Intermediária de Manaus, Amazonas, Região Norte, 69000-000, Brasil",
"importance" => 0.4,
"lat" => "-3.1054153",
"licence" => "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
"lon" => "-60.0547259",
"osm_id" => 662237608,
"osm_type" => "way",
"place_id" => 233020447,
"type" => "residential"
} Also accepts args as a tuple {lat, lng}:
iex> GetGeocode.Apis.Nominatim.get_data {-3.1054153, -60.0547259}
%{
"boundingbox" => ["-3.1058605", "-3.105157", "-60.0550895", "-60.0542833"],
"class" => "highway",
"display_name" => "Rua Izaurina Braga, Compensa, Manaus, Região Geográfica Imediata de Manaus, Região Geográfica Intermediária de Manaus, Amazonas, Região Norte, 69000-000, Brasil",
"importance" => 0.001,
"lat" => "-3.1054153",
"licence" => "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
"lon" => "-60.0547259",
"osm_id" => 662237608,
"osm_type" => "way",
"place_id" => 233020447,
"type" => "residential"
}