handle moving to the map's far edges