<?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: Need some help understanding how to use textAttribute with TextSymbol in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/need-some-help-understanding-how-to-use/m-p/650943#M14477</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the quick reply!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried out the code you suggested and got the following error on the line with the StringUtil.substitute: "1137:Incorrect number of arguments. Expected no more than 2."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Should I be using com.esri.ags.utils.StringUtil or mx.utils.StringUtil?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Oct 2012 17:37:43 GMT</pubDate>
    <dc:creator>JasonCantrell</dc:creator>
    <dc:date>2012-10-03T17:37:43Z</dc:date>
    <item>
      <title>Need some help understanding how to use textAttribute with TextSymbol</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/need-some-help-understanding-how-to-use/m-p/650941#M14475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need some help understanding how to use the "textAttribute" attribute of TextSymbol.&amp;nbsp; I am using a composite symbol, SimpleMarkerSymbol and TextSymbol, and I want the TextSymbol to display custom text for each map point.&amp;nbsp; I was thinking of using the uid attribute of graphic (graphic.uid) to store the custom text but I'm not sure how to tie that attribute to the textAttribute.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/flex-api/samples/#/Using_textAttribute_on_TextSymbol/01nq0000002p000000/" rel="nofollow" target="_blank"&gt;sample&lt;/A&gt;&lt;SPAN&gt; isn't very helpful for this.&amp;nbsp; In the example, the textAttribute is displaying the CITY_NAME from the featureLayer, but I'm not sure where that data comes from.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions or clarifications would be greatly appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 12:36:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/need-some-help-understanding-how-to-use/m-p/650941#M14475</guid>
      <dc:creator>JasonCantrell</dc:creator>
      <dc:date>2012-10-03T12:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help understanding how to use textAttribute with TextSymbol</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/need-some-help-understanding-how-to-use/m-p/650942#M14476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;From &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/symbols/TextSymbol.html#textAttribute" rel="nofollow noopener noreferrer" target="_blank"&gt;reference&lt;/A&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;STRONG&gt;textAttribute &lt;/STRONG&gt;&lt;SPAN&gt;is the string representing the attribute of the graphic that should populate the "text" content.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;... I want the TextSymbol to display custom text for each map point...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;use &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/symbols/TextSymbol.html#textFunction" rel="nofollow noopener noreferrer" target="_blank"&gt;textFunction&lt;/A&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;public function myTextFunction(point:MapPoint, attributes:Object):String
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; var label:String = StringUtil.substitute("X: {0}, Y:{1}", point.x, point.y);
&amp;nbsp;&amp;nbsp;&amp;nbsp; return label;
}
...
&amp;lt;esri:TextSymbol background="true"
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; backgroundColor="0xFFFFFF"
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; border="true"
&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;&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;&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;&amp;nbsp; textFunction="myTextFunction"&amp;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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;flash:TextFormat bold="true" size="16"/&amp;gt;
&amp;lt;/esri:TextSymbol&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:36:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/need-some-help-understanding-how-to-use/m-p/650942#M14476</guid>
      <dc:creator>IvanBespalov</dc:creator>
      <dc:date>2021-12-12T03:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help understanding how to use textAttribute with TextSymbol</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/need-some-help-understanding-how-to-use/m-p/650943#M14477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the quick reply!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried out the code you suggested and got the following error on the line with the StringUtil.substitute: "1137:Incorrect number of arguments. Expected no more than 2."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Should I be using com.esri.ags.utils.StringUtil or mx.utils.StringUtil?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 17:37:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/need-some-help-understanding-how-to-use/m-p/650943#M14477</guid>
      <dc:creator>JasonCantrell</dc:creator>
      <dc:date>2012-10-03T17:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help understanding how to use textAttribute with TextSymbol</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/need-some-help-understanding-how-to-use/m-p/650944#M14478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This example should be using mx.utils.StringUtil:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/utils/StringUtil.html#substitute()" rel="nofollow" target="_blank"&gt;http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/utils/StringUtil.html#substitute()&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2012 22:34:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/need-some-help-understanding-how-to-use/m-p/650944#M14478</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2012-10-03T22:34:21Z</dc:date>
    </item>
  </channel>
</rss>

