I've got google map on my webapp - working with the JavaScript API V3. I give my users the ability to manage some routes, using the google map directions. Now, my problem is that I want to give them the ability to print it (just the map, not the entire website).
I've tried the following:
var OpenWindow = window.open("_blank", "", '');
var contents = document.getElementById("mapMainCanvas");
OpenWindow.document.write(contents.innerHTML);
This indeed open a new tab with the map, but without the directions. Also, I couldn't find any "print" option in the API. Does anybody solved this problem?
Thanks.