Skip to main content

GmapAutocomplete

Autocomplete component

[See](source code)

Props

Prop nameDescriptionTypeValuesDefault
boundsMap bounds this is an LatLngBounds
object builded with
@value new google.maps.LatLngBounds(...)
@see Map Bounds
object-undefined
componentRestrictionsRestrict the search to a specific country
@value \{[key: string]: string\}
@see componentRestrictions
object-undefined
typesMap types this is an array of strings
@value string[]
@see Map Bounds
array-undefined
selectFirstOnEnterSelect the first result in the list when press enter keyboardbooleantrue, falsefalse
slotRefNamethe unique ref set to the component passed in the slot inputstring-'input'
childRefNameThe name of the ref to obtain the html input element
if its a child of component in the slot input
very useful whe we use a component like v-text-field of vuetify
that has a 'input' ref pointing to the final html input element
string-'input'
optionsOther options that you can pass to the Google Mapas
Autocomplete API
@see Options
objectgeocode, address, regionsundefined
setFieldsToTo avoid paying for data that you don't need,
be sure to use Autocomplete.setFields() to specify
only the place data that you will use.
@see Place information
@see setFields
@see PlaceResult
array-null

Events

Event namePropertiesDescription
place_changedplace object - this.$autocomplete.getPlace()Place change event

Slots

NameDescriptionBindings
defaultUsed to set your custom component for the input, eg: v-text-field.