Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Places Autocomplete - How to show only country names

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);
like image 371
beginning Avatar asked Nov 01 '22 13:11

beginning


1 Answers

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

like image 97
Hazarapet Tunanyan Avatar answered Nov 16 '22 14:11

Hazarapet Tunanyan