Skip to content

Instantly share code, notes, and snippets.

@talcual
Forked from matedemorphy/map.js
Created May 25, 2017 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talcual/3882340c5b2cee7f62fa5ddcd2b1f45b to your computer and use it in GitHub Desktop.
Save talcual/3882340c5b2cee7f62fa5ddcd2b1f45b 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