I try to embed google maps autocomplete in my script. As an example the api is asked to find “Neustadt” in Germany. There are a few possible matches to be shown. For that purpose this is fired:
google.maps.event.trigger(document.getElementById('search'), 'focus', {} );
The autocomplete text input expands and (hurray) the alternatives are shown.
BUT if you click on one nothing happens.
Expected behavior: Show the selected place.
Whats wrong? Any known cure?
Any hint appreciated a lot.
There is no object in the Google Maps API V3 which has a ‘
focus'event. Withgoogle.maps.event.trigger(), you can only trigger the documented events. If you’re trying to trigger an event in a DOM element you can do so directly, ie: