0

After looking into this bind google places autocomplete on textbox without instantiating a google map (Got no solution)

I want to show this https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete on my site with out the map. In other words i just need the text search box.

I first implemented this https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform to my site. But i come to know that it is not able to search some places. Like Berkley Hotel Savoy Hotel Ritz Hotel Andaz Hotel Landmark Hotel Lanesborough Hotel

But the one with map is working fine . I am removing anything like map initialization or hiding the map with display:none it also hides and disables the text search field.

Thanks for help in advance

Community
  • 1
  • 1
Googler
  • 211
  • 1
  • 3
  • 12

1 Answers1

0

The issue has nothing to do with the map, when you look at the code for the autocomplete without the map you'll see this:

types: ['geocode'] 

When you try it on the demo with the map you'll also not get results when you check the geocodes-button.

Simply remove the types-property from the autocomplete-options in the demo without a map.

Dr.Molle
  • 116,463
  • 16
  • 195
  • 201
  • Works a great. So it is a Json restriction to Map, that it will only look for the geocode only and now the search is open ended. Thank alot. – Googler Oct 18 '14 at 19:30