Moved 2D rendering code to MapViewer