css - How to view Google Maps in "print" mode? -
I am using Google Maps API v2 and I can print the map in the same way as Google on my map page Does.
You can click on the small printer icon and you can create the same pop-up window from the same map but all the spare stuff (like controls) is taken out. I know that when you navigate Press "print preview" or "print", they use @ media print
to achieve that effect, however, the popup window is not in print mode.
Is there a way to do magic tricks, such as setting the current media type to "print"? Or are they cheating and cheating custom css styling?
I have found a Silverlight plugin and a Google Map on the same page and I want to be able to create a popup window in which the map is ready for printing (like Google is working).
I know how to get HTML content, but I can only get all the controls on that material (which I do not want).
Any help would be appreciated.
Google Maps has added a class gmnoprint
on all the elements that they Do not want to print .. then set it in your print css file or popup window in display: none
.
.gmnoprint {display: none; }
Off-course hides anything that is not considered for printing to Google. If you want to select other items, then you have to parse your HTML code : (
Comments
Post a Comment