<div dir="ltr">Hello again, another developer told me that the PrintProvider project has issues with the GET method. I changed it to POST but I'm still the error at the same place in PrintPage.js.<div><br></div><div style>
Any insights are welcome. Thank you,</div><div style><br></div><div style>Luís</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 25 June 2013 11:23, Luís de Sousa <span dir="ltr"><<a href="mailto:luis.a.de.sousa@gmail.com" target="_blank">luis.a.de.sousa@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello everyone,</div><div><br></div><div>I'm trying to create some basic print functionality with the code below. Whenever the printView is called the fit function is returning back the error in the subject. This is what I get with Firebug:</div>
<div><br></div><pre><div><span>TypeError: scale is undefined</span></div><div></div><span></span><div><table cellpadding="0" cellspacing="0"><tbody><tr>
<td><br></td><td><a><pre title="var s = scale.get("value");">var s = scale.get("value");</pre></a><a><div>PrintPage.js (line 298)</div></a></td>
</tr></tbody></table></div></pre><div> </div><div>Is this a bug or a misconfiguration of some sorts? Thank you,</div><div><br></div><div>Luís</div><div><br></div><div>////////////////////////////////////////////////////////////////////////////////////////////////////////</div>
<div><br></div><div>printProvider = new GeoExt.data.PrintProvider({</div><div><span style="white-space:pre-wrap">        </span>url: "<a href="http://localhost:8080/print2.0" target="_blank">http://localhost:8080/print2.0</a>",</div>
<div> method: "GET",</div><div> customParams: {</div><div> mapTitle: "Printing Demo",</div><div> comment: "This is a simple map printed from GeoExt."</div><div> }</div>
<div>});</div><div><br></div><div>printPage = new GeoExt.data.PrintPage({</div><div> printProvider: printProvider</div><div>});</div><div><br></div><div>printView = function() {</div><div><span style="white-space:pre-wrap">        </span>printPage.fit(mapPanel, true);</div>
<div><span style="white-space:pre-wrap">        </span>printProvider.print(mapPanel, printPage, mainView.items[2]);</div><div>};</div></div>
</blockquote></div><br></div>