Fix find next point bug

Fix find next point bug by changing the compare point from base
coordinators to the coordinators of last point of map.