1.0.2 2018-09-17 08:35 UTC

This package is auto-updated.

Last update: 2024-10-18 03:09:32 UTC


README

#

a map API SDK.

#

Build Status

安装

$ composer require jiangyong/map -vvv

配置

use Jiangyong\Map\Map;

$key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx';

$map = new Map($key);

通过输入地址获取解析

$response = $map->getAddress('IFS国际金融中心','成都')

通过输入经纬度获取解析

$response = $map->getLocation('104.081298,30.655321');

通多输入地址获取解析xml格式 可选参数,json,

$resopnse = $map->getAddress(('IFS国际金融中心','成都','false','xml'))

通过输入经纬度获取解析xml格式,可选参数,json

$resopnse = $map->getLocation(('104.081298,30.655321',1000,'all','false','xml'))

在laravel 中的使用

在 Laravel 中使用也是同样的安装方式,配置写在 config/services.php 中 加入:

 'map' => [
        'key' => env('MAP_API_KEY'),
    ],

然后在 .env 中配置 WEATHER_API_KEY :

MAP_API_KEY=xxxxxxxxxxxxxxxxxxxxx

TODO

Contributing

You can contribute in one of three ways:

  1. File bug reports using the issue tracker.
  2. Answer questions or fix bugs on the issue tracker.
  3. Contribute new features or update the wiki.

The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.

License

MIT