<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to change the scale bar unit correctly while printing map? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-scale-bar-unit-correctly-while/m-p/103104#M9448</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Feb 2015 03:18:12 GMT</pubDate>
    <dc:creator>StephenLam</dc:creator>
    <dc:date>2015-02-18T03:18:12Z</dc:date>
    <item>
      <title>How to change the scale bar unit correctly while printing map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-scale-bar-unit-correctly-while/m-p/103103#M9447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please find the attached image as below, although I have changed the &lt;A href="https://developers.arcgis.com/javascript/jsapi/printtemplate.html#layoutoptions" rel="nofollow noopener noreferrer" target="_blank"&gt;scalebarUnit &lt;/A&gt;to "Meter", it really just changes the unit from "km" to "m".&lt;/P&gt;&lt;P&gt;Here is the code&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;// create a print template for each choice
templates = arrayUtils.map(templateNames, function (ch) {
&amp;nbsp; var plate = new PrintTemplate();
&amp;nbsp; //plate.preserveScale = true;&amp;nbsp;&amp;nbsp; // Default = false
&amp;nbsp; plate.layout = plate.label = ch;
&amp;nbsp; plate.format = "JPG";
&amp;nbsp; plate.layoutOptions = {
&amp;nbsp; "legendLayers": legendLayers,
&amp;nbsp; "scalebarUnit": "Meters"
&amp;nbsp; };
&amp;nbsp; plate.preserveScale = false;
&amp;nbsp; return plate;
});


// create the print dijit


var printer = new Print({
&amp;nbsp; "map": map,
&amp;nbsp; "templates": templates,
&amp;nbsp; url: xxx
}, dojo.byId("printButton"));
printer.startup();&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advice, thanks.&lt;/P&gt;&lt;P&gt;Km:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="55715" alt="km.jpg" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/55715_km.jpg" style="width: 620px; height: 364px;" /&gt;&lt;/P&gt;&lt;P&gt;Meter:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="55716" alt="m.jpg" class="jive-image image-2" src="https://community.esri.com/legacyfs/online/55716_m.jpg" style="width: 620px; height: 364px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:20:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-scale-bar-unit-correctly-while/m-p/103103#M9447</guid>
      <dc:creator>StephenLam</dc:creator>
      <dc:date>2021-12-11T06:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the scale bar unit correctly while printing map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-scale-bar-unit-correctly-while/m-p/103104#M9448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 03:18:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-scale-bar-unit-correctly-while/m-p/103104#M9448</guid>
      <dc:creator>StephenLam</dc:creator>
      <dc:date>2015-02-18T03:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the scale bar unit correctly while printing map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-scale-bar-unit-correctly-while/m-p/103105#M9449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried changing to kilometers and meters here: &lt;A href="http://jsbin.com/fihaxovoqi/1/edit" title="http://jsbin.com/fihaxovoqi/1/edit"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt; &lt;/P&gt;&lt;P&gt;and the scalebar output changes. Have you ran your app in debug mode perhaps in the Dev tools in Google Chrome?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Feb 2015 19:48:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-scale-bar-unit-correctly-while/m-p/103105#M9449</guid>
      <dc:creator>ChrisSergent</dc:creator>
      <dc:date>2015-02-18T19:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the scale bar unit correctly while printing map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-scale-bar-unit-correctly-while/m-p/103106#M9450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any solution to this yet?&lt;/P&gt;&lt;P&gt;On my own site (jsapi 3.7), changing scalebarUnit from Miles to Feet only changes the unit text- what was 0.5 miles now reads 0.5 feet. What I'd like to do is display in feet when zoomed in and miles when zoomed out by passing a variable to scalebarUnit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 14:45:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-scale-bar-unit-correctly-while/m-p/103106#M9450</guid>
      <dc:creator>MikeKillion</dc:creator>
      <dc:date>2015-05-04T14:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the scale bar unit correctly while printing map?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-scale-bar-unit-correctly-while/m-p/103107#M9451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not yet. The problem is still exist. For work around (seems stupid), I told my client that there are some bugs in ArcGIS Javascript API, this issue may be fixed in the future......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2015 08:00:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-change-the-scale-bar-unit-correctly-while/m-p/103107#M9451</guid>
      <dc:creator>StephenLam</dc:creator>
      <dc:date>2015-06-18T08:00:21Z</dc:date>
    </item>
  </channel>
</rss>

