Skip to content
This repository was archived by the owner on Nov 8, 2017. It is now read-only.

Conversation

chrisli30
Copy link

Setting "types" option in geocomplete() is no longer working for me. In my case, I need to restrict the autocomplete list results to only cities. After digging my around in Google places API I found that they have changed "types" to "type" and developer needs to call setTypes() explicitly on autoComplete object after initialization.

A good code example would be Google official example of AutoComplete.
https://developers.google.com/places/web-service/autocomplete

There is no change in using geocomplete library. For example, in order to get only cities users could initialize geocomplete like below.
$("#inputAddress").geocomplete({
types: ['(cities)']
});

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant