Implemented better handling of drawMap