[mapguide-users] Re: Standard Viewer Measure Tool Miles to Feet

Steve G steve.golden at morganhill.ca.gov
Tue Sep 28 17:28:23 EDT 2010


I first did this in MGOS 2.0 and documented my changes.  You just need to
follow the correct path/file names if you are using 2.1 or 2.2 which should
have installed to C:\Program Files\OSGeo
 

To change the measure tool to measure in feet:


1.  Open C:\Program
Files\MapGuideOpenSource\WebServerExtensions\www\mapviewerphp\measure.php in
text editor.  Change the conversion factor to convert from meters to feet
instead of meters to miles:

$distance *= 3.2808399; //get feet

2.  In the C:\Program
Files\MapGuideOpenSource\WebServerExtensions\www\viewerfiles\measureui.templ
file, modify the show units function to set the units var to "Feet".

From:
Line 115   var units = GetParent().GetMapFrame().IsEnglishUnits()?
"__#MILES__#": "__#KILOMETERS#__";

To:

Line 115   var units = GetParent().GetMapFrame().IsEnglishUnits()? "Feet":
"__#KILOMETERS#__";

-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Standard-Viewer-Measure-Tool-Miles-to-Feet-tp1818557p5581332.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list