17683954109/baidu-map

百度地图 SDK.

Maintainers

👁 TheShy

Package info

github.com/17683954109/baidu-map

pkg:composer/17683954109/baidu-map

Statistics

Installs: 15

Dependents: 0

Suggesters: 0

Stars: 0

1.1.3 2021-04-15 06:18 UTC

Requires

Requires (Dev)

Suggests

  • phpstan/phpstan: PHP Static Analysis Tool - discover bugs in your code without running it!

Provides

None

Conflicts

None

Replaces

None

MIT 9a75580b88b32d4c7daaf021c0101dbf9f37d4c1

  • her-cat <i.woop@her-cat.com>

This package is auto-updated.

Last update: 2026-06-15 17:12:56 UTC


README

可能是我用过的最好用的百度地图 SDK 了

👁 Build Status
👁 StyleCI build status

环境要求

  • 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

参考

License

MIT