API DocsAPI Docs
get/api/map/district/polyline
get/api/map/district/polyline
获取行政区polyline信息
Basic Information
Request Method:
get
Request URL:
https://www.lycoo.com/api/map/district/polyline
Tags:
地图服务
Description
根据国家和可选的省份参数获取行政区的polyline数据。如果只传入国家,返回该国家下所有省的polyline;如果传入国家和省份,返回该省下所有城市的polyline
Query Parameters
Query Parameters Explanation
Query parameters are added at the end of the URL, starting with a question mark, for example:
https://www.lycoo.com/api/map/district/polyline?country=example&province=example
Parameter Name | Type | Required | Example Value | Description |
---|---|---|---|---|
country | string | Required | example | 国家代码,如:CN |
province | string | Optional | example | 省份代码,可选参数。如果提供,则返回该省下所有城市的polyline;如果不提供,返回该国家下所有省的polyline |
Response Example
200获取成功
{
"success": true
}
400请求参数错误
{
"success": false,
"message": "必须提供国家代码"
}
404未找到polyline数据
{
"success": false,
"message": "未找到该国家/省份的polyline数据"
}
500服务器错误
{
"success": false,
"message": "获取polyline数据失败"
}