Home > @yext/search-ui-react > updateLocationIfNeeded
If the provided search intents include a 'NEAR_ME' intent and there's no existing user's location in state, retrieve and store user's location in headless state.
Signature:
export declare function updateLocationIfNeeded(searchActions: SearchActions, intents: SearchIntent[], geolocationOptions?: PositionOptions): Promise<void>;
Parameter | Type | Description |
---|---|---|
searchActions | SearchActions | |
intents | SearchIntent[] | |
geolocationOptions | PositionOptions |
Returns:
Promise<void>