7

What is the best solution so far for printing Google Maps as a base layer of Vector layers in Geoserver/OpenLayers application ?

I used to print WMS layers using GeoExt print page example, but when I tried it with Google Maps, I got a blank file !

4 Answers 4

7

According to this thread at the GeoExt mailing list:

Re: [Users] Printing google maps using geoext and geoserver Andreas Hocevar Mon, 23 Jan 2012 04:37:31 -0800

Hi,

the GMaps API Terms of Use don't allow you to print. If you only want to print the map background, click on the Google logo in your map to view the same extent in Google Maps, where you can print it.

1
  • 2
    Confirmed, in all apps where we need a print solution we add multiple background maps for the user to choose, and allow print only on top of the free ones (e.g., OpenStreetMap) to avoid legal issues with Google. Commented Sep 26, 2012 at 17:20
4

You can request static images to print from Google Maps API (Static API v2)

If using the free version (scale=2) can get 1280x1280

Free    640x640     640x640 (returns 1280x1280 pixels)  Not available.
Google Maps API for Business    2048x2048   1024x1024 (returns 2048x2048 pixels)    512x512 (returns 2048x2048 pixels)

source: https://developers.google.com/maps/documentation/staticmaps/

You can use Openlayers to generate these images see the example:

http://openlayers.org/dev/examples/google-static.html

1

For professional output (cartographic products!) you can try PDF generation, see wkhtmltopdf or PrinceXML.

Any thing that you see at the browser can be printed, and you can control paper size (A2,A3,A4,Letter), page breaks, etc. with CSS2 paged media.

1

FOR FIREFOX

download and install the addon SCREENGRAB

@ Googlemaps select area of interest and 'Print Send Link'

 click on “Customize and preview embedded map” 
  1. Customize 'click' custom 'customize Width/Height
  2. Copy and paste this HTML to embed in your website select all - copy open NOTEPAD and paste - save as txt right click and open with FIREFOX click SCREENGRAB Save and “Complete Page/Frame …”

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.