google.maps.event.addEventListener( radioButton, 'click', function() {
autocomplete.setTypes( ['establishment'] );
// lands you: Uncaught TypeError: google.maps.event.addEventListener is not a function
您需要如下所示的rethink+rewrite:
document.getElementById(radioButton).addEventListener('click', function(e) {
autocomplete.setTypes( ['establishment'] ); // yellowstone PARK
autocomplete.setTypes( ['address'] ); // some address with yellowstone st