import type { SearchResult, SuggestResult, BaseSearchResults, BaseSearchResponse, SearchResults } from "@arcgis/core/widgets/Search/types.js";- Since
- ArcGIS Maps SDK for JavaScript 4.33
A module for importing types used in Search modules.
Type definitions
SearchResult
The result object returned from a Search.search().
target
- Type
- Graphic
The target of the result, which is a Graphic used for either MapView goTo() or SceneView goTo() navigation.
BaseSearchResults
- Type parameters
- <T>
Base interface of common search result properties returned from the Search.search() and Search.suggest() methods.
BaseSearchResponse
- Type parameters
- <T>
Base interface of common response properties returned from the Search.search() and Search.suggest() methods.
activeSourceIndex
- Type
- number
The index of the source from which suggestions are obtained. This value is -1 when all sources are selected.
SearchResults
The array of results returned from the Search.search().
- Supertypes
- BaseSearchResults<SearchResult>
SuggestResults
The array of results returned from the Search.suggest().
- Supertypes
- BaseSearchResults<SuggestResult>
SearchResponse
When resolved, returns this response after calling Search.search().
- Supertypes
- BaseSearchResponse<SearchResults>
SuggestResponse
When resolved, returns this response after calling Search.suggest().
- Supertypes
- BaseSearchResponse<SuggestResults>
SearchItem
- Type
- SuggestResult | string | Point | number[] | Graphic
SearchDefaultSymbols
point
- Type
- SimpleMarkerSymbol | PictureMarkerSymbol | PointSymbol3D | TextSymbol | CIMSymbol | WebStyleSymbol
A SimpleMarkerSymbol, PictureMarkerSymbol, PointSymbol3D, TextSymbol, CIMSymbol, or WebStyleSymbol used for representing the point geometry that is being drawn for the search result. SimpleMarkerSymbol may also be used to symbolize point features in a SceneView. However, it is recommended you use PointSymbol3D instead.
polygon
- Type
- SimpleFillSymbol | PolygonSymbol3D | CIMSymbol
A SimpleFillSymbol, PolygonSymbol3D, or CIMSymbol used for representing the polygon geometry that is being drawn for the search result. SimpleFillSymbol may also be used to symbolize polygon features in a SceneView. However, it is recommended you use PolygonSymbol3D instead.
polyline
- Type
- SimpleLineSymbol | LineSymbol3D | CIMSymbol
A SimpleLineSymbol, LineSymbol3D, or CIMSymbol used for representing the polyline geometry that is being drawn for the search result. SimpleLineSymbol may also be used to symbolize polyline features in a SceneView. However, it is recommended you use LineSymbol3D instead.
SourcesHandler
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| options | The options object. | |
- Returns
- Collection<SupportedSearchSource>
SourcesHandlerOptions
SearchGeometry
- Type
- Extent | Multipoint | Point | Polygon | Polyline
SearchFilter
geometry
- Type
- SearchGeometry | undefined
The filter geometry for suggests or search results. Extent is the only supported geometry when working with locator sources. See Find Address Candidates for additional information.
GetParameters
view
- Type
- MapViewOrSceneView | null | undefined
Indicates the view provided using the source.
spatialReference
- Type
- SpatialReference | undefined
Indicates the spatial reference defined by the source.
GetResultsParameters
- Supertypes
- GetParameters
suggestResult
- Type
- SuggestResult
Indicates the Suggest Result that triggered the search for a result.
GetResultsCallback
Function definition for the SearchSource.getResults property.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| params | An object that is passed as a parameter to get search results. | | |
| options | Additional options. | |
- Returns
- Promise<SearchResult[] | null | undefined>
When resolved, returns an object containing an array of search results.
GetSuggestionsCallback
Function definition for the SearchSource.getSuggestions property.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| params | An object that is passed as a parameter to get search suggestions. | | |
| options | Additional options. | |
- Returns
- Promise<SuggestResult[] | null | undefined>
When resolved, returns an object containing an array of suggest results.