---
title: "ScaleControlOptions | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Type Alias ScaleControlOptions

The [ScaleControl](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.ScaleControl/) options object

type ScaleControlOptions \= {  
    [maxWidth](#maxwidth)?: number;  
    [unit](#unit)?: [Unit](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Unit/);  
}

##### Index

### Properties[](#properties)

[maxWidth?](#maxwidth) [unit?](#unit)

## Properties[](#properties-1)

### `Optional`maxWidth[](#maxwidth)

maxWidth?: number

The maximum length of the scale control in pixels.

#### Default Value[](#default-value)

```typescript
100
```

### `Optional`unit[](#unit)

unit?: [Unit](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Unit/)

Unit of the distance (`'imperial'`, `'metric'` or `'nautical'`).

#### Default Value[](#default-value-1)

```typescript
'metric'
```
