Select to view content in your preferred language

ESRI API function (REST/JAVASCRIPT) to find nearest feature of a coordinate

570
0
07-06-2020 12:14 AM
AdeebFarhan
Emerging Contributor

Dears

I have a an array of coordinates in my JavaScript program. I am processing these coordinates in a loop.

 

I need to find the nearest feature of each of these coordinate. The feature I am looking for is available in a map service published in our local server. I need to find the nearest feature in the JavaScript loop itself without manual interventions.

 

Is there any ESRI JavaScript or REST API function available for finding the nearest feature of the selected coordinate? 

 

Could you please provide the API functions and detailed steps to use it?

 

I am using the ArcGIS JavaScript API version 3.14 (js.arcgis.com/3.14compact).

Our ArcGIS server version is 10.2

0 Kudos
0 Replies