function withinPolygon(field, geoPoints) {
    geoPoints = varargs(1, arguments);
    return this._addFilter(field, "$geoWithin", {
      $geometry: {
        type: "Polygon",
        coordinates: [geoPoints.map(function (geoPoint) {
          return [geoPoint.longitude, geoPoint.latitude];
        })]
      }
    });
  }
/**
   * Adds a GeoPoint based polygon filter to the GeoPoint field. The GeoPoint must be contained within the polygon.
   * @param {string} field The field to filter
   * @param {...(GeoPoint|Array<GeoPoint>)} geoPoints The geoPoints that describes the polygon of the filter
   * @return {query.Filter<T>} The resulting Query
   * @instance
   *
   * @see http://docs.mongodb.org/manual/reference/operator/query/geoWithin/
   */
Adds a GeoPoint based polygon filter to the GeoPoint field. The GeoPoint must be contained within the polygon.
@param {string} field The field to filter
@param {...(GeoPoint|Array)} geoPoints The geoPoints that describes the polygon of the filter
@return {query.Filter} The resulting Query
@instance


Adds a GeoPoint based polygon filter to the GeoPoint field . The GeoPoint must be contained within the polygon . @param { string } field The field to filter @param { ... ( GeoPoint|Array ) } geoPoints The geoPoints that describes the polygon of the filter @return { query . Filter } The resulting Query @instance
function withinPolygon(field, geoPoints) {
    geoPoints = varargs(1, arguments);
    return this._addFilter(field, "$geoWithin", {
      $geometry: {
        type: "Polygon",
        coordinates: [geoPoints.map(function (geoPoint) {
          return [geoPoint.longitude, geoPoint.latitude];
        })]
      }
    });
  }
function withinPolygon ( field , geoPoints ) { geoPoints = varargs ( 1 , arguments ) ; return this . _addFilter ( field , "$geoWithin" , { $geometry : { type : "Polygon" , coordinates : [ geoPoints . map ( function ( geoPoint ) { return [ geoPoint . longitude , geoPoint . latitude ] ; } ) ] } } ) ; }
Adds a GeoPoint based polygon filter to the GeoPoint field.
Adds a GeoPoint based polygon filter to the GeoPoint field .