Function geohashrust::neighbors
[−]
[src]
pub fn neighbors(hash: &str) -> Box<Vec<String>>
Get a vector of neighbors for the GeoHash on all 8 directions, with itself as the first
Example
let ns=geohashrust::neighbors("wtw3s"); assert_eq!(ns[0], "wtw3s"); assert_eq!(ns[1], "wtw37"); assert_eq!(ns[2], "wtw3k"); assert_eq!(ns[3], "wtw3m"); assert_eq!(ns[4], "wtw3e"); assert_eq!(ns[5], "wtw3t"); assert_eq!(ns[6], "wtw3g"); assert_eq!(ns[7], "wtw3u"); assert_eq!(ns[8], "wtw3v");