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

375
2
01-23-2019 05:04 AM
Girishchandra_Yendargaye
New Contributor III

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
New Contributor III

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