corrected all compilation errors in map. Everything works except for find neares point.