The text fields are just that - text , which means that they are NaN . You need to convert them to numbers. Something like this:
let lat1 = Number($w("#userLat"));
The text fields are just that - text , which means that they are NaN . You need to convert them to numbers. Something like this:
let lat1 = Number($w("#userLat"));