MongoEngine/mongoengine — pull request #664 by scttl (2014-06-11 19:25:11+00:00)
Title: Correct $maxDistance location for geoJSON $near queries.

Per
http://docs.mongodb.org/manual/release-notes/2.6-compatibility/#maxdistance-changes
$maxDistance must now be located within the $near operator on geoJSON objects,
not outside (as of mongoDB 2.6).

Note that this fix is backwards compatible with prior mongo releases as
geoJSON $near has always supported $maxDistance.