I am trying to use $near to find places that are near my users.
$places = Places::model ()->findAll(array (
"conditions" => array (
'location' => Array('near' => array((float)$this->latitudeUser,(float)$this->longitudeUser)),
),
"maxDistance" => 1,
"limit" => 5,
));
Everything seems to work except that it finds places as far as Texas USA and I am in Montreal Canada. I have no idea what I can do to make maxDistance work. It seems I cannot use GeoNear or nearSphere since EMongoDocuments does not support them it seems.
So am I missing something obvious?
I am aware of mongomapper-near-with-maxdistance-mongooperationfailure-geo-values-have-to but nothing there helped.
edit: changed order of longitude lattitude