PHP code example of medz / geohash
1. Go to this page and download the library: Download medz/geohash library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
medz / geohash example snippets
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();