function near(field, geoPoint, maxDistance) {
    return this._addFilter(field, "$nearSphere", {
      $geometry: {
        type: "Point",
        coordinates: [geoPoint.longitude, geoPoint.latitude]
      },
      $maxDistance: maxDistance
    });
  }
/**
   * Adds a geopoint based near filter to the GeoPoint field. The GeoPoint must be within the maximum distance
   * to the given GeoPoint. Returns from nearest to farthest.
   * @param {string} field The field to filter
   * @param {GeoPoint} geoPoint The GeoPoint to filter
   * @param {number} maxDistance Tha maximum distance to filter in meters
   * @return {query.Filter<T>} The resulting Query
   * @instance
   *
   * @see http://docs.mongodb.org/manual/reference/operator/query/nearSphere/
   */
Adds a geopoint based near filter to the GeoPoint field. The GeoPoint must be within the maximum distance
to the given GeoPoint. Returns from nearest to farthest.


Adds a geopoint based near filter to the GeoPoint field . The GeoPoint must be within the maximum distance to the given GeoPoint . Returns from nearest to farthest .
function near(field, geoPoint, maxDistance) {
    return this._addFilter(field, "$nearSphere", {
      $geometry: {
        type: "Point",
        coordinates: [geoPoint.longitude, geoPoint.latitude]
      },
      $maxDistance: maxDistance
    });
  }
function near ( field , geoPoint , maxDistance ) { return this . _addFilter ( field , "$nearSphere" , { $geometry : { type : "Point" , coordinates : [ geoPoint . longitude , geoPoint . latitude ] } , $maxDistance : maxDistance } ) ; }
Adds a geopoint based near filter to the GeoPoint field.
Adds a geopoint based near filter to the GeoPoint field .