Reverse Batch
REVERSE - BATCH API provides the feature to convert a list of coordinates into the corresponding addresses for each point in that list of coordinates.
URL¶
Method¶
POST
Parameter description¶
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
apikey | string | yes | API provided by VIETMAP for customer's account. |
Body¶
[
{
"lon": 107.42193008289291,
"lat": 10.91527176296465
},
{
"lon": 107.4267435202076,
"lat": 10.889979077535088
}
]
Body parameters description¶
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
lon | number | yes | Longitude of the desired place | 106.675461 |
lat | number | yes | Latitude of the desired place | 10.758970 |
Example¶
URL:
Body:
[
{
"lon": 107.42193008289291,
"lat": 10.91527176296465
},
{
"lon": 107.4267435202076,
"lat": 10.889979077535088
}
]
JSON Output¶
[
{
"admin": {
"id": 199456,
"names": ["T. Đồng Nai", "H. Xuân Lộc", "TT. Gia Ray"],
"inside": true
},
"address": {
"address": "6 Quốc Lộ 1A",
"admins": ["T. Đồng Nai", "H. Xuân Lộc", "TT. Gia Ray"],
"distance": 0.00022955630504154108
},
"network": {
"id": 61657,
"name": "Quốc Lộ 1A",
"distance": 1.1586102614531273E-05
}
},
{
"admin": {
"id": 920352,
"names": ["T. Đồng Nai", "H. Xuân Lộc", "X. Xuân Tâm"],
"inside": true
},
"address": null,
"network": {
"id": 61185,
"name": "Quốc Lộ 1A",
"distance": 2.3453771497588975E-06
}
}
]
Response Description¶
The response from the API is structured into a list objects which contains three main objects: admin, address, and network. Each object contains specific details as described in the tables below:
Admin Object¶
Parameter | Type | Description |
---|---|---|
id | number | VietMap unique identifier of the ward administrative region |
names | array | List of names representing the hierarchical administrative levels |
inside | boolean | Indicates whether the location is inside the given administrative region |
Address Object¶
Parameter | Type | Description |
---|---|---|
address | string | Name of the location |
admins | array | List of administrative regions associated with the address |
distance | number | Distance from provided lat, lng to the address |
Network Object¶
Parameter | Type | Description |
---|---|---|
id | number | VietMap unique identifier for the network |
name | string | Name of the network |
distance | number | Distance to the network |