Query.prototype.intersects()

Parameters
  • [arg] «Object»
Returns:
  • «Query» this

Declares an intersects query for geometry().

Example

  1. query.where('path').intersects().geometry({
  2. type: 'LineString'
  3. , coordinates: [[180.0, 11.0], [180, 9.0]]
  4. })
  5. query.where('path').intersects({
  6. type: 'LineString'
  7. , coordinates: [[180.0, 11.0], [180, 9.0]]
  8. })

NOTE:

MUST be used after where().

NOTE:

In Mongoose 3.7, intersects changed from a getter to a function. If you need the old syntax, use this.