\DtApp\ThinkLibrary\service\tencentLbsService

腾讯地图 https://lbs.qq.com/service/webService/webServiceGuide/webServiceOverview Class Lbs

Summary

Methods
Properties
Constants
__construct()
instance()
key()
param()
ip()
districtList()
districtGetChildren()
districtSearch()
translate()
matrix()
route()
geoCoder()
gCoder()
suggestion()
search()
toArray()
No public properties found
No constants found
initialize()
$app
N/A
http()
createStrParam()
$key
$param
$output
$api_url
N/A

Properties

$app

$app : \think\App

应用实例

Type

\think\App

$key

$key : string

开发者密钥(Key)

Type

string

$param

$param : 

需要发送的的参数

Type

$output

$output : 

响应内容

Type

$api_url

$api_url : 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

param()

param(array  $param) : $this

请求参数

Parameters

array $param

Returns

$this

ip()

ip() : $this

IP定位 https://lbs.qq.com/service/webService/webServiceGuide/webServiceIp

Returns

$this

districtList()

districtList() : $this

行政区划 - 获取全部行政区划数据 https://lbs.qq.com/service/webService/webServiceGuide/webServiceDistrict

Returns

$this

districtGetChildren()

districtGetChildren() : $this

行政区划 - 获取全部行政区划数据 https://lbs.qq.com/service/webService/webServiceGuide/webServiceDistrict

Returns

$this

districtSearch()

districtSearch() : $this

行政区划 - 获取全部行政区划数据 https://lbs.qq.com/service/webService/webServiceGuide/webServiceDistrict

Returns

$this

translate()

translate() : $this

坐标转换 - 实现从其它地图供应商坐标系或标准GPS坐标系,批量转换到腾讯地图坐标系。 https://lbs.qq.com/service/webService/webServiceGuide/webServiceTranslate

Returns

$this

matrix()

matrix() : $this

批量距离计算(矩阵) - 距离矩阵(DistanceMatrix),用于批量计算一组起终点的路面距离(或称导航距离),可应用于网约车派单、多目的地最优路径智能计算等场景中,支持驾车、步行、骑行多种交通方式,满足不同应用需要。 https://lbs.qq.com/service/webService/webServiceGuide/webServiceMatrix

Returns

$this

route()

route() : $this

路线规划(驾车/公交/步骑) - 腾讯地图Direction API,提供多种交通方式的路线计算能力,包括: 1. 驾车(driving):支持结合实时路况、少收费、不走高速等多种偏好,精准预估到达时间(ETA); 2. 步行(walking):基于步行路线规划。 3. 骑行(bicycling):基于自行车的骑行路线; 4. 公交(transit):支持公共汽车、地铁等多种公共交通工具的换乘方案计算; https://lbs.qq.com/service/webService/webServiceGuide/webServiceRoute

Returns

$this

geoCoder()

geoCoder() : $this

地址解析(地址转坐标) - 本接口提供由地址描述到所述位置坐标的转换,与逆地址解析的过程正好相反。 https://lbs.qq.com/service/webService/webServiceGuide/webServiceGeocoder

Returns

$this

gCoder()

gCoder() : $this

逆地址解析(坐标位置描述) - 本接口提供由坐标到坐标所在位置的文字描述的转换。输入坐标返回地理位置信息和附近poi列表。目前应用于物流、出行、O2O、社交等场景。服务响应速度快、稳定,支撑亿级调用。 1)满足传统对省市区、乡镇村、门牌号、道路及交叉口、河流、湖泊、桥、poi列表的需求。 2)业界首创,提供易于人理解的地址描述:海淀区中钢国际广场(欧美汇购物中心北)。 3)提供精准的商圈、知名的大型区域、附近知名的一级地标、代表当前位置的二级地标等。 https://lbs.qq.com/service/webService/webServiceGuide/webServiceGcoder

Returns

$this

suggestion()

suggestion() : $this

关键词输入提示 - 用于获取输入关键字的补完与提示,帮助用户快速输入。本接口为纯HTTP数据接口,需配合前端程序实现Autocomplete(自动完成)的效果。 https://lbs.qq.com/service/webService/webServiceGuide/webServiceSuggestion

Returns

$this

search()

search() : $this

地点搜索 - 地点搜索(search接口),提供三类范围条件的搜索功能: 指定城市的地点搜索:如在北京搜索餐馆; 圆形区域的地点搜索:一般用于指定位置的周边(附近)地点搜索,如,搜索颐和园附近的酒店; 矩形区域的地点搜索:在地图应用中,往往用于视野内搜索,因为显示地图的区域是个矩形。 https://lbs.qq.com/service/webService/webServiceGuide/webServiceSuggestion

Returns

$this

toArray()

toArray() : array|mixed

Throws

\DtApp\ThinkLibrary\exception\DtaException

Returns

array|mixed

initialize()

initialize() : $this

初始化服务

Returns

$this

http()

http() 

网络请求

createStrParam()

createStrParam() : string

组参

Returns

string