Location: seeing the correct marker, but can't access data

I am struggling to get location data from the app.
I have a model with a field of type: location
The view then has a capture coordinates component that is bind to the object. The map shows the marker in the correct location, but then nothing shows up in the logs if I try to log the location.

I am running the latest version of the iOS app, with the latest runtime. These tests are completed in “test”

The diagnostics in the app show the gps as being “green”

Any ideas?

Hi @reggiepret

Can you share the following please

  1. Your view XML
  2. Your view JS where you are trying to log the value of the location field
  3. Runtime version
  4. Container version

Hi, sure thing! Sorry, should’ve included in the original question.

View: XML

View: JS
function logLocation(){

console.log(view.current_farm.farm_location.horizontal_accuracy)
console.log(view.current_farm.farmer_name)
view.current_farm.farm_location = view.current_location
view.current_farm.save()

}

Datamodel: XML


Runtime: 4.84.2
Container: Container 4.84.2 (22.4.1)

Testing environment

This sounds like an issue fixed in 4.84.3 - I’d recommend upgrading to the latest stable version (4.84.8 currently).

Thanks @ralf
I have upgraded to 4.84.10, and it looks like it works.

There is a weird behaviour, where the location doesn’t load when connected to Wifi?
Any ideas on that?

Thanks!
Reghardt