Correct code of map_viewer.