\DtApp\ThinkLibrary\service\amapAmApService

高德地图 https://lbs.amap.com/api/webservice/summary Class AmApService

Summary

Methods
Properties
Constants
__construct()
instance()
key()
weather()
gCoderGeo()
gCoderReGeo()
No public properties found
No constants found
initialize()
$app
N/A
No private methods found
$url
$key
$output
N/A

Properties

$app

$app : \think\App

应用实例

Type

\think\App

$url

$url : string

Type

string

$key

$key : string

Type

string

$output

$output : string

Type

string

Methods

__construct()

__construct(\think\App  $app) 

Service constructor.

Parameters

\think\App $app

instance()

instance(array  $args) : static

静态实例对象

Parameters

array $args

Returns

static

key()

key(string  $key) : $this

Parameters

string $key

Returns

$this

weather()

weather(string  $city = "110101", string  $extensions = "base") : array|boolean|mixed|string

天气查询 https://lbs.amap.com/api/webservice/guide/api/weatherinfo

Parameters

string $city
string $extensions

Returns

array|boolean|mixed|string

gCoderGeo()

gCoderGeo(  $address, string  $city = '') : array|boolean|mixed|string

地理编码 https://lbs.amap.com/api/webservice/guide/api/georegeo#geo

Parameters

$address
string $city

Returns

array|boolean|mixed|string

gCoderReGeo()

gCoderReGeo(  $location) : array|boolean|mixed|string

逆地理编码 https://lbs.amap.com/api/webservice/guide/api/georegeo#regeo

Parameters

$location

Returns

array|boolean|mixed|string

initialize()

initialize() : $this

初始化服务

Returns

$this