Select to view content in your preferred language

Map label toggle on feature layer

982
1
07-25-2012 02:06 PM
Labels (1)
MatthewBrown1
Deactivated User
Hi,

I have a feature service layer with 24(!) classes and I would like to add some interactive labels to help distinguish between similar symbol fills (I also need to sort out picture fills that work in ArcGIS Desktop and the Runtime). I've seen some posts regarding creating a graphics layer from the feature layer but I wonder how this will work if new features are being added. Will the graphics layer need to be recreated each time a new feature is added? Can the new features be captured with draw events and added to the graphics layer incrementally? Not sure what the easiest/best method would be.

Thanks,

Matt
0 Kudos
1 Reply
FengZhang2
Deactivated User
You may want to check the OnLayerChanged method of the FeatureLayer class. Clear graphics in the old graphic layer when this is raised; and re-create graphics using the Graphics property of the FeatureLayer class based on your requirements.



Hi,

I have a feature service layer with 24(!) classes and I would like to add some interactive labels to help distinguish between similar symbol fills (I also need to sort out picture fills that work in ArcGIS Desktop and the Runtime). I've seen some posts regarding creating a graphics layer from the feature layer but I wonder how this will work if new features are being added. Will the graphics layer need to be recreated each time a new feature is added? Can the new features be captured with draw events and added to the graphics layer incrementally? Not sure what the easiest/best method would be.

Thanks,

Matt
0 Kudos