strongloop/loopback-connector-mongodb — pull request #68 by timosaikkonen (2014-11-20 07:05:01+00:00)
Title: Support for geoNear queries

I wrote basic support for 2d geo queries. It converts GeoPoints to the GeoJSON format that MongoDb uses and applies 2dsphere indexes to geopoint fields when you set index: true on your model definition. See the tests for more details.

There's a hitch with backwards compatibility though, since thus far geopoints have been saved as {lat: Number, lng: Number} objects, and applying a 2dsphere index on a field like that will fail. Not entirely sure how to deal with that. I suppose one could do a data migration in the autoupdate method?