Labeling Graphics Layer

1734
4
07-25-2011 11:10 AM
ChristopherEbright
New Contributor III
I am trying to label a polygon graphics layer.
I am able to either symbolize the graphic or the label through the renderer, but I can't figure out how to do both at the same time. I see that the AGSFeatureLayer has a labeling functionality, but I am using an AGSGraphicsLayer because I am loading data locally.
0 Kudos
4 Replies
ChristopherEbright
New Contributor III
For what it's worth, I was able to find a work around.
I just created another instance of my view that contained the graphics and created a new renderer for that view and added it to the mapview. Seems like a hack and extra overhead, but it works for the moment.
0 Kudos
NimeshJarecha
Esri Regular Contributor
Chris,

You should symbolize your polygon graphics in AGSGraphicsLayer with AGSCompositeSymbol which has AGSSimpleFillSymbol and AGSTextSymbol.

Regards,
Nimesh
0 Kudos
ChristopherEbright
New Contributor III
That worked very well. Much better on my memory usage as well!
Thanks.
0 Kudos
NimeshJarecha
Esri Regular Contributor
Glad to know 🙂

Regards,
Nimesh
0 Kudos