rr-earring / baidu-map
百度地图 SDK.
1.0.1
2022-06-15 02:00 UTC
Requires
- php: >=7.2.5
- guzzlehttp/guzzle: ^7.4
- monolog/monolog: 2.3.5
- pimple/pimple: ^3.5
Requires (Dev)
- phpunit/phpunit: 8.5.*
README
百度地图 SDK.
环境要求
- PHP >= 7.2.5
- Composer
- fileinfo 扩展
安装
$ composer require "rr-earring/baidu-map" -vvv
使用
<?php use RrEarring\BaiduMap\Factory; $config = [ 'ak' => 'your ak', // 'sk' => 'your sk', 'log' => [ 'file' => './map.log', 'name' => 'map.log', ], 'response_type' => 'array', ]; $webApi = Factory::baiduApi($config); $result = $webApi->geocoding->get('北京市海淀区上地十街10号'); //Array //( // [status] => 0 // [result] => Array //( // [location] => Array // ( // [lng] => 116.307887147 // [lat] => 40.0572204451 // ) // // [precise] => 1 // [confidence] => 80 // [comprehension] => 100 // [level] => 门址 // ) // //)
Features
Credits
This project was created with phpstorm with open source licence. Thank you jetBrains
License
MIT