Skip to content

Instantly share code, notes, and snippets.

@bkenny
Created December 18, 2012 14:03
Show Gist options
  • Save bkenny/4328232 to your computer and use it in GitHub Desktop.
Save bkenny/4328232 to your computer and use it in GitHub Desktop.
Google Maps V3 Autocomplete Field
<!DOCTYPE html>
<html>
<head>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places"></script>
<script>
function initialize() {
var input = document.getElementById('searchTextField');
var autocomplete = new google.maps.places.Autocomplete(input);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div>
<input id="searchTextField" type="text" size="50">
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment