Autocomplete¶
Autocomplete API refers to a feature provided by VIETMAP that suggests possible locations as a user types into the search bar, making it easier for the user to find and select the desired destination. The API provides a way for developers to access and integrate this autocomplete functionality into their own custom mapping applications.
URL¶
https://maps.vietmap.vn/api/autocomplete?api-version=1.1&apikey={your-apikey}?focus.point.lat={focus.point.lat}&focus.point.lon={focus.point.lon}&boundary.circle.lon={boundary.circle.lon}&boundary.circle.lat={boundary.circle.lat}&boundary.circle.radius={boundary.circle.radius}&text={text}
GET
Parameter¶
Parameter | Type | Required | Default | Example |
---|---|---|---|---|
text | string | yes | none | Trần Phú |
focus.point.lat | floating point number | no | none | 10.756271 |
focus.point.lon | floating point number | no | none | 106.661280 |
boundary.rect.min_lon | floating point number | no | none | 106.3564 |
boundary.rect.max_lon | floating point number | no | none | 107.012794 |
boundary.rect.min_lat | floating point number | no | none | 11.160291 |
boundary.rect.max_lat | floating point number | no | none | 10.376715 |
boundary.circle.lat | floating point number | no | none | 10.756271 |
boundary.circle.lon | floating point number | no | none | 106.661280 |
boundary.circle.radius | floating point number | no | 50 | 35 |
layers | string | no | all layers: address,street,venue | address,venue |
Filters Feature¶
✔️ Layer filtering
✔️ Global scope, local focus
✔️ Search within a circular region
✔️ Search within categories
1. Layer filtering¶
Focus searching on layer categories
URL:
<https://maps.vietmap.vn/api/autocomplete?api-version=1.1&apiley={your-key}&layers={layers}&text={text}>
Layer | Description |
---|---|
venue | points of interest, businesses, things with walls |
address | places with a street address |
street | streets, roads, highways |
locality | towns, hamlets, cities |
county | official governmental area; usually bigger than a locality, almost always smaller than a region |
region | provinces |
2. Global scope, local focus¶
Focus on searching narrow with pair of coordinates
URL:
https://maps.vietmap.vn/api/autocomplete?api-version=1.1&apiley={your-key}&focus.point.lat={focus.point.lat}&focus.point.lon={focus.point.lon}&text={text}
Parameter | Description |
---|---|
focus.point.lat | latitude coordinate |
focus.point.lon | longitude coordinate |
3. Search within a circular region¶
Focus on searching with pair of coordinates together with specific radius
URL:
https://maps.vietmap.vn/api/autocomplete?api-version=1.1&apikey={your-apikey}&text={text}&boundary.circle.lon={boundary.circle.lon}&boundary.circle.lat={boundary.circle.lat}&boundary.circle.radius={boundary.circle.radius}
Parameter | Value |
---|---|
text | 193 Trần Phú |
boundary.circle.lat | 10.756271 |
boundary.circle.lon | 106.661280 |
boundary.circle.radius | 0.5 |
4. Search within categories¶
Focus on searching with POI categories | chainName categories
Note: If you are searching for restaurant, it means that the input parameter is 1002. The source of poi_categories
URL:
https://maps.vietmap.vn/api/autocomplete?api-version=1.1&apikey={your-apikey}&text={text}&categories={categories}
Parameter | Value |
text | 193 Trần |
categories | 1002 |