<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><div>Hi,</div><div><br></div><div>after reading your mail I tried out the printpreview code in a test app. This is something I have been meaning to do for a while now but havenīt had the time.</div><div><br></div><div>Anyway, I copied the code from the printpreview example (<a href="http://api.geoext.org/1.0/examples/print-preview.html">http://api.geoext.org/1.0/examples/print-preview.html</a>)</div><div><br></div><div>and set an osm baselayer to see whether my config.yaml file works with OpenStreetMap. The result is that with an osm baselayer the map in the preview window is reduced to the size of a single pixel, but when a comment out the osm layer the map is ok.</div><div><br></div><div>here is my demo</div><div><br></div><div><a
href="http://maps.zgb.de/print/printpanel.html">http://maps.zgb.de/print/printpanel.html</a></div><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><br></div><div style="font-family:arial, helvetica, sans-serif;font-size:12pt">can anyone explain to me why this is?</div><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><br></div><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><br></div><div style="font-family:arial, helvetica, sans-serif;font-size:12pt">cheers,</div><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><br></div><div style="font-family:arial, helvetica, sans-serif;font-size:12pt">Rob</div><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><br><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">Von:</span></b> gbrun <gbrun@myopera.com><br><b><span
style="font-weight: bold;">An:</span></b> users@geoext.org<br><b><span style="font-weight: bold;">Gesendet:</span></b> Dienstag, den 23. August 2011, 12:42:45 Uhr<br><b><span style="font-weight: bold;">Betreff:</span></b> Re: [Users] Prjection and print preview<br></font><br>Ok, so no need to use Proj4JS to solve this problem. I only set a new <br>center point for my printPage in the same projection as my map. Then, to <br>display this print page at the good scale, I choose the appropriate scale <br> from the print provider. And it works!<br><br>printPage = new GeoExt.data.PrintPage({<br> printProvider: printProvider<br>});<br><br>// A layer to display the print page extent<br>pageLayer = new OpenLayers.Layer.Vector('printLayer');<br>pageLayer.addFeatures(printPage.feature);<br>// New coordinates to center the printPage<br>var lonlat = new OpenLayers.LonLat(671000, 6276000);<br>printPage.setCenter(lonlat);<br>// Add
the printPage to the map and choose the appropriate scale<br>map.addLayer(pageLayer);<br>printPage.setScale(printProvider.scales.getAt(2));<br><br>I hope this will help someone.<br><br>Geoffrey<br><br><br>On Tue, 23 Aug 2011 08:34:59 +0200, gbrun <<a ymailto="mailto:gbrun@myopera.com" href="mailto:gbrun@myopera.com">gbrun@myopera.com</a>> wrote:<br><br>> Hi list!<br>><br>> I've got a question: in my GeoExt application, I would like to the print<br>> functions. For this, I've already installed the GeoServer plugin<br>> successfully. Then, I've written some code in my application, like in <br>> this<br>> example: <a href="http://api.geoext.org/1.0/examples/print-form.html" target="_blank">http://api.geoext.org/1.0/examples/print-form.html</a><br>><br>> According to firebug, there is apparently no bug. But I can't see the<br>> print preview. When I inspected Firebug, I saw that the features stored <br>>
in<br>> the pageLayer are defined in EPSG 4326 (I think), although my map is<br>> defined in a French projection. So, I think my problem comes from this<br>> pageLayer projection. Am I right? Should I use Proj4JS to re-project this<br>> preview layer? Or is there an other easier method?<br>><br>> Thanks for any reply!<br>><br>> Geoffrey<br>> _______________________________________________<br>> Users mailing list<br>> <a ymailto="mailto:Users@geoext.org" href="mailto:Users@geoext.org">Users@geoext.org</a><br>> <a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br><br><br>-- <br>Using Opera's revolutionary email client: <a href="http://www.opera.com/mail/" target="_blank">http://www.opera.com/mail/</a><br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@geoext.org"
href="mailto:Users@geoext.org">Users@geoext.org</a><br><a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br></div></div><div style="position:fixed"></div>
</div></body></html>