Google Maps autocomplete does not show address

1

I'm trying to get my Google autocomplete to show the address in the form "City - State, Country" however, it's returning this to me:

Inshort,itonlyreturnswiththecity,butyoucannottellwhereitisfrom.

Itesteditthisway:

varinput=document.getElementById('address');$(function(){varoptions={types:['(cities)']};varautocomplete=newgoogle.maps.places.Autocomplete(input,options);});

AndinJS:

<scriptsrc="https://maps.googleapis.com/maps/api/js?key=****&libraries=places"></script>

Even though I remove the types: ['(cities)'] continues without showing the rest of the address.

I left something to do?

    
asked by anonymous 24.02.2018 / 15:01

0 answers