We are excited to announce that Openmap.vn has been updated with the latest data on provincial mergers in Vietnam. With this update, developers can easily switch between old and new data by simply adding a single parameter.
🎯 New Feature: admin_v2
Parameter
To support switching between old and new data, we have added the admin_v2
parameter to all related APIs:
Updated APIs:
- Autocomplete API - Google format & OSM format
- Forward Geocoding API - Google format & OSM format
- Reverse Geocoding API - Google format & OSM format
- Place Detail API
- Nearby Search API
- Children API
- Routing API
- Optimized Route API
How to use:
# Use old data (default)
GET /autocomplete?input=Hanoi&apikey=YOUR_API_KEY
# Use new data after merger
GET /autocomplete?input=Hanoi&admin_v2=true&apikey=YOUR_API_KEY
📊 Parameter Information
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
admin_v2 | boolean | no | false | Return information about new locations after administrative boundary consolidation |
🔄 Conversion Examples
Before merger (old data):
{
"bbox": [105.777981, 21.022776999999998, 105.79798100000001, 21.042777],
"errors": null,
"features": [
{
"geometry": {
"coordinates": [105.787981, 21.032777],
"type": "Point"
},
"properties": {
"category": ["corporate_office"],
"continent": "Asia",
"country": "Việt Nam",
"country_code": "VN",
"county": "quận Cầu Giấy",
"distance": null,
"has_child": false,
"housenumber": null,
"id": "BFMhbS2hGqAeWlxPGNjnClF6aYQk3F1-nXJxZZjAncYpdqHZSNzpfi0W3RCU",
"label": "Công Ty TNHH Công Nghệ 44+, 12 Ngõ 1 Dịch Vọng Hậu, phường Dịch Vọng Hậu, quận Cầu Giấy, thành phố Hà Nội",
"locality": "phường Dịch Vọng Hậu",
"name": "Công Ty TNHH Công Nghệ 44+",
"phone": "+84838777777",
"postalcode": null,
"region": "thành phố Hà Nội",
"short_address": "12 Ngõ 1 Dịch Vọng Hậu",
"sid": "6b5a5645ae59810e",
"source": "openmapvn",
"street": null,
"website": "https://44plus.vn/"
},
"type": "Feature"
}
],
"type": "FeatureCollection"
}
After merger (new data):
{
"bbox": [105.777981, 21.022776999999998, 105.79798100000001, 21.042777],
"errors": null,
"features": [
{
"geometry": {
"coordinates": [105.787981, 21.032777],
"type": "Point"
},
"properties": {
"category": ["corporate_office"],
"continent": "Asia",
"country": "Việt Nam",
"country_code": "VN",
"county": "",
"distance": null,
"has_child": false,
"housenumber": null,
"id": "BFMhbS2hGqAeWlxPGNjnClF6aYQk3F1-nXJxZZjAncYpdqHZSNzpfi0W3RCU",
"label": "Công Ty TNHH Công Nghệ 44+, 12 Ngõ 1 Dịch Vọng Hậu, phường Cầu Giấy, thành phố Hà Nội",
"locality": "phường Cầu Giấy",
"name": "Công Ty TNHH Công Nghệ 44+",
"phone": "+84838777777",
"postalcode": null,
"region": "thành phố Hà Nội",
"short_address": "12 Ngõ 1 Dịch Vọng Hậu",
"sid": "6b5a5645ae59810e",
"source": "openmapvn",
"street": null,
"website": "https://44plus.vn/"
},
"type": "Feature"
}
],
"type": "FeatureCollection"
}
🚀 Benefits
- Backward Compatibility: Existing applications continue to work normally
- Flexibility: Easy switching between old and new data
- Automatic Updates: Latest administrative boundary data
- Simplicity: Just add a boolean parameter
📝 Important Notes
- The
admin_v2
parameter is optional and defaults tofalse
- When
admin_v2=true
, the API returns the latest data after merger - When
admin_v2=false
or not present, the API returns old data - All APIs support this parameter
🔗 Detailed Documentation
For detailed information on how to use the admin_v2
parameter in each specific API, please refer to:
- Autocomplete API
- Forward Geocoding API
- Reverse Geocoding API
- Place Detail API
- Nearby Search API
- Routing API
💬 Support
If you have any questions about this new feature, don't hesitate to contact us:
- Email: [email protected]
- Website: https://www.openmap.vn
- Enterprise Dashboard: https://enterprise.openmap.vn
Last updated: December 2024