工具

class lbs.client.qq.api.Tools(client=None)[源代码]

工具

distance(_from, to, mode='driving')[源代码]

距离计算(一对多) https://lbs.qq.com/webservice_v1/guide-distance.html

参数:
  • _from – 起点坐标
  • to – 终点坐标
  • mode – 计算方式
distance_matrix(_from, to, mode='driving')[源代码]

距离计算(多对多) https://lbs.qq.com/webservice_v1/guide-distancematrix.html

参数:
  • _from – 起点坐标
  • to – 终点坐标
  • mode – 计算方式
district_getchildren(_id=None)[源代码]

获取指定行政区划的子级行政区划 https://lbs.qq.com/webservice_v1/guide-region.html

参数:_id – 父级行政区划ID
district_list()[源代码]

获取全部行政区划数据 https://lbs.qq.com/webservice_v1/guide-region.html

根据关键词搜索行政区划 https://lbs.qq.com/webservice_v1/guide-region.html

参数:keyword – 搜索关键词
ip(ip)[源代码]

IP定位 https://lbs.qq.com/webservice_v1/guide-ip.html

参数:ip – IP地址
translate(locations, _type=5)[源代码]

坐标转换 https://lbs.qq.com/webservice_v1/guide-convert.html

参数:
  • locations – 预转换的坐标
  • _type – 输入的locations的坐标类型