<br><font size=2 face="sans-serif">Dirk,</font>
<br><font size=2 face="sans-serif">Works great now - thanks.</font>
<br>
<br><font size=2 face="sans-serif">Kevin<br>
</font>
<p><font size=5 color=blue face="Times New Roman">______________________________</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;Dirk-Jan Huisman&quot;
&lt;d.huisman@ingbcc.nl&gt;</b> </font>
<p><font size=1 face="sans-serif">05/12/2005 01:35 AM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">&quot;Kevin Grootendorst&quot; &lt;kgrootendorst@BAIRD.COM&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">RE: [UMN_MAPSERVER-USERS] FW: [UMN_MAPSERVER-USERS]
Distance tool in ROSA (missed some info from first post)</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>Hi,<br>
<br>
I use this code outside the case &quot;DIST&quot;. Every time the map is
drawed I<br>
calculate the cellsize. And it works fine.<br>
<br>
// set the cellsize of the map<br>
$minimumX = $oMap-&gt;extent-&gt;minx;<br>
$maximumX = $oMap-&gt;extent-&gt;maxx;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
$realcoordinates = $maximumX - $minimumX ;<br>
<br>
$pixelsize = $realcoordinates / MAP_WIDTH ;<br>
$pixelsize = $pixelsize / 1000 ;<br>
<br>
Regards, Dirk<br>
<br>
<br>
<br>
-----Oorspronkelijk bericht-----<br>
Van: Kevin Grootendorst [mailto:kgrootendorst@BAIRD.COM]<br>
Verzonden: woensdag 11 mei 2005 17:43<br>
Aan: MAPSERVER-USERS@LISTS.UMN.EDU<br>
Onderwerp: Re: [UMN_MAPSERVER-USERS] FW: [UMN_MAPSERVER-USERS] Distance<br>
tool in ROSA (missed some info from first post)<br>
<br>
<br>
Steve,<br>
Did you come across a solution to your problem?<br>
I'm having a similar situation, where the distances being measured are<br>
way<br>
off (eg. a 3km feature is measured as being 1.7km)<br>
<br>
Kevin<br>
<br>
On Thu, 5 May 2005 15:47:45 +1000, Stephen Baxter<br>
&lt;steve@STAFF.PIPENETWORKS.COM&gt; wrote:<br>
<br>
&gt;<br>
&gt;<br>
&gt;Hello,<br>
&gt;<br>
&gt;I hacked up the output from Gmap Factory to include the Distance Tool.<br>
&gt;Specificially I changed the following:<br>
&gt;<br>
&gt;gmf_apps\project\project.php to include :<br>
&gt;-----------------------------------------<br>
&gt;<br>
&gt;case &quot;DIST&quot;:<br>
&gt;$cellsize = $oMap-&gt;cellsize ;<br>
&gt;$cellsize2 = $cellsize / 1000 ;<br>
&gt;echo &quot;&lt;param name=\&quot;TB_BUT_dist_IMG\&quot; &quot;.<br>
&gt;&quot;value=\&quot;./images/icon_dist1.gif\&quot;&gt;\n&quot;;<br>
&gt;echo &quot;&lt;param name=\&quot;TB_BUT_dist_IMG_PR\&quot; &quot;.<br>
&gt;&quot;value=\&quot;./images/icon_dist2.gif\&quot;&gt;\n&quot;;<br>
&gt;echo &quot;&lt;param name=\&quot;TB_BUT_dist_HINT\&quot; &quot;.<br>
&gt;&quot;value=\&quot;Measure Distance\&quot;&gt;\n&quot;;<br>
&gt;echo &quot;&lt;param name=\&quot;TB_BUT_dist_INPUT\&quot; &quot;.<br>
&gt;&quot;value=\&quot;dist\&quot;&gt;\n&quot;;<br>
&gt;echo &quot;&lt;param name=\&quot;TB_BUT_dist_NAME\&quot; &quot;.<br>
&gt;&quot;value=\&quot;ROSA_CMD\&quot;&gt;\n&quot;;<br>
&gt;ECHO &quot;&lt;PARAM NAME=\&quot;PIXEL_SIZE\&quot; VALUE=\&quot;&quot;.$cellsize2.&quot;\&quot;&gt;&quot;;<br>
&gt;echo &quot;&lt;PARAM NAME=\&quot;TB_BUT_dist_CURSOR_TYPE\&quot; VALUE=\&quot;CROSSHAIR\&quot;&gt;&quot;;<br>
&gt;echo &quot;&lt;param name=\&quot;TB_BUT_dist_VALUE\&quot; &quot;.<br>
&gt;&quot;value=\&quot;ruler\&quot;&gt;\n&quot;;<br>
&gt;echo &quot;&lt;PARAM NAME=\&quot;DIST_MSG\&quot; &quot;.<br>
&gt;&quot;value=\&quot;Approximative distance: %s Kms\&quot;&gt;n&quot;;<br>
&gt;<br>
&gt;break;<br>
&gt;<br>
&gt;AND<br>
&gt;<br>
&gt;case &quot;DIST&quot;:<br>
&gt;return &quot;DIST&quot;;<br>
&gt;break;<br>
&gt;<br>
&gt;As per<br>
&gt;http://lists.maptools.org/pipermail/maplab-users/2004-May/001197.html<br>
&gt;<br>
&gt;<br>
&gt;gmf_apps\project\project_contents.php to include :<br>
&gt;--------------------------------------------------<br>
&gt;<br>
&gt;array_push( $aszROSATools, &quot;DIST&quot; );<br>
&gt;<br>
&gt;<br>
&gt;But my issue is that when I zoom in on an area of the map it seems<br>
&gt;to not reset the cellsize to the new value for the new zoom level.<br>
&gt;I am fairly sure that this is not caused by browser caching issues<br>
&gt;as I have tried on Exploder and Firefox and they both have the same<br>
&gt;issues.<br>
&gt;<br>
&gt;I even put :<br>
&gt;<br>
&gt;$cellsize = $oMap-&gt;cellsize ;<br>
&gt;$cellsize2 = $cellsize / 1000 ;<br>
&gt;<br>
&gt;In the 'case &quot;ZOOM_IN&quot;:' &nbsp;area in order to get it to
recalculate the<br>
&gt;cellsize but to no avail.<br>
&gt;<br>
&gt;If I press the redraw button at the new zoom level it seems to reset
it<br>
&gt;and all goes well, the correct distance is represented by the tool,
not<br>
&gt;the distance at the old resolution. I have also tried forcing a browser<br>
&gt;reload and that does not seem to fix it.<br>
&gt;<br>
&gt;I am not sure if it is related but the 'Zoom to fullest extents' seems<br>
&gt;to need to be pressed twice as well before it works, in that once you<br>
&gt;press it the map redraws but to the zoom in area - not to fullest<br>
&gt;extent.<br>
&gt;<br>
&gt;The re-centre tool does seem to fix it though, as does activating the<br>
&gt;'i' tool.<br>
&gt;<br>
&gt;I am thinking that the web server or similar may be keeping some pesky<br>
&gt;state somewhere that needs to be dealt with - maybe !<br>
&gt;<br>
&gt;Any help appreciated.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;--<br>
&gt;Stephen Baxter<br>
&gt;Technical Director - PIPE Networks<br>
&gt;<br>
&gt;Winner Australian Telecommunications Users Group 2005 award for<br>
&gt;'Best Communication Solution for Large Business'<br>
&gt;<br>
&gt;Peering,IX points and dark fiber in Australia.<br>
&gt;Largest peering network downunder.<br>
&gt;<br>
&gt;phone : 07 3233 9800/ 0417 818 695<br>
&gt;fax &nbsp; : 07 3220 1800<br>
&gt;web &nbsp; : www.pipenetworks.com<br>
&gt;<br>
&gt;<br>
------------------------------------------------------------------------------<br>
Prins Mauritsstraat 17, Postbus 75, 4140 AB Leerdam<br>
Telefoon (0345) 63 96 96, Fax (0345) 63 96 66,<br>
E-mail post@ingbcc.nl<br>
Internet www.ingbcc.nl<br>
------------------------------------------------------------------------------<br>
Deze e-mail en de eventuele bestanden die meegezonden zijn, zijn vertrouwelijk
en alleen bedoeld voor het gebruik door de individu of instelling aan wie
deze e-mail geadresseerd is. Als u deze e-mail onterecht ontvangen heeft
wilt u het ons dan laten weten.<br>
------------------------------------------------------------------------------<br>
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this e-mail in error please notify the system manager.<br>
------------------------------------------------------------------------------<br>
</tt></font>
<br>