split out showMap() from render code