Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi, I have this script
C#
var autocomplete = document.getElementById('ctl00_ContentPlaceHolder2_txtbuscar');
          var options = {
          //types: ['(cities)'],
              componentRestrictions: { country: 'es' }
          };

          autocomplete = new google.maps.places.Autocomplete(autocomplete, options);

      }

to suggest places to the user, my problem is that I restricted the search to spain, and I dont want to suggest the country name. I mean if a user types: madr
the autocomplete shows: madrid, spain
I just want it to show madrid

thank you
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900