FW: [UMN_MAPSERVER-USERS] Distance tool in ROSA (missed some info from first post)

Kevin Grootendorst kgrootendorst at BAIRD.COM
Wed May 11 11:42:56 EDT 2005


Steve,
Did you come across a solution to your problem?
I'm having a similar situation, where the distances being measured are way
off (eg. a 3km feature is measured as being 1.7km)

Kevin

On Thu, 5 May 2005 15:47:45 +1000, Stephen Baxter
<steve at STAFF.PIPENETWORKS.COM> wrote:

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



More information about the mapserver-users mailing list