> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# IGeoService

- Package: [@gooddata/sdk-backend-spi](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/index.md)
- Kind: interface
- Stability: alpha
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-backend-spi/src/geo/index.ts

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Service allowing access to geo location assets (styles, tiles, glyphs) and management of custom geo collections.

**Signature:**

```typescript
export interface IGeoService 
```

## Methods

| Method | Description |
| --- | --- |
| [collections()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.igeoservice/index.md#igeoservicecollections) | **_(ALPHA)_** Returns service for managing custom geo collections. |
| [getAsset(url, options)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.igeoservice/index.md#igeoservicegetasset) | **_(ALPHA)_** Loads a single asset referenced by a style document (vector tile, glyph range, sprite sheet) with the credentials of the current session. |
| [getDefaultStyle(params)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.igeoservice/index.md#igeoservicegetdefaultstyle) | **_(ALPHA)_** Loads the default MapLibre style configured for the authenticated organization. |
| [getDefaultStyleSpriteIcons()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.igeoservice/index.md#igeoservicegetdefaultstylespriteicons) | **_(ALPHA)_** Loads icon names from the sprite sheet used by the default geo style. |
| [getStyleById(styleId, params)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.igeoservice/index.md#igeoservicegetstylebyid) | **_(ALPHA)_** Loads the MapLibre style for a specific style identifier. |
| [getStyles()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.igeoservice/index.md#igeoservicegetstyles) | **_(ALPHA)_** Lists all available map styles. |

## Method details

### IGeoService.collections()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Returns service for managing custom geo collections.

**Signature:**

```typescript
collections(): IOrganizationGeoCollectionsService;
```
**Returns:**

[IOrganizationGeoCollectionsService](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.iorganizationgeocollectionsservice/index.md)

### IGeoService.getAsset()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Loads a single asset referenced by a style document (vector tile, glyph range, sprite sheet) with the credentials of the current session.

**Signature:**

```typescript
getAsset(url: string, options?: IGeoAssetOptions): Promise<IGeoAsset>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| url | string | URL of the asset, as it appears in the style document |
| options | [IGeoAssetOptions](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.igeoassetoptions/index.md) | _(Optional)_ response type and abort signal |

**Returns:**

Promise&lt;[IGeoAsset](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.igeoasset/index.md)&gt;

#### Remarks

Only the path of the URL is loaded, from the backend this service is bound to; the origin found in the URL is never contacted. Rejects a URL for which [isGeoAssetUrl()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.isgeoasseturl/index.md) does not hold.

### IGeoService.getDefaultStyle()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Loads the default MapLibre style configured for the authenticated organization.

**Signature:**

```typescript
getDefaultStyle(params?: IGeoStyleParams): Promise<IGeoStyleSpecification>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| params | [IGeoStyleParams](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.igeostyleparams/index.md) | _(Optional)_ Optional query parameters. |

**Returns:**

Promise&lt;[IGeoStyleSpecification](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.igeostylespecification/index.md)&gt;

### IGeoService.getDefaultStyleSpriteIcons()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Loads icon names from the sprite sheet used by the default geo style.

**Signature:**

```typescript
getDefaultStyleSpriteIcons(): Promise<string[]>;
```
**Returns:**

Promise&lt;string[]&gt;

#### Remarks

Returns an empty array when the organization does not have a sprite sheet configured.

### IGeoService.getStyleById()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Loads the MapLibre style for a specific style identifier.

**Signature:**

```typescript
getStyleById(styleId: string, params?: IGeoStyleParams): Promise<IGeoStyleSpecification>;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| styleId | string | Style identifier (e.g. `standard-light`). |
| params | [IGeoStyleParams](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.igeostyleparams/index.md) | _(Optional)_ Optional query parameters. |

**Returns:**

Promise&lt;[IGeoStyleSpecification](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.igeostylespecification/index.md)&gt;

### IGeoService.getStyles()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Lists all available map styles.

**Signature:**

```typescript
getStyles(): Promise<IGeoStyleListItem[]>;
```
**Returns:**

Promise&lt;[IGeoStyleListItem](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.igeostylelistitem/index.md)[]&gt;
