1
I’m using the Google Api for the address search. The api works correctly, but I need the api to return me the data already with the location number.
Currently the api returns me something like: Av. Paulista - Bela Vista, São Paulo - SP, Brazil
I would like that when the user typed "Avenida Paulista" were only displayed the results followed by the number, as for example does Uber and Rappi.
Follow the excerpt of my code where I do the search:
const options = {
types: ['address'],
componentRestrictions: {
country: ['br']
}
};
// Initialize Google Autocomplete
/*global google*/ // To disable any eslint 'google not defined' errors
this.autocomplete = new google.maps.places.Autocomplete(
document.getElementById('autocomplete'),
options
);
// Fire Event when a suggested name is selected
this.autocomplete.addListener('place_changed', this.handlePlaceSelect);