geoNear() 공개 메소드

A GeoJSON point may be provided as the first and only argument for 2dsphere queries. This single parameter may be a GeoJSON point object or an array corresponding to the point's JSON representation. If GeoJSON is used, the "spherical" option will default to true. You can only use this as the first stage of a pipeline.
또한 보기: http://docs.mongodb.org/manual/reference/operator/aggregation/geoNear/
public geoNear ( float | array | GeoJson\Geometry\Point $x, float $y = null ) : Doctrine\MongoDB\Aggregation\Stage\GeoNear
$x float | array | GeoJson\Geometry\Point
$y float
리턴 Doctrine\MongoDB\Aggregation\Stage\GeoNear
예제 #1
0
파일: Stage.php 프로젝트: alcaeus/mongodb
 /**
  * Outputs documents in order of nearest to farthest from a specified point.
  * You can only use this as the first stage of a pipeline.
  *
  * @see http://docs.mongodb.org/manual/reference/operator/aggregation/geoNear/
  *
  * @param float|array|Point $x
  * @param float $y
  * @return Stage\GeoNear
  */
 public function geoNear($x, $y = null)
 {
     return $this->builder->geoNear($x, $y);
 }