How add label in Feature Collection Layer which I have created...
I don't find below method in QT
collectionLayer.Layers.FirstOrDefault().LabelDefinitions.Add(labelDef)
The list of layers comes back as a list of Layer*, which don't contain the LabelsDefinitions members. Can you try casting the Layer* to a FeatureLayer*? I'm not certain if this will work or not, but it is worth a try. Something like:
<SPAN class="keyword token">dynamic_cast</SPAN><SPAN class="operator token"><</SPAN>FeatureLayer<SPAN class="operator token">*</SPAN><SPAN class="operator token">></SPAN><SPAN class="punctuation token">(</SPAN>collectionLayer<SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">layers</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">at</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN>labelDefinitions<SPAN class="operator token">-</SPAN><SPAN class="operator token">></SPAN><SPAN class="token function">append</SPAN><SPAN class="punctuation token">(</SPAN>labelDef<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
I have added it as
dynamic_cast<FeatureLayer*>(collectionLayer->layers().at(0))->labelDefinitions()->append(labelDef); But How to enabel it..I am not able to see it
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.