GeoHash LBS地理位置距离计算方法geohash,将一个经纬度信息,转换成一个可以排序,可以比较的字符串编码,用于高效搜索
github.com/mucts/geohash
Source
Issues
Installs: 64
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 2
Open Issues: 0
Requires
Requires (Dev)
None
Suggests
Provides
Conflicts
Replaces
MIT 1c78dbe388eea0de679768f3af1fd016bfc309bf
This package is auto-updated.
Last update: 2024-10-24 18:50:13 UTC
composer require mucts/geohash
<?php // 参数:纬度,经度,长度(可选,默认为最长) $geo = geo_hash_encode("69.3252", "136.2345", 9); echo $geo; list($lat, $lng) = geo_hash_decode($geo); echo $lat, ', ', $lng;