-
Notifications
You must be signed in to change notification settings - Fork 63
Objective-C GeoHash Library
License
lyokato/objc-geohash
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
======================================================================= INSTALL ======================================================================= Copy all files under 'Classes/ARC' or 'Classes/NonARC' directory into your project. ======================================================================= USAGE ======================================================================= #import "GeoHash.h" /* Get GetHash by latitude, longitude, and hash-length */ NSString *hash = [GeoHash hashForLatitude:35.6894875 longitude:139.6917064 length:13]; /* hash equals to @"xn774c06kdtve" */ /* Decode GeoHash and get an area which the hash indicates */ GHArea *area = [GeoHash areaForHash:@"c216ne"]; area.latitude.max area.latitude.min area.longitude.max area.longitude.min /* Adjacent */ NSString *adjacentHash = [GeoHash adjacentForHash:@"dqcjq" direction:GHDirectionNorth]; /* @"dqcjw" */ GHNeighbors *neighbors = [GeoHash neighborsForHash:@"dqcw5"]; neighbors.north neighbors.south neighbors.east neighbors.west neighbors.northEast neighbors.northWest neighbors.southEast neighbors.southWest /* check invalid hash */ if (![GeoHash verifyHash:@"abw!@"]) { ... }
About
Objective-C GeoHash Library
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published