[Google Maps API v3] printing a map

6,793 views
Skip to first unread message

Jason

unread,
May 11, 2010, 9:37:08 AM5/11/10
to Google Maps JavaScript API v3
I am trying to print a map created with Google Map API vs3. I am using
the javascript window.print function but the map always prints blank.
Any suggestions?

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Jeff Davies

unread,
May 11, 2010, 8:39:14 PM5/11/10
to Google Maps JavaScript API v3
I have a similar issue. However, my map is not completely blank. It
does print the pan buttons and the Map/Satellite/Hybrid/Terrain
buttons ok, but nothing else from the map shows up.

Sean

unread,
May 25, 2010, 5:22:09 AM5/25/10
to Google Maps JavaScript API v3
I have the same problem, the map controls are printing including the
line showing the directions I have specified but the map itself is
gray.

On May 12, 1:39 am, Jeff Davies <jeff.dav...@yahoo.com> wrote:
> I have a similar issue. However, my map is not completely blank. It
> doesprintthe pan buttons and the Map/Satellite/Hybrid/Terrain
> buttons ok, but nothing else from the map shows up.
>
> On May 11, 6:37 am, Jason <jason_michael_but...@yahoo.com> wrote:
>
> > I am trying toprinta map created with Google Map API vs3. I am using
> > the javascript window.printfunction but the map always prints blank.
Message has been deleted

Sean

unread,
Jun 1, 2010, 5:33:55 AM6/1/10
to Google Maps JavaScript API v3

Bruno

unread,
Jun 8, 2010, 5:24:24 AM6/8/10
to Google Maps JavaScript API v3
Hi,

I have the same problem.

I tried this script. On my page with the map :
<a href="#" onclick="window.open ('print.html')">print</a>

and in the print.html page :

<script language="javascript">
var map = window.opener.document.getElementById("map_canvas");
document.write(map.innerHTML);
window.print();
</script>

It works with IE8 and Opera. But with FF, it only prints the Scalebar,
the TypeControlbar and the NavigationControl Bar.

Do you have an idea ?

Best regards

pi5701

unread,
Jun 8, 2010, 5:40:41 AM6/8/10
to Google Maps JavaScript API v3

Doc Torbin

unread,
Jul 28, 2010, 3:01:58 PM7/28/10
to Google Maps JavaScript API v3
This is a known bug with Google Maps API v3. I suspect it is not
limited to Google (i.e. Firefox has some work on their part to do) but
that is unconfirmed. I created a Google Wave to help other maps api
developer collaborate on possible alternatives to bypass this issue:

https://wave.google.com/wave/waveref/googlewave.com/w+IRzfxGprA
Reply all
Reply to author
Forward
0 new messages