Constructs a new ClosestCellQuery for the given CellIndex. Options may be specified here or changed at any time using the options property.
Returns the closest cell to the target. If no cell satisfies the search criteria, then the Result object will have distance == Infinity and isEmpty() == true.
Find the closest cells to the target.
The target to find the closest cells to.
An array of ClosestCellQueryResult objects.
Returns the minimum distance to the target. If the index or target is empty, returns Infinity.
Use isDistanceLess() if you only want to compare the distance against a threshold value, since it is often much faster.
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".
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.
Like isDistanceLess(), but also returns true if the distance to "target" is exactly equal to "limit".
S2ClosestCellQuery is a helper class for finding the closest cell(s) to a given point, edge, S2Cell, S2CellUnion, or geometry collection.