* their associated nodes to point p.
*/
private Map<Double, List<Node>> getNearestNodesImpl(Point p,
Predicate<OsmPrimitive> predicate) {
TreeMap<Double, List<Node>> nearestMap = new TreeMap<>();
DataSet ds = getCurrentDataSet();
if (ds != null) {
double dist, snapDistanceSq = PROP_SNAP_DISTANCE.get();
snapDistanceSq *= snapDistanceSq;
for (Node n : ds.searchNodes(getBBox(p, PROP_SNAP_DISTANCE.get()))) {
if (predicate.evaluate(n)
&& (dist = getPoint2D(n).distanceSq(p)) < snapDistanceSq)
{
List<Node> nlist;
if (nearestMap.containsKey(dist)) {