<?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: Adding scale text to our ArcGIS Online maps in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407651#M37560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;add this and you have all in the same textbox:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;&lt;BR /&gt;function showScale() {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.byId("scale").value = dojo.number.format(map.getScale(), { pattern:"##,##0"});&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(map, "onZoomEnd", showScale);&lt;BR /&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 May 2013 13:47:03 GMT</pubDate>
    <dc:creator>DavideLimosani</dc:creator>
    <dc:date>2013-05-23T13:47:03Z</dc:date>
    <item>
      <title>Adding scale text to our ArcGIS Online maps</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407647#M37556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a way to let the viewer see scale text (i. e. "1:1000") instead of just a scale bar in ArcGIS Online maps? We are using the Basic Viewer template with some minor modifications. We would want to use metres as the unit, if possible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Even better: is there a way to let users choose a scale by selecting from a drop-down menu, or typing the numbers?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any hints are appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Turid&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 07:09:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407647#M37556</guid>
      <dc:creator>TuridBrox</dc:creator>
      <dc:date>2013-05-23T07:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Adding scale text to our ArcGIS Online maps</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407648#M37557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is there a way to let the viewer see scale text (i. e. "1:1000") instead of just a scale bar in ArcGIS Online maps? We are using the Basic Viewer template with some minor modifications. We would want to use metres as the unit, if possible.&lt;BR /&gt;&lt;BR /&gt;Even better: is there a way to let users choose a scale by selecting from a drop-down menu, or typing the numbers?&lt;BR /&gt;&lt;BR /&gt;Any hints are appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks, &lt;BR /&gt;Turid&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;use map.getScale();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/map.html#getscale" rel="nofollow" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/map.html#getscale&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and to set the scale try something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input id="scale"&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; onkeypress="keyPress(event)" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; onChange="map.setExtent(esri.geometry.getExtentForScale(map, this.value.replace('.', '')));"/&amp;gt;&amp;nbsp; function keyPress(e) { &amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.keyCode == 13) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.byId("scale").blur(); &amp;nbsp;&amp;nbsp;&amp;nbsp; } }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 13:19:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407648#M37557</guid>
      <dc:creator>DavideLimosani</dc:creator>
      <dc:date>2013-05-23T13:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Adding scale text to our ArcGIS Online maps</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407649#M37558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 13:26:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407649#M37558</guid>
      <dc:creator>TuridBrox</dc:creator>
      <dc:date>2013-05-23T13:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Adding scale text to our ArcGIS Online maps</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407650#M37559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;do you know of any way to apply the getScale() to a label either for a feature or a Dynamic Text field in a layout&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 13:29:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407650#M37559</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2013-05-23T13:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Adding scale text to our ArcGIS Online maps</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407651#M37560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;add this and you have all in the same textbox:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;&lt;BR /&gt;function showScale() {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.byId("scale").value = dojo.number.format(map.getScale(), { pattern:"##,##0"});&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.connect(map, "onZoomEnd", showScale);&lt;BR /&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 13:47:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407651#M37560</guid>
      <dc:creator>DavideLimosani</dc:creator>
      <dc:date>2013-05-23T13:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Adding scale text to our ArcGIS Online maps</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407652#M37561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I pasted that into a text box and it shows what i pasted as the text&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;add this and you have all in the same textbox:&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 13:57:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407652#M37561</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2013-05-23T13:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Adding scale text to our ArcGIS Online maps</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407653#M37562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I pasted that into a text box and it shows what i pasted as the text&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mmh sorry I don't understant your problem... can you explain it better please?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 14:04:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407653#M37562</guid>
      <dc:creator>DavideLimosani</dc:creator>
      <dc:date>2013-05-23T14:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Adding scale text to our ArcGIS Online maps</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407654#M37563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am looking for a way to return scale in an ArcGIS session.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Possibly by putting it in a dynamic text box in layout.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or better yet to write it into a Definition query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The query would be something like only show this feature if the scale is less than (or greater then) the attribute (the attribute would have desired scale)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Essentially.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have an attribute I call VisibleScale.&amp;nbsp;&amp;nbsp; I populate it with scale values.&amp;nbsp; 1000, 2000, 15000 etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The definition query would be such that if the current scale value is greater then the VisibleScale Attribute then the individual feature would not be visible. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;mmh sorry I don't understant your problem... can you explain it better please?&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 14:09:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407654#M37563</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2013-05-23T14:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Adding scale text to our ArcGIS Online maps</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407655#M37564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;add this and you have all in the same textbox:&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the code snippet. I added this to the layout.js-file. But how do I get it to display on the map? I assume I must make some changes either in the .html-file, or one of the CSS-files?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Turid&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 13:21:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-scale-text-to-our-arcgis-online-maps/m-p/407655#M37564</guid>
      <dc:creator>TuridBrox</dc:creator>
      <dc:date>2013-05-24T13:21:44Z</dc:date>
    </item>
  </channel>
</rss>

