title: Mongodb $near ignoring $maxDistance
body: <p>I have two documents in a collection, like so:</p>
  
  <pre><code>{
    "_id": ObjectId("5760fe623f6d3ad25e387ffc"),
    "type": 5,
    "product": {
      "location": {
        "geometry": [153.39999999999998, -28.016667],
        "name": "Gold Coast QLD, Australia",
        "id": "ChIJt2BdK0cakWsRcK_e81qjAgM"
      },
    }
  }, {
    "_id": ObjectId("5761e1f5bc9e30306130ea5d"),
    "type": 5,
    "product": {
      "location": {
        "geometry": [153.60197700000003, -28.6473671],
        "name": "Byron Bay NSW 2481, Australia",
        "id": "ChIJK3Y-LYVikGsR0PJDkLQJBgQ"
      },
    }
  }
  </code></pre>
  
  <p>When I run the following query, both documents are returned:</p>
  
  <pre><code>{ 
    'type': '5',
    'product.location.geometry': { 
       '$near': [ 153.39999999999998, -28.016667 ],
       '$maxDistance': 10000 
    } 
  }
  </code></pre>
  
  <p>As you can see, I am querying the same long/lat as the first document in the collection. My <code>$maxDistance</code> is set to 10000m (10kms), yet it seems to be ignoring this. I jumped onto a long/lat calculator, and it seems as if those two locations are more than 72kms from eachother:</p>
  
  <p><a href="https://i.stack.imgur.com/pwFsM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pwFsM.png" alt="enter image description here"></a></p>
  
  <hr>
  
  <p>Why is my query ignoring my <code>$maxDistance</code> when the <a href="https://docs.mongodb.com/manual/reference/operator/query/near/" rel="nofollow noreferrer">docs clearly state</a> that <code>$maxDistance</code> must be in meters?</p>