Closed teknologist closed 9 years ago
Found it!
Autocomplete only supports types from Table 3. https://developers.google.com/places/documentation/supported_types
Would be worth mentioning in the README....
You beat me to it! After a half hour of screwing around, just found the same thing. :)
Updating the README now. Thanks!
For what it's worth, you still have the Google Maps API loaded (via dburles:google-maps), so you could do a places search outside of the autocomplete context with the types you want.
@jshimko Yep! Saw that but I like the autocomplete provided by Google. I'll see in the future if I have some time do my own places search autocomplete using Google Places API (searchText instead of bundled autocomplete), the thing is I am not sure what tool it is going to take on API quotas...
Speaking of types. Is there a way to access the "types" returned in the results? Thanks.
Hi,
As long as I don't specify types in options everything is fine. It uses the default ['geocode'] setting which outputs cities.
I want to search for food related places so I set
var options = { types: ["bakery","bar","cafe","food","restaurant","meal_takeaway","meal_delivery"] };
And then initialize my input with:
$("#restaurantname").geocomplete(options);
It doesn't work and silently fails. no error in console or server logs whatsoever.
Could you please provide any help ?
Is this normal ?