What does the ‘Get Current GEO Location’ block return

In trying to get my current location into the Location column (type Point) of a table

  • I can get location from Device API > Get Current GEO Location block, and
  • I can generate the Point (to be saved to the table) with GEO Location API > Create GEO Point block.
    But I’ve not be able to get the lng/lat values from Get Current GEO Location.

‘Get Current GEO Location’ looks like a JSON key/value pair when printed to the console, but none of the Text blocks will work with it; no error, just no print. Is not an object; ‘Get property’ block prints nothing, but no error.

Two questions:

  1. What type is the return from ‘Get Current GEO Location’?
  2. Is there a way to get the lng/lat values from it?

Here’s my codeless logic:
UI Builder - ConsoleDemo - Backendless 2022-03-02 21-18-52

Here’s the console output:
index.html?page=getcurrentlocation 2022-03-02 21-19-22

Does it answer your question?

It helps clarify the problem: seems to be some timing issue, in my browser, Backendless API, or both.
The code:
Code

The console:
Console

Current location prints in 1 to 2 seconds, then it takes 30-60 seconds for printing from the set/print curLocation blocks to show up in the console. If the Print/Current Location blocks are disabled, curLocation prints in 1 to 2 seconds.

I had tried the solution you show but didn’t wait long enough for it to complete. Let me know if you have thoughts on the long delay for the second Current Location call; I’ll mark this complete as I now understand what’s happening.

Getting the current location is done by the browser. It is a blocking call. As soon as the browser determines the location, the execution of the logic continues. In some cases it make take a minute or so for the browser to determine the GPS position.