The way to do this in Retool is to use utils.getCurrentPosition() in a JS query. This function will return an object were we have access to the coordinates.
For example:
Then, you can use this data in any "Resource query" by doing {{ queryName.data.coords.latitude }} to access the latitude and {{ queryName.data.coords.longitude }} to access the longitude data.