public function withinMiles($key, $point, $maxDistance)
    {
        $this->near($key, $point);
        $this->addCondition($key, '$maxDistance', $maxDistance / 3958.8);

        return $this;
    }
public function withinMiles($key, $point, $maxDistance)
    {
        $this->near($key, $point);
        $this->addCondition($key, '$maxDistance', $maxDistance / 3958.8);

        return $this;
    }
public function withinMiles ( $ key , $ point , $ maxDistance ) { $ this -> near ( $ key , $ point ) ; $ this -> addCondition ( $ key , '$maxDistance' , $ maxDistance / 3958.8 ) ; return $ this ; }
Add a proximity based constraint for finding objects with key point
values near the point given and within the maximum distance given.
Radius of earth used is 3958.5 miles.

@param string $key The key of the AVGeoPoint
@param AVGeoPoint $point The AVGeoPoint that is used.
@param int $maxDistance Maximum distance (in miles)

@return AVQuery Returns this query, so you can chain this call.
Add a proximity based constraint for finding objects with key point values near the point given and within the maximum distance given . Radius of earth used is 3958 . 5 miles .