Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iframe Google maps won't print in chrome

Since the latest Google maps update, I'm unable to print the map via my chrome browser. If I try to print it with firefox, and have a look at the preview, the map shows up.

My code:

<iframe width="600" height="300" marginheight="0" 
    src="http://maps.google.com/maps?ie=UTF8&amp;q=loc:{address} {number}@{latitude},{longitude}&amp;z=14&amp;output=embed&amp;iwloc=near" 
    frameborder="0" marginwidth="0" scrolling="no">
</iframe>

It displays the following (in chrome): map preview

And if I try to print it, I get: enter image description here

While in Firefox and Safari, it shows up perfect. I assume that this is a chrome issue? (I've tested it on different chrome browsers, on different computers, both MAC and PC) Or is there something I'm missing, or that I should add with the new maps.

Small detail, if I Go to the developer site of google maps (https://developers.google.com/maps/documentation/embed/guide) and I try to print it from there, it won't print either. Which I think is strange, since both maps and chrome are build by Google.

Does anybody else have this issue, or is it just me? And if it is just me, what am I doing wrong? (My chrome version: 33.0.1750.152, working on OSX 10.9.2)

like image 772
JasperV Avatar asked Dec 04 '25 01:12

JasperV


1 Answers

I have read and studied too much about this, and unfortunatelly there is no solution to this, to print the iframe insertion using Chrome. I also don´t know the reasons, so I decided to change, to improve! :)

I easyly changed my html codes to use the Google API, then it becomes to print the map again.

In my searches around the web, I found and started to use a very simple to implement jQuery plugin for Google Maps, called $goMAP(); Cons: you need to have a little bit of jQuery and JSON knowledge.

In the Example Page you can find a lot of implementations, I know one of it will fits to you.

And If you need more technical information, you can find whatelse you need in the Google Maps API.

These are some complementary URLs I´ve read before to adopt the solution: https://code.google.com/p/chromium/issues/detail?id=353937 http://themeforest.net/forums/thread/google-maps-iframe-issue-in-chrome/110324

I hope not have disapointed you, but helped instead :)

Daniel

like image 74
Massa Avatar answered Dec 05 '25 14:12

Massa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!