Bringing the ArcGIS Runtime into Survey123 for Geopoint?

696
4
10-24-2018 09:14 AM
DanielYaw_Jr__GISP
New Contributor III

I'm new to using AppStudio and QML - 

The first project I am trying to accomplish is to use the ArcGIS Runtime as the geopoint. Meaning, I want to use feature classes in the map. This video touches on it, but does not go into detail: Extending Survey123 for ArcGIS - YouTube 

Does anyone know the best way to accomplish this?

0 Kudos
4 Replies
ErwinSoekianto
Esri Regular Contributor

Hello Daniel, 

The very first step you need to do is to download the Survey123 field app source code from AppStudio Desktop - Enterprise template, the steps to do it are covered in this blog post (Step III).

You would then notice that ArcGIS Runtime library is not included yet, so you would want to add the import statement for ArcGIS Runtime, you can refer to any of the AppStudio samples that has mapping components in it or the most basic one would be the "Hello World (Runtime)" under Starter tab when you click "New App".

And then, if I were to do this, I would find the current GeoPoint control code and create a new one that would use ArcGIS Runtime mapping component instead, and that would do the custom business logic for your scenario.

I know you mentioned that you are quite new to AppStudio and QML, the files, folders, and variable names in Survey123 source code should be self-explanatory, but it is not a small project. I did a little bit of digging, it seems that the Geopoint controls are in the XForms folder, named XFormGeopintControl.qml and XFormGeopointCapture.qml.

Then you can do an advanced search in Qt Creator to see when this component is being used in the whole project and replace it accordingly. 

I hope this is helpful and good luck!

Thank you,

Erwin.

0 Kudos
DanielYaw_Jr__GISP
New Contributor III

Thank you!

I’m trying to approach it from making a new map control. If I have the person drop a pin on the map, can I pass the coordinates back through as the geopoint? What’s the best way to do that?

Sent from my iPhone

0 Kudos
ErwinSoekianto
Esri Regular Contributor

You should be able to! The current map/geopoint-control is already doing that, so you can follow how it is being done in the current control. 

0 Kudos
DanielYaw_Jr__GISP
New Contributor III

What I'm struggling with is actually what field is the coordinates stored in? And what is the XFormExpressionGeopointHelper.js relationship? And where is it? 

0 Kudos