Skip to content

高德地图和百度地图 地理编码API的封装

Notifications You must be signed in to change notification settings

Fly-Playgroud/location

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

对百度地图和高德地图的 地理编码API 进行封装。可以用于地理位置的经纬度获取。

Usage

config.py 修改为开放平台的key

class Baidu:
    KEY = ""
    OUTPUT = "JSON"  # 定义返回的数据类型:JSON or XML


class Amap:
    KEY = ""
    OUTPUT = "JSON"  # 定义返回的数据类型:JSON or XML


config = {
    "amap": Amap,
    "baidu": Baidu,
}

Example

  • locator可选参数:
    • ampap 使用高德地图
    • baidu 使用百度地图
  • address 查询地址
from locations import create_location
app = create_location(locator="amap")
app.locate(address="山东省")

About

高德地图和百度地图 地理编码API的封装

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages