Reverse - demo
Reverse Demo API is a demonstration version of the reverse geocoding service that allows developers to test and explore location search features. This demo API provides a way to convert geographic coordinates (latitude and longitude) into readable addresses and location information, helping developers understand the capabilities before implementing the full version.
URL¶
https://maps.vietmap.vn/api/reverse/demo?apikey={your-apikey}&lat={latitude}&lng={longitude}&display_type={display_type}
Method¶
GET
Parameters¶
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
apikey | string | yes | API key provided by VIETMAP for customer's account | |
lat | number | yes | Latitude of desired place | 10.760616101799197 |
lng | number | yes | Longitude of desired place | 106.67713459333085 |
display_type | number | no | Result display type. Values: - 1: Returns address in the new merged format (2 levels) - 2: Returns address in the old format before merging (3 levels) |
1 |
Example¶
Input
https://maps.vietmap.vn/api/reverse/demo?apikey={your-apikey}&lat=10.760616101799197&lng=106.67713459333085&display_type=1
[
{
"lat": 10.760616101799197,
"lng": 106.67713459333085,
"ref_id": "vm:ADDRESS:MM03541B04555203031B57025305140D040C54165351004C1B0607540152005F03560B065A075F04015A2115665F8788C55C0D645DF6D9",
"distance": 6.554843338015768E-05,
"address": "Phường Chợ Quán,Thành Phố Hồ Chí Minh",
"name": "129C Trần Phú",
"display": "129C Trần Phú Phường Chợ Quán,Thành Phố Hồ Chí Minh",
"boundaries": [
{
"type": 2,
"id": 18700,
"name": "Chợ Quán",
"prefix": "Phường",
"full_name": "Phường Chợ Quán"
},
{
"type": 0,
"id": 12,
"name": "Hồ Chí Minh",
"prefix": "Thành Phố",
"full_name": "Thành Phố Hồ Chí Minh"
}
],
"categories": [],
"entry_points": []
}
]
[
{
"lat": 10.760616101799197,
"lng": 106.67713459333085,
"ref_id": "vm:ADDRESS:MM03541B04555203031B57025305140D040C54165351004C1B0607540152005F03560B065A075F04015A2115665F8788C55C0D645DF6D9",
"distance": 6.554843338015768E-05,
"address": "Phường 4,Quận 5,Thành Phố Hồ Chí Minh",
"name": "129C Trần Phú",
"display": "129C Trần Phú Phường 4,Quận 5,Thành Phố Hồ Chí Minh",
"boundaries": [
{
"type": 2,
"id": 656652,
"name": "4",
"prefix": "Phường",
"full_name": "Phường 4"
},
{
"type": 1,
"id": 1292,
"name": "5",
"prefix": "Quận",
"full_name": "Quận 5"
},
{
"type": 0,
"id": 12,
"name": "Hồ Chí Minh",
"prefix": "Thành Phố",
"full_name": "Thành Phố Hồ Chí Minh"
}
],
"categories": [],
"entry_points": []
}
]
Response description¶
Reverse Demo API will respond with a list
that contains location information for the given coordinates.
Parameter | Type | Description |
---|---|---|
lat | double | Latitude coordinate of the location |
lng | double | Longitude coordinate of the location |
ref_id | string | Reference ID for the location |
distance | double | Distance of the location from the queried point, value in kilometer |
address | string | Full address including ward , district , and city |
name | string | Name of the specific location or street address |
display | string | Display name containing complete address information |
boundaries | array | Array containing boundary information (ward , district , city ) |
categories | array | Array containing categories associated with the location |
entry_points | array | Array containing entry point information for the location |
For the boundaries
array:
Sub-Parameter | Type | Description |
---|---|---|
type | int | Type of boundary (0 for city , 1 for district , 2 for ward ) |
id | int | Unique identifier for the boundary |
name | string | Name of the boundary |
prefix | string | Prefix of the boundary (e.g., "Phường" for ward) |
full_name | string | Full name of the boundary (e.g., "Phường Chợ Quán" for ward) |