Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

google places autocomplete just cities

function initialize() {

 var options = {
  types: ['(cities)'],
  componentRestrictions: {country: "us"}
 };

 var input = document.getElementById('searchTextField');
 var autocomplete = new google.maps.places.Autocomplete(input, options);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #google #places #autocomplete #cities
ADD COMMENT
Topic
Name
7+8 =