Display a post map on a blank/new page

After some more Googling…

New single.php looks like this:

<?php 
get_header();
global $wp_query;
if ( ! isset( $wp_query->query_vars['map'] ) )
{
    if (have_posts()) : 
        while (have_posts()) : 
             the_post();
             the_title();
             the_content();
         endwhile;
    endif; 
    ?>
    <p><a href="https://wordpress.stackexchange.com/questions/31442/<?php echo get_permalink(); ?>?map=yes">Map</a></p>
    <?php
}
else { 
    ?>
    <div id="map-canvas"></div>
    <?php 
}

get_footer();

And functions.php like this:

add_filter('query_vars', 'parameter_queryvars' );
function parameter_queryvars( $qvars )
{
    $qvars[] = 'map';
    return $qvars;
}

The function tells WordPress to expect a variable ‘map’ in the query string and single.php checks if a map variable has been set/passed via the referring page.

Hope this helps someone.