Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-371

nearSphere method in QueryBuilder class

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 2.8.0
    • API
    • None

    Description

      Hello guys,
      .
      I was wondering if it is possible to add 2 nearSphere() methods in QueryBuilder?

      There are 2 near() methods there now:
      near( double x , double y )
      near( double x , double y , double maxDistance )

      It would be cool to have following 2 methods as well:

      public QueryBuilder nearSphere(double longitude, double latitude)
      {
      addOperand( "$nearSphere" , new Double[]

      { longitude , latitude }

      );
      return this;
      }

      public QueryBuilder nearSphere(double longitude, double latitude, double radius)
      {
      addOperand( "$nearSphere" , new Double[]

      { longitude , latitude, radius}

      );
      return this;
      }

      Thanks in advance,
      Damir

      Attachments

        Activity

          People

            bryan.reinero Bryan Reinero
            dpalinic Damir Palinic
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: