geohash/geohash

This package is abandoned and no longer maintained. No replacement package was suggested.

geohash package

v1.0 2014-03-18 11:06 UTC

This package is not auto-updated.

Last update: 2018-03-01 10:54:07 UTC


README

Build Status

php geohash encoder/decoder

Install

Install Geohash with Composer.

require: {
    "geohash/geohash": "1.0"
}

Usage

Encode a coordinate:

<?php
require "vendor/autoload.php";

use Geohash\Geohash;

echo Geohash::encode(31.283131, 121.500831); // wtw3uyfjqw61

Decode a Geohash:

<?php
require "vendor/autoload.php";

use Geohash\Geohash;

list($lat, $lng) = Geohash::decode('wtw3uyfjqw61');
echo $lat, ', ', $lng; // 31.283131, 121.500831