Restrict to map border ensures that when you click points outside the map border, they attach to the nearest border edge or corner.