<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Century Gothic";
        panose-1:2 11 5 2 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Century Gothic","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Century Gothic","sans-serif";
        color:blue;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>I figured it out. Posting my problems here tends to help me organize my thoughts and solve problems. Hope you don’t mind.<br><br>The solution was from an old mapguide user post: <a href="http://osgeo-org.1560.x6.nabble.com/scale-bar-always-says-Meters-td4203151.html">http://osgeo-org.1560.x6.nabble.com/scale-bar-always-says-Meters-td4203151.html</a> <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>I edited rest\app\controller\mappingservicecontroller.php. Look for the function GeneratePlot(). This function affects DWFs created from runtime maps. To change the scale units for DWFs created from the library you would have to edit GeneratePlotFromMapDefinition(). The source code is pretty similar in both. One gets the map from Session, the other gets it from Library:\\.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>Find the lines:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>if ($printLayoutStr != null) {<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>         $layoutRes = new MgResourceIdentifier($printLayoutStr);<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>         $layout = new MgLayout($layoutRes, $title, MgPageUnitsType::Inches);                                                <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>}<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>This checks if you’re your REST request includes the path to a printlayout resource in Library:\\.  If so, it creates an MgLayout object. The third parameter in the constructor is what we’re concerned with.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>The parameter appears to be a constant, so you would think that the units would be imperial to start with. According the post, the constant doesn’t work properly and we can work around it by including the actual string: “US-English”<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>Now the code reads:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>if ($printLayoutStr != null) {<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>         $layoutRes = new MgResourceIdentifier($printLayoutStr);<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>         $layout = new MgLayout($layoutRes, $title, “US-English”);                                             <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>}<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Century Gothic","sans-serif";color:blue'>If I could request a change to make this less confusing, it would be that the third parameter for the MgLayout object be dependent on some kind of global configuration so it doesn’t need to be edited manually.<o:p></o:p></span></p></div></body></html>