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,
"vehicleType": 4,
"ton": 10,
"seat": 0,
"heading": 0
},
{
"lon": 107.4267435202076,
"lat": 10.889979077535088,
"vehicleType": 4,
"ton": 0,
"seat": 0,
"heading": 0
}
]
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 |
vehicleType | number | no | Type of vehicle (1=Car , 2=Taxi , 3=Bus , 4=Coach , 5=Truck , 6=Truck trailer , 7=Motorcycle ) |
4 |
ton | number | no | Capacity of the vehicle (Truck/Truck trailer) in tons |
0 |
seat | number | no | Seating capacity of the vehicle (bus/coach) |
19 |
heading | number | no | Angle in degrees compared to the Northern line (0-359) |
270 |
Example¶
URL:
Body:
[
{
"lon": 107.42193008289291,
"lat": 10.91527176296465,
"vehicleType": 4,
"ton": 10,
"seat": 0,
"heading": 0
},
{
"lon": 107.4267435202076,
"lat": 10.889979077535088,
"vehicleType": 4,
"ton": 0,
"seat": 0,
"heading": 0
}
]
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",
"speed": null,
"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",
"speed": null,
"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 |
speed | null | Speed of the network, currently it not available for public |
distance | number | Distance to the network |