I use Google Autocomplete and get this error
InvalidValueError: not an instance of HTMLInputElement
I think Google has getElementById for deprivation
var input = (
document.getElementById('pac-input'));
However, I am not sure about its use. My code is below
var options ={
types:['(cities)'],
};
var input = document.getElementById('destination');
var autocomplete = new google.maps.places.Autocomplete(input, options);
}
google.maps.event.addDomListener(window, 'load', initialize);
ottz0 source
share