liv / baidu-lbs
There is no license information available for the latest version (1.0.0) of this package.
百度LBS的PHP library
1.0.0
2015-08-05 03:30 UTC
Requires
- php: ^5.4
This package is not auto-updated.
Last update: 2024-12-21 19:29:49 UTC
README
Baidu LBS云 SDK 提供了一个基于PHP/Java语言的,封装了百度LBS云各个服务SDK。
感谢:wangjild
更新:1、使用composer 2、添加命名空间 3、优化注释 4、优化部分代码逻辑
目录
-
composer require liv/baidu-lbs
-
2.1 [存储]
```php $console = new Console(); $console->setServerAK('KbMeaL3jz0ds1lbG11g3Esys', 'myGUcGyxhZvVOtINr8wrvkbGIxTb9CSG'); $geoTableId = '116200'; $search = new NearbySearch($geoTableId, $console, '120.734879,31.288689', 100); $nearby = $search->search(); var_dump($nearby); $search = new LocalSearch($geoTableId, $console, 1); $search->setSortBy('ClickCount', BasicSearch::DESCEND); $search->addFilter('ClickCount', 1, 100); $search->addTags('华北'); $local = $search->search(); var_dump($local); $search = new BoundSearch($geoTableId, $console, '116.383801,39.90112', '116.412475,39.916451'); $bound = $search->search(); $search = new DetailSearch($geoTableId, $console, 18460245); $detail = $search->search(); var_dump($detail); ```
2.1 检索
```php $console = new Console(); $console->setServerAK('KbMeaL3jz0ds1lbG11g3Esys', 'myGUcGyxhZvVOtINr8wrvkbGIxTb9CSG'); $geoTableId = '116200'; $search = new NearbySearch($geoTableId, $console, '120.734879,31.288689', 100); $nearby = $search->search(); var_dump($nearby); $search = new LocalSearch($geoTableId, $console, 1); $search->setSortBy('ClickCount', BasicSearch::DESCEND); $search->addFilter('ClickCount', 1, 100); $search->addTags('华北'); $local = $search->search(); var_dump($local); $search = new BoundSearch($geoTableId, $console, '116.383801,39.90112', '116.412475,39.916451'); $bound = $search->search(); $search = new DetailSearch($geoTableId, $console, 18460245); $detail = $search->search(); var_dump($detail); ```