<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false&libraries=places"></script>
and add this for autocomplete:
var fromText = document.getElementById('from');
var fromAuto = new google.maps.places.Autocomplete(fromText);
fromAuto.bindTo('bounds', map);
var toText = document.getElementById('to');
var toAuto = new google.maps.places.Autocomplete(toText);
toAuto.bindTo('bounds', map);