Search code examples
javascriptrestarcgisesri

querying arcgis and getting results sorted by distance from some point


Using the REST or javascript api, does anyone know how to get results back sorted by distance from a point? I'm doing someething like this:

http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm

and i need the results sorted by distance from the center of a google map.

Thanks!


Solution

  • you might could set up a geoprocessing task with the 'Near' Arctool. and then sorting the result.