# serialiseUrlHash

Writes the shareable state as a location hash, for example
`#map=12.35/-26.20410/28.04730&basemap=osm-liberty`. Zoom has two decimals,
latitude and longitude five, and the bearing is a whole number in
[0, 360) that is left out when it is 0. Returns an empty string when there
is nothing to share. A view with a non-finite number, or a basemap id that
[`parseUrlHash`](https://docs.mapcairn.com/api/core/parseUrlHash.md) would reject, is left out.

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

## Signature

```ts
import { serialiseUrlHash } from "@mapcairn/core";
 
function serialiseUrlHash(value: UrlStateValue): string;
```

## Parameters

- `value` (`UrlStateValue`)

## Returns

`string`

## See also

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

Source: [packages/core/src/urlHash/urlHash.ts:174](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/urlHash/urlHash.ts#L174)
