Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-76728

$box that spans the Antemeridian doesn't work as expected

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 6.0.5
    • Component/s: None
    • Server Triage
    • ALL

      I have a query that uses $box in a $geoWithin. 

      I use Google Maps in my app, and whenever a user views a part of the map that spans across the Antemeridian (where part of the viewport is on one side of it and part of it on the other), we get incorrect results. 
      I found this SO issue that basically describes the same problem, but with no relevant answers: https://stackoverflow.com/questions/71799194/bug-of-geowithin-box-mongodb

      P.S. - Switching to a Polygon solves this, but it really makes sense for my app to use 2d rather than 2dsphere, and switching would also mean handling projection issues, and I couldn't find a Mongo recommended way of doing this. 

            Assignee:
            yuan.fang@mongodb.com Yuan Fang
            Reporter:
            omer@gable.to Omer Mizrahi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: