rr-earring/baidu-map

百度地图 SDK.

1.0.1 2022-06-15 02:00 UTC

This package is auto-updated.

Last update: 2024-05-15 06:31:10 UTC


README

百度地图 SDK.

环境要求

安装

$ 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

image.png

License

MIT