Select to view content in your preferred language

Get Reference to Graphic Layer from Graphic

603
2
04-06-2010 10:44 AM
NateIrwin
New Contributor
I'm sure there is an easy solution to this, but I can't find a way to get a reference to a "parent" graphics layer from an individual graphic.

Can someone point me in the right direction?
Tags (2)
0 Kudos
2 Replies
MehulChoksey
Esri Contributor
Assuming you are using 1.x version for the ArcGIS api for Flex, Have you tried myGraphic.parent?
In ArcGIS  API for Flex 2.0 beta,there is a readOnly property called graphicsLayer that returns the parent as an instance of GraphicsLayer. This property is null if the graphic is not added to the Graphics layer.
0 Kudos
NateIrwin
New Contributor
Perfect! Thanks. I am using the 1.3 release, and the parent property did the trick.
0 Kudos