Skip to content
GuidesToolkitAPI

SearchProps

SearchProps = ViewProps & object

Defined in: packages/expo-arcgis-toolkit/src/Search.tsx:43

optional currentQuery?: string

The query the search starts with.

optional enableResultListView?: boolean

Shows the Toolkit’s list of results.

true

optional geoView?: RefObject<GeoViewHandle | null>

The view the search is for, which moves to the results: a <MapView>, <SceneView> or <LocalSceneView> ref.

the view the search is placed in

optional noResultsMessage?: string

Shown when nothing is found.

the Toolkit's ("No results found", localized)

optional onQueryChange?: (query) => void

Called with the query as the user types it.

string

void

optional prompt?: string

Shown in the empty field.

the Toolkit's ("Find a place or address", localized)

optional queryCenter?: "view" | { latitude: number; longitude: number; }

Where results are prioritized: 'view' for the view’s center as it moves, or a point.

none

optional repeatSearch?: boolean

Offers “Repeat search here” once the view has moved away from the results (the Toolkit’s geoViewExtent and isGeoViewNavigating, from the view).

false

optional resultMode?: "single" | "multiple" | "automatic"

How many results a search returns: one, several, or ('automatic') what the query suggests.

'automatic'

optional resultsOverlay?: RefObject<GraphicsOverlayRef | null>

The overlay the results are drawn into: a <GraphicsOverlay> ref, declared in the view. Without one, the results show in the list only, as in the Toolkit.

optional sources?: SearchSource[]

Where to search.

the Toolkit's: the world geocoder