sort locations on a given cell by distance
example google apps script