Feature layers
In the previous chapters, we introduced the Dynamic map service object. That object was easy to use and implement since it takes care of everything from the symbology, scaling, labeling, and layer grouping. It fetches all the layers in your service and adds them to the map. The disadvantage of Dynamic map service layer is that it doesn't allow you to interact with the individual sub-layers in a convenient way. You can't loop through the sub-layers to fetch individual layers; therefore you cannot, of course, query the layers. Dynamic map services are mainly used for representation. That is why we will replace it with the feature layer as we will see in the next section.
Note
Feature layer: This is a layer, which allows read access to the individual ArcGIS records in the corresponding table and accepts user queries.
Adding feature layers
As we have learned in the previous chapters, our service contains two layers, Food and Drinks, and Belize Landbase. This dynamic layer is just...