Select to view content in your preferred language

How add label in Feature Collection Layer which I have created...

483
2
01-23-2019 05:04 AM
Girishchandra_Yendargaye
Occasional Contributor

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)

Tags (2)
0 Kudos
2 Replies
LucasDanzinger
Esri Frequent Contributor

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:

dynamic_cast<FeatureLayer*>(collectionLayer->layers()->at(0))->labelDefinitions->append(labelDef);
0 Kudos
Girishchandra_Yendargaye
Occasional Contributor

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
0 Kudos