Search widget
http://resources.arcgis.com/en/help/flex-viewer/concepts/
The Search widget enables end users to search for features in a specific layer in the ArcGIS Viewer for Flex ("the Viewer") application. The widget provides two options to perform a search: spatially (using a graphical search tool) or by attribute (text search) as shown in the following screen shots:
Workflow
- From the drop-down list of available searchable layers, select the layer to search.
- Select the search method, either spatially or by attribute.
- For spatial searches, choose one of the graphical
search tools (from left to right):
- point
- polyline
- freehand polyline
- rectangle
- circle
- polygon
- freehand polygon
- For attribute (text) searches, end users must input text strings that match the syntax or format of the data being searched.
In the Viewer application (default setting), a Search widget has been configured to enable searches on two separate layers: Louisville Parcels and Louisville Police Facilities. In the following graphic, a spatial search was executed on the Louisville Parcels layer, and 58 features were returned. They are listed in the widget dialog box and highlighted as red polygons on the map display. Clicking a feature in the list will center it on the map display. In addition, a pop-up window will appear for the selected feature showing related attribute data.
In addition to clicking the feature in the list, you can also hover the pointer over the feature displayed on the map - both ways will display then pop-up window.
Returned features can be removed from the map display in either of the following ways:
- Click the Clear link under the spatial search tab of the widget.
- Click the Clear button under the text search tab of the widget.
This will remove all returned features from the map display.
Conceptual workflow
Prerequisite: A map or feature service layer (that can have multiple layers).
- Applies search expression to a map or feature layer and gets a result set returned from the server.
- Renders the result set on a graphics layer.
- Calls an Info Pop widget and populates its contents with result set information.
See the Search widget sample or read its tag reference.