Is it possible to list cities only using vuetify-google-autocomplete?

Is it possible to list cities only in vuetify-google-autocomplete like this? (image attached)

Target

My current autocomplete looks like this, and it’s searching for full addresses by default.

Actual

I couldn’t find information on this topic in the documentation or on any other pages, so I am asking for help here.

My code :

App.js :

import VuetifyGoogleAutocomplete from 'vuetify-google-autocomplete';

Vue.use(VuetifyGoogleAutocomplete, {
  apiKey: 'xxxxxxxxxxxxxxxxxxxxxxxxx',
  installComponents: true,
  vueGoogleMapsCompatibility: false
});

Component.js :

<vuetify-google-autocomplete
  type="text"
  ref="location"
  v-model="location"
  id="map"
  v-on:placechanged="getAddressData"
>

1 thought on “Is it possible to list cities only using vuetify-google-autocomplete?”

  1. Yes there is! You can do this:

      <vuetify-google-autocomplete
          id="map"
          placeholder="Location"
          types="(cities)"
      >
      </vuetify-google-autocomplete>
    
    Reply

Leave a Comment