<?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 FeatureLayer source for LabelLayer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-source-for-labellayer/m-p/76926#M6979</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have featureLayer that is loaded as a FeatureServer so I can add features to it.&amp;nbsp; Adding to the featureLayer through applyEdits adds graphics to this layer.&amp;nbsp; I'd also like this layer to be a source for my LabelLayer, so the features I'm adding have a label based on CITY attribute I'm populating. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I first add the feature to my layer, the text label appears as expected.&amp;nbsp; However, once I pan, the label changes from the CITY attribute to appearing as 'undefined'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CITY attribute is present in layer, I can see it in ArcCatalog, so I know it has values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.bufferLayer = new FeatureLayer(config.pathName + "/arcgis/rest/services/bufferAnalysis/FeatureServer/0" ,{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id:"bufferLayer"}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var textColor = new Color("#FF0000");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var cityText = new TextSymbol();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cityText.setColor(textColor);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cityText.font.setSize("7pt");&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; var cityLabelRenderer = new SimpleRenderer(cityText);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cityLabelLayer = new LabelLayer({ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: "cityLabels"
&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; cityLabelLayer.addFeatureLayer(app.bufferLayer, cityLabelRenderer, "${CITY}");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.map.addLayers([featureLayer,cityLayer,app.bufferLayer,app.graphicsLayer,cityLabelLayer]);&amp;nbsp; &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The is based on the example &lt;A href="https://developers.arcgis.com/javascript/jssamples/query_buffer.html" title="https://developers.arcgis.com/javascript/jssamples/query_buffer.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Select with Feature Layer | ArcGIS API for JavaScript&lt;/A&gt; , but instead of just a graphic added to the map, I want to save the circle I'm generating, along with the summary statistics as a new feature in my featureLayer.&amp;nbsp; It seems like my edits are getting applied, but I don't understand why the labels first appear, then disappear.&amp;nbsp;&amp;nbsp;&amp;nbsp; Is this not a valid use of labelLayer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 22:58:21 GMT</pubDate>
    <dc:creator>TracySchloss</dc:creator>
    <dc:date>2021-12-10T22:58:21Z</dc:date>
    <item>
      <title>FeatureLayer source for LabelLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-source-for-labellayer/m-p/76926#M6979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have featureLayer that is loaded as a FeatureServer so I can add features to it.&amp;nbsp; Adding to the featureLayer through applyEdits adds graphics to this layer.&amp;nbsp; I'd also like this layer to be a source for my LabelLayer, so the features I'm adding have a label based on CITY attribute I'm populating. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I first add the feature to my layer, the text label appears as expected.&amp;nbsp; However, once I pan, the label changes from the CITY attribute to appearing as 'undefined'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CITY attribute is present in layer, I can see it in ArcCatalog, so I know it has values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.bufferLayer = new FeatureLayer(config.pathName + "/arcgis/rest/services/bufferAnalysis/FeatureServer/0" ,{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id:"bufferLayer"}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var textColor = new Color("#FF0000");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var cityText = new TextSymbol();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cityText.setColor(textColor);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cityText.font.setSize("7pt");&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; var cityLabelRenderer = new SimpleRenderer(cityText);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cityLabelLayer = new LabelLayer({ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: "cityLabels"
&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; cityLabelLayer.addFeatureLayer(app.bufferLayer, cityLabelRenderer, "${CITY}");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.map.addLayers([featureLayer,cityLayer,app.bufferLayer,app.graphicsLayer,cityLabelLayer]);&amp;nbsp; &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The is based on the example &lt;A href="https://developers.arcgis.com/javascript/jssamples/query_buffer.html" title="https://developers.arcgis.com/javascript/jssamples/query_buffer.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Select with Feature Layer | ArcGIS API for JavaScript&lt;/A&gt; , but instead of just a graphic added to the map, I want to save the circle I'm generating, along with the summary statistics as a new feature in my featureLayer.&amp;nbsp; It seems like my edits are getting applied, but I don't understand why the labels first appear, then disappear.&amp;nbsp;&amp;nbsp;&amp;nbsp; Is this not a valid use of labelLayer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:58:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-source-for-labellayer/m-p/76926#M6979</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2021-12-10T22:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer source for LabelLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-source-for-labellayer/m-p/76927#M6980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see what I did wrong.&amp;nbsp; You have to have some outFields specified in your FeatureLayer definition or this doesn't work.&amp;nbsp; I always think the default is outFields:['*'], but the default is no fields get returned. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.bufferLayer = new FeatureLayer(config.pathName + "/arcgis/rest/services/DPS/VetComm_bufferAnalysis/FeatureServer/0" ,{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id:"bufferLayer",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFields:['*']&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Sep 2015 20:21:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featurelayer-source-for-labellayer/m-p/76927#M6980</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-09-09T20:21:58Z</dc:date>
    </item>
  </channel>
</rss>

