In a previous version 4.7 (?) it was possible to print Google-maps. It is no longer possible. The reason, at least, is that Javascript is not included in the headers of the print page. (The $scripts variable is not expanded in the page template.)

If interest exist, I can try to provide a patch.

Comments

jcnventura’s picture

Status: Active » Fixed

Hi,

Can you try the latest dev version? It will have today's date, so you'll have to until it is created (it can take up to 12 hours).

Thanks,

João

sl27257’s picture

Title: Include Java-script in the header so that e.g. Google-maps, can printed » Include Java-script in the header so that e.g. Google-maps, can be printed

Thanks a lot!!! Works for me!

/Thomas

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

JaredAM’s picture

Version: 5.x-3.2 » 5.x-3.7
Status: Closed (fixed) » Active

I just downloaded 3.7 and I'm having the same problem with the gmap js not being loaded. I generate the map based on location information. Should I simply use drupal_add_js to manually load these scripts or am I doing something wrong?

Thanks!

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,

The javascript files should be added already (view the page source to make sure of that).. Since the page gets regenerated, are you sure that the fact that the path is now starting with 'print' is not interfering in your code?

João

JaredAM’s picture

The source shows that none of the gmap js's are being loaded. I don't think the path matters since I'm using a template file (print.node-name.tpl.php).

jcnventura’s picture

Are you using the gmap module? If so, I find it really weird that the Javascript is not in the source.

JaredAM’s picture

Yup, I'm using gmap, then feeding it the lat/lon from the location module. I also find it really weird! That's why I thought I'd ask. It's probably a short circuit between the keyboard and ground, but I was hoping someone might have another idea or had run into this. If I figure it out, I'll post in case anyone else has this problem.

JaredAM’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I'm really not sure what's going on. I've gotten around the problem by creating a page, loading a node, formatting my content, and then using a template to make it printer friendly. That seems to work. I get the gmap and everything seems to work fine. I think it's an issue between loading the bare data (regular printer friendly) and loading a node minus all the extras.