---
title: "GeolocateControlOptions | 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 GeolocateControlOptions

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

type GeolocateControlOptions \= {  
    [fitBoundsOptions](#fitboundsoptions)?: [FitBoundsOptions](https://docs.maptiler.com/sdk-js/api-reference/types/FitBoundsOptions/);  
    [positionOptions](#positionoptions)?: [PositionOptions](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.PositionOptions/);  
    [showAccuracyCircle](#showaccuracycircle)?: boolean;  
    [showUserLocation](#showuserlocation)?: boolean;  
    [trackUserLocation](#trackuserlocation)?: boolean;  
}

##### Index

### Properties[](#properties)

[fitBoundsOptions?](#fitboundsoptions) [positionOptions?](#positionoptions) [showAccuracyCircle?](#showaccuracycircle) [showUserLocation?](#showuserlocation) [trackUserLocation?](#trackuserlocation)

## Properties[](#properties-1)

### `Optional`fitBoundsOptions[](#fitboundsoptions)

fitBoundsOptions?: [FitBoundsOptions](https://docs.maptiler.com/sdk-js/api-reference/types/FitBoundsOptions/)

A options object to use when the map is panned and zoomed to the user's location. The default is to use a `maxZoom` of 15 to limit how far the map will zoom in for very accurate locations.

### `Optional`positionOptions[](#positionoptions)

positionOptions?: [PositionOptions](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.PositionOptions/)

A Geolocation API [PositionOptions](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions) object.

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

`{enableHighAccuracy: false, timeout: 6000}`

### `Optional`showAccuracyCircle[](#showaccuracycircle)

showAccuracyCircle?: boolean

By default, if `showUserLocation` is `true`, a transparent circle will be drawn around the user location indicating the accuracy (95% confidence level) of the user's location. Set to `false` to disable. Always disabled when `showUserLocation` is `false`.

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

```typescript
true
```

### `Optional`showUserLocation[](#showuserlocation)

showUserLocation?: boolean

By default a dot will be shown on the map at the user's location. Set to `false` to disable.

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

```typescript
true
```

### `Optional`trackUserLocation[](#trackuserlocation)

trackUserLocation?: boolean

If `true` the `GeolocateControl` becomes a toggle button and when active the map will receive updates to the user's location as it changes.

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

```typescript
false
```
