Localities Reference
Localities Javascript API Reference- AutocompleteService class
- AutocompleteLocalities object Specification
- AutocompleteRequest object Specification
- AutocompleteResponse object Specification
- ComponentRestrictions object Specification
- ErrorCallback function definition
- LatLngBoundsLiteral object Specification
- LatLngLiteral object Specification
- SuccessCallback function definition
AutocompleteService class 🔗
woosmap.localities.AutocompleteService
Constructor | |
AutocompleteService( |
Instantiate a new AutocompleteService Object |
Methods | |
getQueryPredictions( |
Get the predictions array from an input value. |
AutocompleteLocalities object Specification 🔗
Properties | |
admin_0 |
Type: String
The country name associated to the prediction |
admin_1 |
Type: String
The area name associated to the prediction |
description |
Type: String
The suggested formatted answer |
location |
Type: LatLngLiteral
The location object |
name |
Type: String
The location name |
postal_codes |
Type: String| Array of postal codes for suggested location (only returned for localities predictions) |
postal_town |
Type: String
Contains the larger city (or the post office city) for a postal_code (only available on suggestions with type: postal_code). |
type |
Type: String
requested prediction type (‘locality’ or ‘postal_code’) |
viewpoint |
Type: LatLngBoundsLiteral
The preferred viewpoint when displaying this Locality on a map. This property will be null if the preferred viewport for the Locality is not known. |
AutocompleteRequest object Specification 🔗
Properties | |
input |
Type: String
User input |
components |
Type: ComponentRestrictions
restricts predictions to selected components |
types |
Type: String
The types queried (supports ‘locality’ and ‘postal_code’ ; omit param for both) |
data |
Type: String
Defaults to ‘standard’, can be set to ‘advanced’ to retrieve postal codes outside western Europe |
language |
Type: String
expected response language (ISO 639-1 code). Default is the country local or browser language. |
AutocompleteResponse object Specification 🔗
Properties | |
localities |
Type: AutocompleteLocalities
Array with Autocomplete Localities |
ComponentRestrictions object Specification 🔗
Properties | |
country |
Type: String| Restricts predictions to the specified country (ISO 3166-1 Alpha-2 country code, case insensitive). For example, ‘fr’, ‘gb’, or ‘es’. You can provide a single one, or an array of country code strings. |
ErrorCallback function definition 🔗
ErrorCallback
Function | function(errorCode:Number,errorText:String) |
Callback executed when query fails |
LatLngBoundsLiteral object Specification 🔗
Properties | |
east |
Type: String
The east value |
north |
Type: String
The north value |
south |
Type: String
The south value |
west |
Type: String
The west value |
LatLngLiteral object Specification 🔗
Properties | |
lat |
Type: String
The latitude value |
lng |
Type: String
The longitude value |
SuccessCallback function definition 🔗
SuccessCallback
Function | function(autocompleteResponse:AutocompleteResponse) |
Callback executed when query is successful |