Google Places autocomplete - how to show only country names

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

enter image description here

I tried this (doesn't work):

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

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

      

+3


source to share


1 answer


Google allows you to use some properties to get the data however you want. You can install the language and everything else on it. Here is a link to help you. http://www.w3docs.com/learn-javascript/places-autocomplete.html



+3


source







All Articles