Hi all,
can I limit the distance between the user's location and the captured feature, for example: the user must be within a distance of 5meter from the captured feature?
Sorry, but could you please explain where did you write this expression ? In Field maps expressions or in field calculations of the field in the web map? What do you mean by "DesignLat" & "DesignLong"?
Just a note: the field worker's location and the surveying feature location, both of them, are dynamic and changed from a place to another.
Just convert the formula above to arcade like this
var originShift = 2.0 * PI * 6378137.0 / 2.0; var lon = (Geometry($feature).x / originShift) * 180.0; var lat = (Geometry($feature).y / originShift) * 180.0; lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0); return Round(Acos(Sin(lat * PI / 180)*Sin($feature.DesignLat * PI / 180) + Cos(lat * PI / 180)*Cos($feature.DesignLat * PI / 180)*Cos(($feature.DesignLong * PI / 180)-(lon * PI / 180))) * 6371000,2)
It basically calcs the lat, long of the point then compares to the static lat/long they were supposed to go to.
You can then add a if if you want. Like if distance>5 then return Warning you are too far type message.
Hope that helps.
@DougBrowning
Could you please explain more about how to use arcade?
I think that in the case we use arcade, we have to add another layer for the field worker location.
No but you can use a calc in Arcade to yell at them they are too far in red. Best I could find.
Survey123 can do it though.
Hi @Hala_Ghareeb ,Do the field workers need to be on the feature they are collecting (ie can they use the built in gps as the location for the features)? You can set a required accuracy for the GPS that will ensure data quality in this scenario. If that doesnt help, the closest functionality I can think of is that we can restrict the use of the "Collect here" button, which can be used to place points at a certain location by long pressing on the map. This functionality can be removed on a per map basis from the particular Web Map in Field Maps Web.
Regards,Colin
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.