<?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: Show feature labels on featureLayer doesn't work in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/show-feature-labels-on-featurelayer-doesn-t-work/m-p/550452#M2827</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried your code with a sample service (and modifying the field name), and it works for me. Can you give it a try? If that works, does your expression accurately reflect the name of your field, and not an alias or something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp; &lt;SPAN class="comment token"&gt;// create the layer&lt;/SPAN&gt;
&amp;nbsp; ServiceFeatureTable&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; ft &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;ServiceFeatureTable&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;QUrl&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fsampleserver6.arcgisonline.com%2Farcgis%2Frest%2Fservices%2FDamageAssessment%2FFeatureServer%2F0" target="_blank"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest/services/DamageAssessment/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; FeatureLayer&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; fl &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ft&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp; &lt;SPAN class="comment token"&gt;// create the label definition&lt;/SPAN&gt;
&amp;nbsp; QString labelDefJSON &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"{"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\"labelPlacement\" : \"esriServerPointLabelPlacementAboveRight\","&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\"labelExpressionInfo\" :{"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\"expression\" : \"$feature.typdamage\" },"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\"symbol\" : {"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\"type\": \"esriTS\","&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\"font\" : { \"family\": \"Arial\", \"size\" : 11,\"weight\" : \"bold\"}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp; LabelDefinition&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; labelDefinition &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; LabelDefinition&lt;SPAN class="operator token"&gt;::&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;fromJson&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;labelDefJSON&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp; fl&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setLabelsEnabled&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; fl&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;labelDefinitions&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;append&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;labelDefinition&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; m_map&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;operationalLayers&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;append&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp; &lt;SPAN class="comment token"&gt;// Set map to map view&lt;/SPAN&gt;
&amp;nbsp; m_mapView&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setMap&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;m_map&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 23:48:50 GMT</pubDate>
    <dc:creator>LucasDanzinger</dc:creator>
    <dc:date>2021-12-11T23:48:50Z</dc:date>
    <item>
      <title>Show feature labels on featureLayer doesn't work</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/show-feature-labels-on-featurelayer-doesn-t-work/m-p/550451#M2826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I followed&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the instructions in "Label map Features" for .Net (&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/net/latest/wpf/guide/add-labels.htm" title="https://developers.arcgis.com/net/latest/wpf/guide/add-labels.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Label map features—ArcGIS Runtime SDK for .NET (WPF) | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;) (this topic doesn't seem to exist for Qt ???)&lt;/LI&gt;&lt;LI&gt;the reference for LabelDefinition (&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-labeldefinition.html" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-labeldefinition.html" rel="nofollow noopener noreferrer" target="_blank"&gt;LabelDefinition Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;) and&lt;/LI&gt;&lt;LI&gt;LabelDefinitionListModel (&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-labeldefinitionlistmodel.html" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-labeldefinitionlistmodel.html" rel="nofollow noopener noreferrer" target="_blank"&gt;LabelDefinitionListModel Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;But my application fails to show the labels of the features.&lt;/P&gt;&lt;P&gt;I have no idea what I'm&amp;nbsp;what I'm doing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;FeatureLayer* iconLayer = new FeatureLayer(connectionsTable, _map);
QString labelDefJSON = "{";
labelDefJSON += "\"labelPlacement\" : \"esriServerPointLabelPlacementAboveRight\",";
labelDefJSON += "\"labelExpressionInfo\" :{";
labelDefJSON += "\"expression\" : \"$feature.Name\" },";
labelDefJSON += "\"symbol\" : {";
labelDefJSON += "\"type\": \"esriTS\",";
labelDefJSON += "\"font\" : { \"family\": \"Arial\", \"size\" : 11,\"weight\" : \"bold\"}";
labelDefJSON += "}";
labelDefJSON += "}";

 LabelDefinition* labelDef = LabelDefinition::fromJson(labelDefJSON);
 iconLayer-&amp;gt;labelDefinitions()-&amp;gt;append(labelDef);

 iconLayer-&amp;gt;setLabelsEnabled(true);

_map-&amp;gt;operationalLayers()-&amp;gt;append(iconLayer);&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Before appending the layer to the operationalLayers(), I also set a renderer for the features themselves (icons). Could this interfere with showing the labels ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The JSON string seems to be valid (according to VisualStudio's JSON Visualizer).&lt;/P&gt;&lt;P&gt;Searching the Internet, I've found some alternatives :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;start the JSON string with "labelingInfo"&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;use "expression" : "return $feature.Name;"&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;"value: "$feature.Name"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Nothing seems to help.&lt;/P&gt;&lt;P&gt;Should I maybe do something different with "setLabelsEnabled(true)" ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:37:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/show-feature-labels-on-featurelayer-doesn-t-work/m-p/550451#M2826</guid>
      <dc:creator>MarcWouters</dc:creator>
      <dc:date>2021-12-12T16:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Show feature labels on featureLayer doesn't work</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/show-feature-labels-on-featurelayer-doesn-t-work/m-p/550452#M2827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried your code with a sample service (and modifying the field name), and it works for me. Can you give it a try? If that works, does your expression accurately reflect the name of your field, and not an alias or something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp; &lt;SPAN class="comment token"&gt;// create the layer&lt;/SPAN&gt;
&amp;nbsp; ServiceFeatureTable&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; ft &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;ServiceFeatureTable&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;QUrl&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fsampleserver6.arcgisonline.com%2Farcgis%2Frest%2Fservices%2FDamageAssessment%2FFeatureServer%2F0" target="_blank"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest/services/DamageAssessment/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; FeatureLayer&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; fl &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ft&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp; &lt;SPAN class="comment token"&gt;// create the label definition&lt;/SPAN&gt;
&amp;nbsp; QString labelDefJSON &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"{"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\"labelPlacement\" : \"esriServerPointLabelPlacementAboveRight\","&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\"labelExpressionInfo\" :{"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\"expression\" : \"$feature.typdamage\" },"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\"symbol\" : {"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\"type\": \"esriTS\","&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\"font\" : { \"family\": \"Arial\", \"size\" : 11,\"weight\" : \"bold\"}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; labelDefJSON &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp; LabelDefinition&lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; labelDefinition &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; LabelDefinition&lt;SPAN class="operator token"&gt;::&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;fromJson&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;labelDefJSON&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp; fl&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setLabelsEnabled&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; fl&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;labelDefinitions&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;append&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;labelDefinition&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; m_map&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;operationalLayers&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;append&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fl&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp; &lt;SPAN class="comment token"&gt;// Set map to map view&lt;/SPAN&gt;
&amp;nbsp; m_mapView&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setMap&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;m_map&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:48:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/show-feature-labels-on-featurelayer-doesn-t-work/m-p/550452#M2827</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2021-12-11T23:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Show feature labels on featureLayer doesn't work</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/show-feature-labels-on-featurelayer-doesn-t-work/m-p/550453#M2828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lucas,&lt;/P&gt;&lt;P&gt;I've checked again to be sure : field name and alias are both 'Name'.&lt;/P&gt;&lt;P&gt;I've checked both for the layer and the mapView that isLabelsEnabled() return true.&lt;/P&gt;&lt;P&gt;I've ran the code without the attached renderer.&lt;/P&gt;&lt;P&gt;I've changed the parent for the LabelDefinition to &lt;STRONG&gt;this&lt;/STRONG&gt; (was empty) and the parent for the layer also to &lt;STRONG&gt;this&lt;/STRONG&gt; (was the map).&lt;/P&gt;&lt;P&gt;Nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only difference I can see now is that my FeatureLayer is based on a GeodatabaseFeatureTable, while you use a ServiceFeatureTable in your sample code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could this be the reason why I don't see labels ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking further in the reference I noticed a class LabelingInfo. But I cannot find how to connect this to the layer of the mapView. Could this help ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for looking into this further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2018 09:05:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/show-feature-labels-on-featurelayer-doesn-t-work/m-p/550453#M2828</guid>
      <dc:creator>MarcWouters</dc:creator>
      <dc:date>2018-01-24T09:05:03Z</dc:date>
    </item>
  </channel>
</rss>

