Select to view content in your preferred language

"The saga" of automatic geopoint update when opening an Survey via URL

332
5
08-01-2024 08:26 AM
ceredajunior_UnB
Emerging Contributor

First of all, I've done a lot of research in the documentation, forums, etc. and I decided to write this question because the behavior I'm getting from the FieldMaps + Survey123 looks a lot like a BUG that has already been solved (BUG-000127130).

Let's go:

  1. I have a URL that is built and sent from a point popup via FieldMaps to Survey123, both apps on Android.
  2. The URL has the following structure: <arcgis-survey123://?itemID=xyzx&action=edit&field:xyzx=2&field:xyzxy=222222&update=true&q:globalID=xyzx&callback=https://fieldmaps.arcgis.app>
  3. When I enter the Survey123 form (everything is fine, with the feature I need from the globalid, etc), the coordinate that is identified as x and y is coming from the feature (point position) clicked on in FieldMaps.
  4. If I change the appearance of the geopoint to press-to-locate and the user actually clicks, then the coordinate is updated from the location provider of smartphone (behavior I need)
  5. I'm sure of the difference between the coordinates because I check via a longitude and latitude note fields that I create to debug.
  6. I need the user to have the updated coordinate of their position (GNSS/location provider) when they enter the Survey via FieldMaps and not the position of the point in the FieldMaps/Feature, because if I needed this, I would pass it as a URL argument.

The description of the first part of BUG-000127130 is very similar - but no question is using relevant question":

"In the Survey123 for ArcGIS field app, the current location is not automatically returned when the survey is opened using a custom URL"...

I also found something related to this in this thread (Automatic geopoint update when opening an Inbox Survey), but I didn't succeed either.

Am I committing a mistake or is this, in fact, the behavior?

0 Kudos
5 Replies
abureaux
MVP Frequent Contributor

What you described sounds like standard behaviour to me, but I also feel like I may be missing something since I don't see the bug/error in your explanation.

As I understand it, you are launching into S123 via selecting a point in Field Maps, and...

  1. When your geopoint has no "appearance" set, the geopoint defaults to the lat-lon of the point you selected in Field Maps
  2. When your geopoint has the "click-to-locate" appearance set, the geopoint defaults to the lat-lon of the device (after the button is clicked, of course).

Are you looking for the behaviour of #2, but with the "appearance" not set to "click-to-locate"?

0 Kudos
ceredajunior_UnB
Emerging Contributor

Thanks for you attention, @abureaux.

Yes, what I need is a geopoint with "no appearance" or, at least, one that doesn't require user intervention:

- when the user comes from Field Maps (URL) I need a "updated" coordinates, i.e. instead of the coordinates of the feature already in FieldMaps, the current location via GNSS (provider locator) - " the current location is not automatically returned when the survey is opened using a custom URL"

Thanks again,

0 Kudos
abureaux
MVP Frequent Contributor

gotcha.

Hmm... I think you are seeing "normal" behaviour. But I see why its frustrating. As you mentioned, you'd feed the lat-lon manually if you wanted to see that location.

Maybe as a workaround, add a second geopoint as press-to-locate that can override the lat-lon provided by the point. This new geopoint would need to be set to "null", and you'd have to extract the lat-lon form it.

0 Kudos
ceredajunior_UnB
Emerging Contributor

Well, instead of a bug, I'll turn it into a new desired feature... 🙂

Anyway, I've already been working on a workaround that involves checking some conditions, including the result of a javascript code that calculates the distance between the planned point and the current point, always "forcing" the user to update their coordinate by "click-to-locate".

It was already working, but if it had this possibility, it would be more convenient for many other applications.

Thank you very much for your attention and I'll add it as an Idea for Survey123.

abureaux
MVP Frequent Contributor

Don't forget to link that idea here so anyone that stumbles across this thread can find it!

0 Kudos