Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

chenmobuys/amap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChenAmap

Travis CI Status Latest Stable Version Latest Unstable Version Total Downloads License

环境

  1. PHP >= 5.6
  2. Composer

安装

composer require "chen/amap:^0.1" -vvv

用法

基本使用

<?php

use Chen\Amap\Factory;

$config = [
    // 地图秘钥
    'key' => 'xxxxxxxxxxxxxxxxxxxxx',
    // 数字签名,缺省则不使用秘钥
    'sig' => 'xxxxxxxxxxxxxxx'
];

// Web服务
$webservice = Factory::webservice($config);

// 调用 `地理/逆地理编码` 接口
$response = $webservice->geocode->geo('北京市');
$response = $webservice->geocode->regeo('116.322056,39.89491');

// 猎鹰服务
$track = Factory::track($config);

// ... 接口具体用法,查看官方文档

官方文档地址

Web服务文档地址 猎鹰服务文档地址