# coordinateSearchResult

Turns search text into the one result for the place it names, when the text
is a coordinate pair (see [`parseCoordinates`](https://docs.mapcairn.com/api/core/parseCoordinates.md)), and `null` otherwise.
The result needs no search service, so a caller can answer it without a
request.

This is a function exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import { coordinateSearchResult } from "@mapcairn/core";
 
function coordinateSearchResult(text: string, messages: MessageCatalogue): SearchResult | null;
```

## Description

The label names the place in words, such as "Coordinates 26.20410° S,
28.04730° E", using the app's coordinate formatters and the hemisphere
letters and wording of `messages`, and it reads the letters and words of
that language in the text too. It reads back through
[`parseCoordinates`](https://docs.mapcairn.com/api/core/parseCoordinates.md) as the same place to about a metre (the label keeps
five decimals), so the box can show it after the person picks it.

## Parameters

- `text` (`string`)
- `messages` (`MessageCatalogue`)

## Returns

`SearchResult | null`

## See also

- [`MessageCatalogue`](https://docs.mapcairn.com/api/core/MessageCatalogue.md)
- [`SearchResult`](https://docs.mapcairn.com/api/core/SearchResult.md)

Source: [packages/core/src/coordinates/coordinateSearchResult.ts:36](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/coordinates/coordinateSearchResult.ts#L36)
