An Esri JS API Task to find the nearest feature