Select to view content in your preferred language

Poor Accuracy of Locate Widget

1838
12
09-01-2021 09:18 AM
MichaelOakeson
New Contributor

We are using the Locate Widget in our app and we have noticed that the locate widget isn't very accurate at times. 

We tested using the sample Locate Widget from the ArcGIS app and we received similar results that we wish to document and would like to petition the developers to make this more accurate.  

Sorry there is no sound in the video as I'm just doing a screen recording with my iPhone, but I'm walking up at a college campus and using the Locate Widget, near the end of my attached video I tap the widget, it takes me close to where I'm at, and then tap it again before it actually gets to where I'm at.

We are using this Locate Widget in our new app. In our old app, we were using just HTML Geolocation API and built it out ourselves and it seems to be more accurate than the current widget.  We would love to use ArcGIS API for our app, but again, its accuracy is a little lacking.

Would appreciate any help on this.

0 Kudos
12 Replies
BobCowling2
New Contributor III

The solution to my problem from ESRI support was that the ArcGIS JS API was not honoring the Geolocation API options (maximumAge, timeout, enableHighAccuracy) as the default values, mainly enableHighAccuracy. It specified in esri's documentation that high accuracy was set to true by default. This was found not to be the case by one of the developers. The solution is to manually specify enable high accuracy to true in the geolocation widget's options. I believe a bug report was submitted on this. I am not positive if this is something that was fixed in the 4.25 update though. 

ZacharyHart
Regular Contributor

@BobCowling2 thanks for posting the solution!!

0 Kudos
AndyGup
Esri Regular Contributor

I just double checked the code, the enableHighAccuracy property is set to true in the ArcGIS JS SDK by default at 4.25. But YMMV based on the items I mention above.

0 Kudos