Variations Object for Places
- In the following code block we can see that “variations” is a parameter passed into the function when the populate event is detected. Additional logic can be added in this function, for example, and can help deal with any additional business logic that is needed to be implemented.
Listen for Events Example
DOTSGlobalAddressComplete.listen("populate", function(address, variations) { document.getElementById("LabelJSON").innerText = variations.Label; });
Place
Field | Type | Description |
---|---|---|
PID | String | The specific record ID that is used when SELECTing results. This ID allows you to look up more than just the recommended result. |
Name | String | The name of the place the result returned. |
Label | String | A more descriptive label of the place with the name and more relevant address info. |
Type | String | Type of Locality result returned. Possible values are Locality1, Locality2, Locality3, or Locality4. |
Thoroughfare | String | The thoroughfare of the address. Will be “null” with this search type. |
Locality1 | String | The Locality1 result returned. |
Locality1_PID | String | The associated PID if a Locality1 result is returned. |
Locality2 | String | The Locality2 result returned. |
Locality2_PID | String | The associated PID if a Locality2 result is returned. |
Locality3 | String | The Locality3 result returned. |
Locality3_PID | String | The associated PID if a Locality3 result is returned. |
Locality4 | String | The Locality4 result returned. |
Locality4_PID | String | The associated PID if a Locality4 result is returned. |
AdminArea1 | String | The AdminArea1 result returned. |
AdminArea1_PID | String | The associated PID if a AdminArea1 result is returned. |
AdminArea2 | String | The AdminArea2 result returned. |
AdminArea2_PID | String | The associated PID if a AdminArea2 result is returned. |
AdminArea3 | String | The AdminArea3 result returned. |
AdminArea3_PID | String | The associated PID if a AdminArea3 result is returned. |
AdminArea4 | String | The AdminArea4 result returned. |
AdminArea4_PID | String | The associated PID if a AdminArea4 result is returned. |
AdminArea5 | String | The AdminArea5 result returned. |
The associated PID if a AdminArea5 result is returned. | String | The associated PID if a AdminArea5 result is returned. |
Country | String | The country of result returned. |
Country_ISO3 | String | The ISO 3166-1 Alpha-3 Country Code of the country associated to the address selected. |
Country_PID | String | The associated PID of the country associated to the address selected. |
Continent | String | The continent of the result returned. |
Continent_PID | String | The associated PID of the continent returned. |
Latitude | String | The latitude coordinate of the centroid of the result returned |
Longitude | String | The longitude coordinate of the centroid of the result returned |
CoordinateType | String | The precision level of the coordinate returned. Will be “centroid” for this search type |
PostalCodes | String | A list of all associated postal codes for the result returned. *Note, currently we will be returning US zip codes but will be expanding this to other countries as we expand on our coming soon search types. |