We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not able to access the input using document.getElementById Search Area
var components = { premise: 'long_name', sublocality_level_2: 'long_name', sublocality_level_1: 'long_name', locality: 'long_name', sublocality: 'long_name', administrative_area_level_1: 'long_name', administrative_area_level_2: 'long_name', country: 'long_name', postal_code: 'short_name', political: 'long_name' };
vm.autocompleteOptions = { componentRestrictions: { country: 'in' }, types: ['geocode'] } var addressLoc = new google.maps.places.Autocomplete(document.getElementById('addressdetails'), { }); google.maps.event.addListener(addressLoc, 'place_changed', function() { $scope.$evalAsync(fillInAddress); }); function fillInAddress() { var place = addressLoc.getPlace(); Object.keys(components).forEach(function(component) { vm.exUser[component] = ''; }); place.address_components.forEach(function(component) { var addressType = component.types[0]; if (components[addressType]) { vm.exUser[addressType] = component[components[addressType]]; console.log(vm.exUser[addressType]); } }); }
The text was updated successfully, but these errors were encountered:
put the js code in setTimeout works fine
Sorry, something went wrong.
This error occur when geocode accessing the input field and the filed is not still load and only work for input field
No branches or pull requests
not able to access the input using document.getElementById
Search Area
var components = {
premise: 'long_name',
sublocality_level_2: 'long_name',
sublocality_level_1: 'long_name',
locality: 'long_name',
sublocality: 'long_name',
administrative_area_level_1: 'long_name',
administrative_area_level_2: 'long_name',
country: 'long_name',
postal_code: 'short_name',
political: 'long_name'
};
The text was updated successfully, but these errors were encountered: