[][src]Function egg_mode::place::reverse_geocode

pub fn reverse_geocode(latitude: f64, longitude: f64) -> GeocodeBuilder

Begins building a reverse-geocode search with the given coordinate.

Examples

use tokio::runtime::current_thread::block_on_all;
use egg_mode::place::{self, PlaceType};
let result = block_on_all(place::reverse_geocode(51.507222, -0.1275)
                                .granularity(PlaceType::City)
                                .call(&token))
                 .unwrap();

assert!(result.results.iter().any(|pl| pl.full_name == "London, England"));