I need to filter results, to Barcelona, Spain not to Spain as is seen in code.
autocomplete = new google.maps.places.Autocomplete(
(document.getElementById('autocomplete')),
{
types: ['geocode'],
componentRestrictions: {
country: 'es',
}
});
I tried with postalCode using 08 (Barcelona prefix) and 08000 inside componentRestrictions and does not work.
There is away I can filter only to Barcelona address in autocomplete?