2017 © Pedro Peláez
 

library laravel-geohash

LBS地理位置距离计算方法geohash,将一个经纬度信息,转换成一个可以排序,可以比较的字符串编码,用于高效搜索

image

youthage/laravel-geohash

LBS地理位置距离计算方法geohash,将一个经纬度信息,转换成一个可以排序,可以比较的字符串编码,用于高效搜索

  • Wednesday, June 27, 2018
  • by YouthAge
  • Repository
  • 0 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Laravel GeoHash

Laravel GeoHash LBS地理位置距离计算方法geohash,将一个经纬度信息,转换成一个可以排序,可以比较的字符串编码,用于高效搜索, (*1)

安装方法

composer require youthage/laravel-geohash

使用方法

<?php

namespace App\Http\Controllers;

use GeoHash;
class IndexController extends Controller
{
    public function index()
    {
        // 参数:纬度,经度,长度(可选,默认为最长)
        $geo = GeoHash::encode("69.3252", "136.2345", 9);
        echo $geo;

        list($lat, $lng) = GeoHash::decode($geo);
        echo $lat, ', ', $lng;
    }
}

The Versions

27/06 2018

dev-master

9999999-dev

LBS地理位置距离计算方法geohash,将一个经纬度信息,转换成一个可以排序,可以比较的字符串编码,用于高效搜索

  Sources   Download

MIT

The Requires

  • php >=5.6

 

by Avatar YouthAge

27/06 2018

2.0

2.0.0.0

LBS地理位置距离计算方法geohash,将一个经纬度信息,转换成一个可以排序,可以比较的字符串编码,用于高效搜索

  Sources   Download

MIT

The Requires

  • php >=5.6

 

by Avatar YouthAge