Here is my situation. I have a map created using google maps API, with styling and a FusionTable overlay. The user can zoom into any location, and when he/she clicks on any polygon, an infoWindow pops-up with contact information. The user then would press on a 'Print' button that should open the map on a new window and initiate the print dialog box. Now, here is my two part question.
- How can I duplicate the google maps instance (zoomed-in with polygons and infowindow) to a new window.
- How can I trigger a print command after the map is rendered.
Now, here is a background of what I tried so far and the results.
- Copied map to new window, but print command acts funny, as it goes beyond the 'div' parameters and breaks the map.
- Tried the html2canvas method, but it only works as it should when you SHIFT+click the print button.
For bonus marks: When printing I would like to resize the map proportionally to fit the page size (it is currently cropping part of the map).