concept query in category angular
appears as: queries, query

This is an excerpt from Manning's book Getting MEAN with Mongo, Express, Angular, and Node.js 2ED.
The 2dsphere here is the critical part because it enables MongoDB to do the correct calculations when running queries and returning results. It allows MongoDB to calculate geometries based on a spherical object. You’ll work more with this feature in chapter 6 when you build your API and start to interact with the data.
This method won’t start the database query operation; it tells the model what the query will be. To start the database query, Mongoose models have an exec method.