📅  最后修改于: 2022-03-11 15:01:58.956000             🧑  作者: Mango
//The error comes because you pass the value as string:
var lat = document.getElementById('lat').value;
//you need to set it as float:
var lat = parseFloat(document.getElementById('lat').value);