kubill / lbs
A lbs library,Support multiple service providers.
v1.0
2019-05-17 07:03 UTC
Requires
- php: >=7.0.0
- guzzlehttp/guzzle: ^6.3
This package is auto-updated.
Last update: 2025-04-17 20:28:28 UTC
README
支持 Google、高德、腾讯、百度
Install using composer:
composer require kubill/lbs
配置
在使用之前,去个平台获取相应的key
基本用法
use Kubill\Lbs\GeoCoder; $geoCoder = new GeoCoder($key,$driver); $geoCoder->addr2coder($addr);
在 laravel 中使用
php artisan vendor:publish --provider="Kubill\Lbs\ServiceProvider"
配置 .env
LBS_DRIVER=tencent LBS_KEY=xxxxx
服务名访问
app('GeoCoder')->addr2coder('地址');
Facade
\Kubill\Lbs\Facades\GeoCoder::addr2coder('地址');
License
Lbs is licensed under The MIT License (MIT).