Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use Geoserver, Openlayers, Extjs and GeoExt to build an app.

I am trying to get vector layer on Google map printed with pop up a Print dialog, I tried :

var targetElement = Ext.getCmp('mapPanel');
                    var myWindow ='', '', 'width=600,height=500');
                    myWindow.document.write('<title>' + 'Title' + '</title>');

it works fine except that Vector layer were not printed. I got Google map only. How I can do that ?

share|improve this question

Is your vector layer in the Google Mercator projection (900913)? I believe your vector layer has to be in the same coordinate system as the Google Map tiles.

share|improve this answer
Yes I use the new Google projection and transform vector layer using: .transform(new OpenLayers.Projection("EPSG:4326"),new OpenLayers.Projection("EPSG:3857")) ... it displayed on the map but when I print it on real paper I got Google layer only. – Shadin Sep 18 '12 at 8:56

Some browsers will require you enable the “Print background colors and images” in order to print properly.

Did you tried with different browsers?

share|improve this answer
Thanks! it works in Firefox but not in Chrome. How I could fix it ? – Shadin Sep 18 '12 at 10:49
Also, the popup of vector feature was not printed! though all features printed just fine. – Shadin Sep 18 '12 at 10:51
Maybe this can help:… and you can also try to play with Google Chrome hidden options - at the adress bar just type chrome://about/ and play with it (start with chrome://flags/) – jcoelho Sep 19 '12 at 14:50
And plus this one:… But may be not possible to do it on Google Chrome... – jcoelho Sep 19 '12 at 14:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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