medz/geohash

Longitude and Latitude Geo Hash Library.

1.0.1 2019-06-18 14:43 UTC

This package is auto-updated.

Last update: 2022-06-21 22:27:37 UTC


README

Longitude and Latitude Geo Hash Library.

Install

composer require medz/geohash

Using

use Medz\GeoHash\GeoHash;

$geohash = GeoHash::encode([116.389550, 39.928167], 6 /* Min: 1, Max: 24 */); // wx4g0e
$coordinates = GeoHash::decode('wx4g0e'); // ->$longitude, -> $latitude, Or ->toArray();

LICENSE

MIT