Skip to content

Instantly share code, notes, and snippets.

@matedemorphy
Created May 25, 2017 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save matedemorphy/2c05b33b62c9b17781924e164d175f16 to your computer and use it in GitHub Desktop.
Save matedemorphy/2c05b33b62c9b17781924e164d175f16 to your computer and use it in GitHub Desktop.
function initMap() {
navigator.geolocation.getCurrentPosition(centerMap, locationError);
$scope.correctDir = false;
var options = {
types: [],
componentRestrictions: {country: 'co'}
};
var input = document.getElementById("address-auto");
var autocomplete = new google.maps.places.Autocomplete(input, options);
autocomplete.addListener('place_changed', function() {placeMarker(autocomplete)});
console.log(autocomplete);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment