How to do geocoding with angular-google-maps
Realized I can avoid all the problems with just using a http request instead:
$http.get('https://maps.googleapis.com/maps/api/geocode/json?address=' + address + '&key=X') .then(function(coord_results){ $scope.queryResults = coord_results.data.results; $scope.geodata = $scope.queryResults[0].geometry; }, function error(_error){ $scope.queryError = _error; });
If someone does know how to solve the above problem without this, please still leave a post.
I had the same problem in doing that :
uiGmapGoogleMapApi.then(function(apiMaps) { var geocoder = new apiMaps.Geocoder(); console.log(geocoder); //undefined });
My solution :
uiGmapGoogleMapApi.then(function(apiMaps) { var geocoder = new google.maps.Geocoder(); console.log(geocoder); //object });