s2js
    Preparing search index...

    Class ClosestCellQuery

    S2ClosestCellQuery is a helper class for finding the closest cell(s) to a given point, edge, S2Cell, S2CellUnion, or geometry collection.

    Index

    Constructors

    Methods

    • Like isDistanceLessOrEqual(), except that "limit" is increased by the maximum error in the distance calculation. This ensures that this function returns true whenever the true, exact distance is less than or equal to "limit".

      Parameters

      Returns boolean

    • Returns true if the distance to "target" is less than "limit".

      This method is usually much faster than getDistance(), since it is much less work to determine whether the minimum distance is above or below a threshold than it is to calculate the actual minimum distance.

      Parameters

      Returns boolean