Select to view content in your preferred language

confused about the graphicAdd

655
3
01-12-2011 07:37 AM
LeiZhou
Deactivated User
I am very confused about the graphicAdd event as in the following:

<esri:FeatureLayer graphicAdd="featurelayer1_graphicAddHandler(event)"
                           outFields="[FIPS,POP2000]"
                           url="http://sampleserver188888888">

graphicAdd is event of GraphicsLayer, not FeatureLayer.  But why it can be used for FeatureLayer? Thanks!
Tags (2)
0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
Steven,

   It is because FeatureLayer inherits from GraphicsLayer

As explained in the documentation here:

http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html
0 Kudos
ReneRubalcava
Esri Frequent Contributor
You can do that because FeatureLayer is a subclass of GraphicsLayer
http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html

It inherits all the methods/fields of a GraphicsLayer, but some such as clear have been overriden so they don't do anything.
0 Kudos
LeiZhou
Deactivated User
Thanks a lot!

Steven,

   It is because FeatureLayer inherits from GraphicsLayer

As explained in the documentation here:

http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html
0 Kudos