<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>"Dirk-Jan Huisman"
<d.huisman@ingbcc.nl></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">"Kevin Grootendorst" <kgrootendorst@BAIRD.COM></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 "DIST". 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->extent->minx;<br>
$maximumX = $oMap->extent->maxx;<br>
<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>
<steve@STAFF.PIPENETWORKS.COM> wrote:<br>
<br>
><br>
><br>
>Hello,<br>
><br>
>I hacked up the output from Gmap Factory to include the Distance Tool.<br>
>Specificially I changed the following:<br>
><br>
>gmf_apps\project\project.php to include :<br>
>-----------------------------------------<br>
><br>
>case "DIST":<br>
>$cellsize = $oMap->cellsize ;<br>
>$cellsize2 = $cellsize / 1000 ;<br>
>echo "<param name=\"TB_BUT_dist_IMG\" ".<br>
>"value=\"./images/icon_dist1.gif\">\n";<br>
>echo "<param name=\"TB_BUT_dist_IMG_PR\" ".<br>
>"value=\"./images/icon_dist2.gif\">\n";<br>
>echo "<param name=\"TB_BUT_dist_HINT\" ".<br>
>"value=\"Measure Distance\">\n";<br>
>echo "<param name=\"TB_BUT_dist_INPUT\" ".<br>
>"value=\"dist\">\n";<br>
>echo "<param name=\"TB_BUT_dist_NAME\" ".<br>
>"value=\"ROSA_CMD\">\n";<br>
>ECHO "<PARAM NAME=\"PIXEL_SIZE\" VALUE=\"".$cellsize2."\">";<br>
>echo "<PARAM NAME=\"TB_BUT_dist_CURSOR_TYPE\" VALUE=\"CROSSHAIR\">";<br>
>echo "<param name=\"TB_BUT_dist_VALUE\" ".<br>
>"value=\"ruler\">\n";<br>
>echo "<PARAM NAME=\"DIST_MSG\" ".<br>
>"value=\"Approximative distance: %s Kms\">n";<br>
><br>
>break;<br>
><br>
>AND<br>
><br>
>case "DIST":<br>
>return "DIST";<br>
>break;<br>
><br>
>As per<br>
>http://lists.maptools.org/pipermail/maplab-users/2004-May/001197.html<br>
><br>
><br>
>gmf_apps\project\project_contents.php to include :<br>
>--------------------------------------------------<br>
><br>
>array_push( $aszROSATools, "DIST" );<br>
><br>
><br>
>But my issue is that when I zoom in on an area of the map it seems<br>
>to not reset the cellsize to the new value for the new zoom level.<br>
>I am fairly sure that this is not caused by browser caching issues<br>
>as I have tried on Exploder and Firefox and they both have the same<br>
>issues.<br>
><br>
>I even put :<br>
><br>
>$cellsize = $oMap->cellsize ;<br>
>$cellsize2 = $cellsize / 1000 ;<br>
><br>
>In the 'case "ZOOM_IN":' area in order to get it to
recalculate the<br>
>cellsize but to no avail.<br>
><br>
>If I press the redraw button at the new zoom level it seems to reset
it<br>
>and all goes well, the correct distance is represented by the tool,
not<br>
>the distance at the old resolution. I have also tried forcing a browser<br>
>reload and that does not seem to fix it.<br>
><br>
>I am not sure if it is related but the 'Zoom to fullest extents' seems<br>
>to need to be pressed twice as well before it works, in that once you<br>
>press it the map redraws but to the zoom in area - not to fullest<br>
>extent.<br>
><br>
>The re-centre tool does seem to fix it though, as does activating the<br>
>'i' tool.<br>
><br>
>I am thinking that the web server or similar may be keeping some pesky<br>
>state somewhere that needs to be dealt with - maybe !<br>
><br>
>Any help appreciated.<br>
><br>
><br>
><br>
>--<br>
>Stephen Baxter<br>
>Technical Director - PIPE Networks<br>
><br>
>Winner Australian Telecommunications Users Group 2005 award for<br>
>'Best Communication Solution for Large Business'<br>
><br>
>Peering,IX points and dark fiber in Australia.<br>
>Largest peering network downunder.<br>
><br>
>phone : 07 3233 9800/ 0417 818 695<br>
>fax : 07 3220 1800<br>
>web : www.pipenetworks.com<br>
><br>
><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>