map draw logic moved to map class