Sokil\Mongo\Expression::withinBox PHP Method

withinBox() public method

Based on grid coordinates and does not query for GeoJSON shapes. Use planar geometry, so 2d index may be used but not required
public withinBox ( string $field, array $bottomLeftCoordinate, array $upperRightCoordinate ) : Expression
$field string
$bottomLeftCoordinate array Bottom left coordinate of box
$upperRightCoordinate array Upper right coordinate of box
return Expression
    public function withinBox($field, array $bottomLeftCoordinate, array $upperRightCoordinate)
    {
        $this->where($field, array('$geoWithin' => array('$box' => array($bottomLeftCoordinate, $upperRightCoordinate))));
        return $this;
    }