<div dir="ltr"><div style>Hello everyone,</div><div style><br></div><div style>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 style><br></div><pre class=""><div class=""><span class="">TypeError: scale is undefined</span></div><div class=""></div><span class=" "></span><div class=""><table class=" " cellpadding="0" cellspacing="0"><tbody class=" "><tr class=" ">
<td class=" "><br></td><td class=" "><a class=""><pre title="var s = scale.get("value");" class="">var s = scale.get("value");</pre></a><a class=""><div class=" ">PrintPage.js (line 298)</div></a></td>
</tr></tbody></table></div></pre><div style> </div><div style>Is this a bug or a misconfiguration of some sorts? Thank you,</div><div style><br></div><div style>Luís</div><div style><br></div><div style>////////////////////////////////////////////////////////////////////////////////////////////////////////</div>
<div><br></div><div>printProvider = new GeoExt.data.PrintProvider({</div><div><span class="" style="white-space:pre">        </span>url: "<a href="http://localhost:8080/print2.0">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 class="" style="white-space:pre">        </span>printPage.fit(mapPanel, true);</div>
<div><span class="" style="white-space:pre">        </span>printProvider.print(mapPanel, printPage, mainView.items[2]);</div><div>};</div></div>