<?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 add the �??scale text�?� on the map? in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762007#M22821</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;SPAN&gt;Original User: &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:Jamal432@gmail.com"&gt;Jamal432@gmail.com&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You will need to download the source code and API for Flex.&amp;nbsp; The following link will walk you through the process: &lt;A href="http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Getting_started_for_developers/01m30000001q000000/"&gt;http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Getting_started_for_developers/01m30000001q000000/&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks Ronald.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I�??ll see if I can manage this issue knowing that I�??m not a developer! Should I be?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jamal&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Dec 2012 18:10:34 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2012-12-28T18:10:34Z</dc:date>
    <item>
      <title>How to add the ???scale text??? on the map?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762002#M22816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How to add the ???scale text??? on the map?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I???m wondering if there is a way to add the ???scale text??? on the map such that the scale of the map is shown at each zoom.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]20238[/ATTACH], [ATTACH=CONFIG]20239[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In particular cases, the ???scale bar??? is not sufficient to identify all the required issue and thus the ???scale text??? is needed all the time. It is very basic element for any map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jamal&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2012 06:20:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762002#M22816</guid>
      <dc:creator>JamalNUMAN</dc:creator>
      <dc:date>2012-12-28T06:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the �??scale text�?� on the map?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762003#M22817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: ericv&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jamal,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've added this to our app, but we are not using the Application Builder (we use Flash Builder)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the mxml file (CoordinateWidget.mxml), there is a map_mouseMoveHandler function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the "original" file, there is a line in this function that reads:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&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;nbsp;&amp;nbsp;&amp;nbsp; coords.text = m_func(mapPoint);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This needs to be changed to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&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;nbsp;&amp;nbsp;&amp;nbsp; coords.text = m_func(mapPoint)+"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Scale 1:" + map.scale.toString();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not sure this will help you much unless you have FB.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Eric V&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gurnee, IL&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2012 13:54:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762003#M22817</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-12-28T13:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the �??scale text�?� on the map?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762004#M22818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As EricV stated, you will need FashBuilder to modify the CoordinateWidget.mxml file to add the scale value.&amp;nbsp; I use a bit more code than EricV does, because I want the scale to be an integer value and to change as the various mouse actions change.&amp;nbsp; Below are three code fragments that may help.&amp;nbsp; (I use comments to help me track changes and give me a place to start when the next version of a widget or Flex is released.)&amp;nbsp; Hopefully this helps.&amp;nbsp; (Note: the code below is for flex viewer 3.1 and FlashBuilder 4.7.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
// - Start modification - //
[Bindable]
private var mapScale:int;
// - End modification - //



map.addEventListener(MouseEvent.MOUSE_MOVE, map_mouseMoveHandler);
// - Start modification - //
map.addEventListener(MouseEvent.MOUSE_WHEEL, map_mouseMoveHandler);
map.addEventListener(MouseEvent.DOUBLE_CLICK, map_mouseMoveHandler);
// - end modification - //



private function map_mouseMoveHandler(event:MouseEvent):void
{
// - Start modification - //
var nf:spark.formatters.NumberFormatter = new spark.formatters.NumberFormatter
const mapPoint:MapPoint = map.toMapFromStage(event.stageX, event.stageY);
mapScale = Number(map.scale);
coords.text = m_func(mapPoint) + "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Scale 1:" + mapScale;
// - end modification - //
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:22:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762004#M22818</guid>
      <dc:creator>ronaldmcfarlane</dc:creator>
      <dc:date>2021-12-12T08:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the �??scale text�?� on the map?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762005#M22819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;SPAN&gt;Original User: &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:Jamal432@gmail.com" rel="nofollow noopener noreferrer" target="_blank"&gt;Jamal432@gmail.com&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;As EricV stated, you will need FashBuilder to modify the CoordinateWidget.mxml file to add the scale value.&amp;nbsp; I use a bit more code than EricV does, because I want the scale to be an integer value and to change as the various mouse actions change.&amp;nbsp; Below are three code fragments that may help.&amp;nbsp; (I use comments to help me track changes and give me a place to start when the next version of a widget or Flex is released.)&amp;nbsp; Hopefully this helps.&amp;nbsp; (Note: the code below is for flex viewer 3.1 and FlashBuilder 4.7.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
// - Start modification - //
[Bindable]
private var mapScale:int;
// - End modification - //



map.addEventListener(MouseEvent.MOUSE_MOVE, map_mouseMoveHandler);
// - Start modification - //
map.addEventListener(MouseEvent.MOUSE_WHEEL, map_mouseMoveHandler);
map.addEventListener(MouseEvent.DOUBLE_CLICK, map_mouseMoveHandler);
// - end modification - //



private function map_mouseMoveHandler(event:MouseEvent):void
{
// - Start modification - //
var nf:spark.formatters.NumberFormatter = new spark.formatters.NumberFormatter
const mapPoint:MapPoint = map.toMapFromStage(event.stageX, event.stageY);
mapScale = Number(map.scale);
coords.text = m_func(mapPoint) + "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Scale 1:" + mapScale;
// - end modification - //
}&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;[ATTACH=CONFIG]20271[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you Eric and Ronald for the help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;�?� I searched all my C drive but couldn�??t find the �??CoordinateWidget.mxml�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;�?� I�??ve Adobe Flash Builder 4 installed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;�?� I�??ve the ArcGIS Viewer for Flex 3.1 installed&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you please indicate how can I proceed now?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:22:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762005#M22819</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T08:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the �??scale text�?� on the map?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762006#M22820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You will need to download the source code and API for Flex.&amp;nbsp; The following link will walk you through the process: &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Getting_started_for_developers/01m30000001q000000/"&gt;http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Getting_started_for_developers/01m30000001q000000/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2012 16:12:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762006#M22820</guid>
      <dc:creator>ronaldmcfarlane</dc:creator>
      <dc:date>2012-12-28T16:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the �??scale text�?� on the map?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762007#M22821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;SPAN&gt;Original User: &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:Jamal432@gmail.com"&gt;Jamal432@gmail.com&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You will need to download the source code and API for Flex.&amp;nbsp; The following link will walk you through the process: &lt;A href="http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Getting_started_for_developers/01m30000001q000000/"&gt;http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Getting_started_for_developers/01m30000001q000000/&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks Ronald.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I�??ll see if I can manage this issue knowing that I�??m not a developer! Should I be?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jamal&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2012 18:10:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762007#M22821</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-12-28T18:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the �??scale text�?� on the map?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762008#M22822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you can follow directions, you can do it Jamal.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2012 18:14:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-add-the-scale-text-on-the-map/m-p/762008#M22822</guid>
      <dc:creator>EricVenden</dc:creator>
      <dc:date>2012-12-28T18:14:55Z</dc:date>
    </item>
  </channel>
</rss>

