Just wondering how we get a nice print out of the directions results.

Comments

hutch’s picture

I don't know, have you tried the print module?

hutch’s picture

Status: Active » Closed (works as designed)
pmathur01’s picture

Status: Closed (works as designed) » Active

I tried to use print module to print the directions but it does not print the directions is there any other way to print out the directions?

hutch’s picture

Category: feature » support

Printing is a function of the browser and Getdirections has no control over which browser or which OS. I am told that Firefox prints it out but I do not have a printer so cannot test. The map and instructions are visible in print preview on my Ubuntu box.

pmathur01’s picture

thanks, I am able to view on my browser as well but wanted to have a link on the page for users to Print the page.

hutch’s picture

In that case copy function theme_getdirections_show to your theme's template.php, renaming it appropriatley and stick something like this in:

<SCRIPT LANGUAGE="JavaScript"> 
if (window.print) {
document.write('<form><input type=button name=print value="Print" onClick="window.print()"></form>');
}
</script>
spgd01’s picture

To print a block with print module yo need to add the following to the print.tpl.php template

print theme('blocks', 'content');

You also want to add "*/page_with_block" to the non-content list

So what would be the equivalent PHP for the get directions module?

The non-content list would be */getdirections

hutch’s picture

As far as I can see the Print module refetches the page so any driving instructions provided by Google are lost.

anybody’s picture

Printing the route would really be an interesting feature.
Is there no possibility to view the route on google maps for example to print it or any other printing functionality provided by google?

hutch’s picture

It's browsers that provide printing functionality, not websites.

anybody’s picture

@hutch: That's correct but the server (for example at google maps) may provide a printable Version!

hutch’s picture

Status: Active » Closed (works as designed)