Have you tried awaiting for the filter promise to be resolved?
Try this:
$w.onReady(() => {
$w('#bandDataset').onReady(async () => {
await geoloc()
})
})
async function geoloc() {
// Get some variables from inputs
await $w('#bandDataset').setFilter(
wixData
.filter()
.between('lat', latBottom, latTop)
.between('long', longLeft, longRight)
)
}
