Infrastructure Map Server General Discussion

Infrastructure Map Server General Discussion

Reply
Valued Contributor
gbneff
Posts: 63
Registered: ‎11-08-2000
Message 1 of 6 (523 Views)

Measure Distance Units

523 Views, 5 Replies
11-07-2006 03:49 PM
Does anyone know how to make the measure command display results in feet rather than miles?
Employee
bill.dhimitri
Posts: 42
Registered: ‎12-18-2003
Message 2 of 6 (523 Views)

Re: Measure Distance Units

11-10-2006 11:26 AM in reply to: gbneff
Greg,

I don't see a way to configure this via the UI. But I think you can do it by modifying 2 lines in each of these files installed by the MapGuide Web Extensions:

mapviewerphp/measure.php
mapviewerjava/measure.jsp
mapviewernet/measure.aspx

Bill
Valued Contributor
gbneff
Posts: 63
Registered: ‎11-08-2000
Message 3 of 6 (523 Views)

Re: Measure Distance Units

11-13-2006 03:53 PM in reply to: gbneff
Bill,

Thanks for the reply. I am able to change the conversion factor and get the distance displayed in feet. Do you know which file(s) to look at to change the label from "Miles" to "Feet" in the Measure Distace pane?

Thanks,

Greg
Employee
bill.dhimitri
Posts: 42
Registered: ‎12-18-2003
Message 4 of 6 (523 Views)

Re: Measure Distance Units

11-13-2006 08:23 PM in reply to: gbneff
Hi Greg,

I think the label string is in those same files. Try a case-insensitive search for "miles".

Bill
Employee
dswilson
Posts: 729
Registered: ‎09-14-2006
Message 5 of 6 (523 Views)

Re: Measure Distance Units

11-14-2006 08:43 AM in reply to: gbneff
I believe the labels are contained inside the en resource file found under ..\webserverextensions\www\localized\.

The DISTANCEMILES, DISTANCEKILOMETERS etc are where the values come from. However it appears that the measure.php (or jsp or apsx) page is where the strings are referenced and need to be changed. Ideally an enahancement is needed to allow the user to specify the units to measure in rather than have the pages hardcoded based on the viewer settings. Since users may be using data that is for floorplans or small developments they may not be working in kilometers or miles and hence the measure pages don't accomodate this.

Dave


Dave Wilson
SQA Analyst
AEC IM
Autodesk, Inc.

Valued Contributor
gbneff
Posts: 63
Registered: ‎11-08-2000
Message 6 of 6 (523 Views)

Re: Measure Distance Units

11-14-2006 03:46 PM in reply to: gbneff
I agree. For my needs I will always want measurements in feet. Miles is far too coarse a measurment.

I made the following two changes to display my measurements in feet:

in the C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\mapviewerphp\measure.php file I changed the conversion factor to convert from meters to feet instead of meters to miles:

$distance *= 3.2808399; //get feet

In the C:\Program Files\MapGuideOpenSource\WebServerExtensions\www\viewerfiles\measureui.templ file I modified showunits function to set the units var to "Feet".
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.