var map; var x= -34.397; var his = Number("$('td').eq(19).html();"); alert(his); function initMap() { map = new google.maps.Map(document.getElementById('map'), { center: {lat:his, lng: 150.644}, zoom: 8 }); }; initMap(); 

Already dismantled everything. It remains only to bring the field to a number. I just can not make out.

    1 answer 1

    You do not refer to the contents of the cell, but specify a string containing this text: $('td').eq(19).html() . Do so Number($('td').eq(19).html()) or try this option:

     var map; var x= -34.397; var his = parseFloat($('td').eq(19).html()); // Преобразовывает строку в число alert(his); function initMap() { map = new google.maps.Map(document.getElementById('map'), { center: {lat:his, lng: 150.644}, zoom: 8 }); }; initMap();