LEAPERone 文档

地理编码

地址地理编码服务参考,包括 POI 地理编码、高精度楼栋地理编码和坐标转换。

geocode — POI 级地理编码

返回给定地址的经纬度坐标。

curl -X POST https://api.leaper.one/v1/address/geocode \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"text": "北京市朝阳区建国路93号万达广场"}'
Data
{
  "offline_geocode": {
    "wgs84": "116.465328,39.908812",
    "gcj02": "116.471607,39.910660"
  }
}

hp-geocode — 楼栋级地理编码

返回楼栋级高精度经纬度坐标。

curl -X POST https://api.leaper.one/v1/address/hp-geocode \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"text": "北京市朝阳区建国路93号万达广场"}'

transfer-coord — 坐标系转换

在 GCJ02、WGS84、CGCS2000 和 BD09 坐标系之间转换。

此端点的 text 参数接收坐标而不是地址,并且必须额外提供 srcCoord 参数。

附加参数

参数类型必填说明
textstring"longitude,latitude" 格式的坐标
srcCoordstring源坐标系:gcj02wgs84cgcs2000bd09
dstCoordstring目标坐标系,省略时返回所有坐标系
curl -X POST https://api.leaper.one/v1/address/transfer-coord \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"text": "116.465,39.909", "srcCoord": "gcj02"}'
Data
{
  "coord_transfer": {
    "BD09": "116.471607,39.914660",
    "CGCS2000": "116.458867,39.907680",
    "WGS84": "116.458867,39.907680",
    "GCJ02": "116.465000,39.909000"
  }
}