Feature Layer Data Overlay
Attributes from the fields in a layer can be returned to your application using IdentifyTask.
This FeatureLayer object inherits from the GraphicsLayer object, but also offers additional capabilities,
such as the ability to perform queries and selections as well as support definition expressions.
It can also be used for web editing.
A feature layer differs from tiled and dynamic map service layers in that it transports geometry information for features from ArcGIS Server to the web browser, where it is then drawn on the map. It can also be used to represent data from a nonspatial table, in addition to a feature class that contains geometry.
Streaming data from ArcGIS Server to the browser potentially cuts down on the round trips to the server and can improve the performance of your application. A client can request the features it needs and perform selections and queries on those features, without having to request any more information from the server. The FeatureLayer object is especially appropriate for layers that respond to user interactions such as mouse clicks or hovers. The tradeoff to this is that if you're working with a feature layer that contains a lot of features, it can take a long time to initially transport the features to the client. The feature layer supports several display modes that can help ease this burden of working with a large number of features.
Click on a shaded state to view attributes. A definition expressions was set on this layer to show states with a median age GT 35 years old.