I think I know the answer to this, but I'm going to ask anyway! I have an Experience that allows students to filter study centre (points) based on their facilities. I'm displaying the list of buildings using the List widget. What I'd like to add to each list item is the (straight line) distance from the users current location to each study centre as shown in the first record (Alison House) on the image below:
If this is possible, what I'd also like to be able to do is sort the list by distance from the users current location.
I suspect this isn't possible (I'm using ArcGIS Online, not Enterprise) but would love to know if anyone else has done something like this and how it was achieved.
It should also be possible to use this Attribute as a Sort field.
Hi @JeffreyThompson2, many thanks for getting back to me, that's really helpful. I've kind of got it working (you can see a very simple implementation here: https://experience.arcgis.com/experience/a8e84912e5924d41895e5eef342d3e0f) but have a couple of questions:
I see you've managed both of these things in your Park Finder application (https://gis2.arlingtontx.gov/parkfinder/) and I'd love to know how you achieved this.
Any tips/pointers/help would be greatly appreciated.
Thanks!
I should add, the way I set up the above linked Experience it to create two lists and put them each within a Section/View which are then toggled using a Views Navigation widget. I couldn't think how else to set this up so that the default alphabetically sorted list was visible on load if the lists data source is set to the output of the Near Me tool which is only activated when the user presses the 'find my location' button, unless there is a way to activate this tool at the point the Experience loads?
Aaargh, sorry, I forgot to share the ExB app. You should be able to see it now: https://experience.arcgis.com/experience/a8e84912e5924d41895e5eef342d3e0f (it's very basic though)
The Near Me results aren't showing up for me. I suspect this has something to do with the distance between Texas and Scotland. Not any issue with the configuration.
Mostly just give this a bit of style (pictures for each location would go a long way) and you should have a nice application.
Thanks @JeffreyThompson2, I'm using ArcGIS Online not Developer Edition and the maximum search distance you can configure in AGOL is 1609km (1000miles). Looking at your ParkFinder app, we're 4800miles apart!
There are too many annoyances in this AGOL version to be able to use this in a production app, specifically the zooming in then out caused by the 'find my location' then 'near me' widgets respectively; and the fact the user has to press the 'find my location' button to populate the 'libraries by distance list'. It's interesting to see what's possible, but at the moment we can't embed this in the app we're developing. Thanks for your help though, it is much appreciated 👍
I meant to mention this earlier, but the next ArcGIS Online Update, Q1 2026, should include an enhancement to automatically get and track the user's location.
Yeah I saw that too. Thanks.