Select to view content in your preferred language

Using Search Widget's "Use Current Location" to find lat/long

92
1
Thursday
MelissaSullivan
Occasional Contributor

I am trying to use the Search Widget to trigger the Near Me widget to display the closest trail marker as the Near Me result. I want this to work with the Search widget's Use Current Location option. I realized that using my default address-based locators wasn't working because the Search widget was instead finding the closest address (sometimes quite far from the trail), then finding the closest trail marker to that address.

I have tried a few different ways of doing this, but so far I am getting this result every time I try clicking Use Current Location:

MelissaSullivan_0-1746107349481.png

One thing I tried was to create my own Locator View from the ArcGIS World Geocoding Service with these parameters. For reasons I don't understand, the Search widget is displaying the address when I click Use Current Location with this locator instead of coordinates (the display fields I chose were X & Y):

MelissaSullivan_0-1746108722117.png

Is there a way to get this to work, so that the Search widget's coordinates will then trigger the nearest trail marker?

I initially tried this with the My Location widget but there are no message actions available for that widget.

0 Kudos
1 Reply
ShengdiZhang
Esri Regular Contributor

Hi @MelissaSullivan ,

When the current location is used to search, reverse-geocode is used, and the service returns the address closest to the location.

Currently, My location does not support message actions, but you can use the data action as a workaround.

ShengdiZhang_0-1746512251900.png

Please let me know if you have other questions.

Regards,

Shengdi

 

0 Kudos