Last Updated on : 2023-09-22 01:43:28download
Get details of the specified city by longitude and latitude, including country or region name, city ID, and city name.
GET: /v1.0/iot-03/cities/positions
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
lon | String | query | true | The longitude, accurate to 6 digits after the decimal separator. |
lat | String | query | true | The latitude, accurate to 6 digits after the decimal separator. |
Parameter name | Type | Description |
---|---|---|
result | CityDetailRes | The returned result. |
Description of result
Parameter name | Type | Description |
---|---|---|
city_id | String | The ID of the specified city. |
city_name | String | The name of the specified city. |
province_name | String | The name of the specified province. |
country_name | String | The name of the specified country or region. |
parent_id | String | The ID of the specified parent administrative district. |
parent_city_name | String | The name of the specified parent administrative district. |
lon | String | The longitude. |
lat | String | The latitude. |
GET: /v1.0/iot-03/cities/positions?lon=112.908065&lat=27.866636
{
"result": {
"parent_city_name": "Xiangtan City",
"lon": "112.9080",
"province_name": "Hunan Province",
"city_name": "Xiangtan City",
"parent_id": "793416838607409152",
"country_name": "China",
"lat": "27.8666",
"city_id": "793409524550733824"
},
"t": 1637833868025,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback