I can definitely imagine using ordered map and the click coordinates (if I get those from the clicks) but I'm not sure I understand what view.delegate does...