Google Places Autocomplete - How to show only country names

3.8k Views Asked by At

I want the users to see only the country names when they type on the search box. Is it possible?

enter image description here

I've tried this (doesn't work):

var options = {
    types: [('regions')]
};

var searchBox = new google.maps.places.SearchBox(input, options);
1

There are 1 best solutions below

0
On

Google lets you to use some properties for getting the data like you want.You can set to it language and anything else. Here is a link,which will help you. http://www.w3docs.com/learn-javascript/places-autocomplete.html