<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;">Hi,</span></p>





<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">I use jBox to calcolate distance measure.<br>In jBox documentation I found this function:</span></p>



<pre><span style="" lang="EN-GB">function measure_handler(name, s, t, n, a) {<span style=""><br></span>// c = 1 / 72dpi / 12inches_per_foot * 1.0003state_plane_scale_factor<span style=""><br></span>var c = 0.0011577546296296
;<span style="">&nbsp;&nbsp;&nbsp; </span>// constant<span style=""><br></span>var f = [scale] * c;<span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>// scale factor<span style=""><br></span>if ((s&gt;0) || (t&gt;0)) {<span style=""><br></span>defaultStatus = &quot;This segment = &quot; + s*f + &quot;, Total = &quot; + t*f + &quot;, Number of vertices = &quot; + n ;
<span style=""><br></span></span>}</pre><p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Since I'm not able to have user dpi (and 72 is a mean
value, I suppose), isn't more correct (and simpler) to use this way: ?</span></p>



<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Distance = (x2 – x1)/ mapWidh * t</span></p>



<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;Where x2 and x1 are mapextents in real world
coordinates, as returned in imgext, mapWidth is the width in pixel, as
specified in .map file (and returned in template file), and t is the jBox
meaure, in pixel.</span></p>



<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Thanks</span></p>

<p class="MsoNormal"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB"><span style="">&nbsp;</span>Piero</span></p>