Custom sorting by distance base on position properties

Hi all, I have models with Lat/Long properties and I would like to sort them by distance based on my current location (which I get through html5 geolocation request). Can I do the sorting using emberjs? what strategy should I use? If yes please help, I coudln’t figure it out.

sorry should have asked that on stackoverflow, my bad. You can answer me here: Custom Sorting models by distance based on location properties with Ember.js - Stack Overflow