Reverse Geocoding (V2)
Find places or addresses near a longitude/latitude pair
Url
Method: GET
https://maps.track-asia.com/api/v2/geocode/{outputFormat}
Example
https://maps.track-asia.com/api/v2/geocode/json?latlng=10.7952219,106.7217912&key=public_key
https://maps.track-asia.com/api/v2/geocode/xml?latlng=10.7952219,106.7217912&key=public_key
outputFormat
outputFormat | Description |
---|---|
json | indicates output in JavaScript Object Notation (JSON) |
xml | indicates output in XML |
Parameters
Parameter | Values | Description | Example |
---|---|---|---|
latlng | {latitude}, {longitude} (required) | The latitude and longitude values specifying the location for which you wish to obtain the closest, human-readable address. | 10.7952219,106.7217912 |
key | String (required) | API key | public_key |
radius | Number | The search radius in meters (m) | 500, 100, 50, etc. |
JSON Response
{"plus_code": {"global_code": "7P28QPWC+3P"},"status": "OK","results": [{"place_id": "17:venue:64f7ee6b-0d22-514c-be2a-36bed365ae0f","name": "Compass Offices","sublabel": "Phường 22, Quận Bình Thạnh, Thành phố Hồ Chí Minh","formatted_address": "Compass Offices, Phường 22, Quận Bình Thạnh, Thành phố Hồ Chí Minh","address_components": [{"long_name": "Phường 22","short_name": "Phường 22","types": ["administrative_area_level_3","political"]},{"long_name": "Quận Bình Thạnh","short_name": "Quận Bình Thạnh","types": ["administrative_area_level_2","political"]},{"long_name": "Thành phố Hồ Chí Minh","short_name": "HCM","types": ["administrative_area_level_1","political"]},{"long_name": "Việt Nam","short_name": "VN","types": ["country","political"]}],"geometry": {"location": {"lat": 10.79521,"lng": 106.721749},"location_type": "ROOFTOP","viewport": {"northeast": {"lat": 10.797006622349983,"lng": 106.72357799014847},"southwest": {"lat": 10.793413377650019,"lng": 106.71992000985153}}},"plus_code": {"compound_code": "QPWC+3M Quận Bình Thạnh, Thành phố Hồ Chí Minh, Việt Nam","global_code": "7P28QPWC+3M"},"partial_match": false,"icon": "entertainment_and_recreation-11","icon_background_color": "#c03576","class": "entertainment_and_recreation","subclass": "event_venue","types": ["point_of_interest","event_planning","event_venue","entertainment_and_recreation"]}]}
XML Response
<?xml version="1.0" encoding="UTF-8"?><GeocodeResponse><plus_code><global_code>7P28QPWC+3P</global_code></plus_code><status>OK</status><result><place_id>17:venue:64f7ee6b-0d22-514c-be2a-36bed365ae0f</place_id><name>Compass Offices</name><sublabel>Phường 22, Quận Bình Thạnh, Thành phố Hồ Chí Minh</sublabel><formatted_address>Compass Offices, Phường 22, Quận Bình Thạnh, Thành phố Hồ Chí Minh</formatted_address><geometry><location><lat>10.79521</lat><lng>106.721749</lng></location><location_type>ROOFTOP</location_type><viewport><northeast><lat>10.797006622349983</lat><lng>106.72357799014847</lng></northeast><southwest><lat>10.793413377650019</lat><lng>106.71992000985153</lng></southwest></viewport></geometry><plus_code><compound_code>QPWC+3M Quận Bình Thạnh, Thành phố Hồ Chí Minh, Việt Nam</compound_code><global_code>7P28QPWC+3M</global_code></plus_code><partial_match>false</partial_match><icon>entertainment_and_recreation-11</icon><icon_background_color>#c03576</icon_background_color><class>entertainment_and_recreation</class><subclass>event_venue</subclass><types>point_of_interest</types><types>event_planning</types><types>event_venue</types><types>entertainment_and_recreation</types><address_component><long_name>Phường 22</long_name><short_name>Phường 22</short_name><type>administrative_area_level_3</type><type>political</type></address_component><address_component><long_name>Quận Bình Thạnh</long_name><short_name>Quận Bình Thạnh</short_name><type>administrative_area_level_2</type><type>political</type></address_component><address_component><long_name>Thành phố Hồ Chí Minh</long_name><short_name>HCM</short_name><type>administrative_area_level_1</type><type>political</type></address_component><address_component><long_name>Việt Nam</long_name><short_name>VN</short_name><type>country</type><type>political</type></address_component></result></GeocodeResponse>