I managed to get this working now in the morning in two different
ways. Some sleep helped me solve the problem. Here's how i did it:
If you're sending in 'establishment' in the option-parameter it has to
be an array:
---code---
var options = {
bounds: defaultBounds,
types: ['establishment'] // <- See here!
};
autocomplete = new google.maps.places.Autocomplete(input, options);
---end code---
It's also possible to use the autocomplete.setBounds()-method but i
had to put it in my bounds_changed-event (which is called upon page
load).
---code---
google.maps.event.addListener(map, 'bounds_changed', function() {
autocomplete.setTypes(['establishment']);
autocomplete.setBounds(map.getBounds());
});
---end code---
Yay.
Thanks for your input.
Cheers
Johannes
On May 20, 10:12 am, Johannes Schill <
johannes.sch...@gmail.com>
wrote: