her-cat / baidu-map
百度地图 SDK.
Installs: 3 181
Dependents: 0
Suggesters: 0
Security: 0
Stars: 19
Watchers: 1
Forks: 5
Open Issues: 0
pkg:composer/her-cat/baidu-map
Requires
- php: >=5.6
 - guzzlehttp/guzzle: ~6.0
 - monolog/monolog: ^1.24
 - pimple/pimple: ^3.0
 
Requires (Dev)
- mikey179/vfsstream: ^1.6
 - mockery/mockery: ^1.2
 - phpunit/phpunit: ~5
 
Suggests
- phpstan/phpstan: PHP Static Analysis Tool - discover bugs in your code without running it!
 
This package is auto-updated.
Last update: 2025-10-28 13:36:41 UTC
README
可能是我用过的最好用的百度地图 SDK 了
环境要求
- PHP >= 5.6
 - Composer
 - fileinfo 拓展(获取静态图需要用到)
 
安装
$ composer require "her-cat/baidu-map" -vvv
单元测试
$ composer test
使用
<?php use HerCat\BaiduMap\Factory; $config = [ 'ak' => 'your ak', // 'sk' => 'your sk', 'log' => [ 'file' => './baidu-map.log' ], 'response_type' => 'array', ]; $webApi = Factory::webApi($config); $result = $webApi->timezone->get('116.30815', '40.056878'); // Array // ( // [status] => 0 // [timezone_id] => Asia/Shanghai // [dst_offset] => 0 // [raw_offset] => 28800 // )
文档
Features
参考
Credits
This project was created with phpstorm with open source licence. Thank you jetBrains
License
MIT