function initAutocomplete() { var lat=document.getElementById(\'lat\').value; var lng=document.getElementById(\'lng\').value; console.log(lat); console.l
Just initialize parameters:
function initMap(lat_ = 0, lon_ = 0) { var map = new google.maps.Map(document.getElementById('map'), { center: {lat: lat_, lng: lon_}, zoom: 10 }); }