Searching and displaying restaurants by name
We have completed the feature layer filtering, where we learned how to use the layer definition to filter out map results. However, there are cases where we will need to get the results, manipulate them, list, and interact with them. This is where we will use the query tasks. In this section, we will learn how to search restaurants by name and display the results and then we will add some code to the result to interact with the map.
However, first, we need to learn about an important object that is the center of ArcGIS JavaScript development and that is feature.
Note
Feature: This is an object that represents a single record in a feature layer. Feature has a list of attributes and a geometry that represents the location of that feature. A geometry can mainly be a point, line, or a polygon.
Each feature has a geometry; we use that geometry to highlight and zoom to the feature on a map. Beside geometry, feature has a list of attributes; the attributes...