<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Luís,<br>
<br>
What does your json config look like ?<br>
<br>
Alexandre<br>
<br>
<br>
On 13-07-03 11:15 AM, Luís de Sousa wrote:<br>
</div>
<blockquote
cite="mid:CAEtdG7tJ+PvnLDh_5sEgpKmSMFqz=9WbkpNp4hrwaO5CHfieKw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div style="">Hi Alexandre, thank you for replying.</div>
<div><br>
</div>
Basically the <span class="">calculatePageBounds</span> function
is being invoked with the arguments [undefined, "m"] (line 148
in PrintPage.js). This function is not checking if the scale
argument is valid, immediately applying the get method on it,
thus producing an exception.
<div>
<br>
</div>
<div style="">There might be a reason for the scale argument to
be undefined, but with this exception it is not clear what it
may be.</div>
<div style=""><br>
</div>
<div style="">Thank you,</div>
<div style=""><br>
</div>
<div style="">
Luís</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On 2 July 2013 14:19, Alexandre Dubé <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:adube@mapgears.com" target="_blank">adube@mapgears.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi,<br>
<br>
Try putting a break point in Firebug on that line and
look at what is going on. Look at where this scale
variable is supposed to be instantiated. It should
normally come from the json print param returned by your
print service.<br>
<br>
HTH,<br>
<br>
Alexandre
<div>
<div class="h5"><br>
<br>
<br>
On 13-07-01 05:39 AM, Luís de Sousa wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<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> Any insights are welcome. Thank you,</div>
<div><br>
</div>
<div>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
moz-do-not-send="true"
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><span></span><div><table cellpadding="0" cellspacing="0"><tbody><tr>
<td>
</td><td><a moz-do-not-send="true"><pre title="var s = scale.get("value");">var s = scale.get("value");</pre></a><a moz-do-not-send="true"><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 moz-do-not-send="true"
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>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a>
<a moz-do-not-send="true" href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre>
<span class="HOEnZb"><font color="#888888"> </font></span></blockquote>
<span class="HOEnZb"><font color="#888888"> <br>
<br>
<pre cols="72">--
Alexandre Dubé
Mapgears
<a moz-do-not-send="true" href="http://www.mapgears.com" target="_blank">www.mapgears.com</a>
</pre>
</font></span></div>
<br>
_______________________________________________<br>
Users mailing list<br>
<a moz-do-not-send="true" href="mailto:Users@geoext.org">Users@geoext.org</a><br>
<a moz-do-not-send="true"
href="http://www.geoext.org/cgi-bin/mailman/listinfo/users"
target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Alexandre Dubé
Mapgears
<a class="moz-txt-link-abbreviated" href="http://www.mapgears.com">www.mapgears.com</a>
</pre>
</body>
</html>