• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Autodesk MapGuide Enterprise

    Reply
    Valued Contributor
    Posts: 63
    Registered: ‎11-08-2000

    Measure Distance Units

    425 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?
    Please use plain text.
    Active Contributor
    Posts: 37
    Registered: ‎12-18-2003

    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
    Please use plain text.
    Valued Contributor
    Posts: 63
    Registered: ‎11-08-2000

    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
    Please use plain text.
    Active Contributor
    Posts: 37
    Registered: ‎12-18-2003

    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
    Please use plain text.
    Employee
    Posts: 727
    Registered: ‎09-14-2006

    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.

    Please use plain text.
    Valued Contributor
    Posts: 63
    Registered: ‎11-08-2000

    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".
    Please use plain text.