<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/Map/tracksUserLocation",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "instp/mapkit.Map/tracksUserLocation"
  },
  "title" : "tracksUserLocation"
}
-->

# tracksUserLocation

A Boolean value that determines whether to center the map on the user’s location.

```
get tracksUserLocation(): boolean;
set tracksUserLocation(value: boolean);
```

## Discussion

Set this property to `true` to center the map on the user location annotation. Enabling this property automatically enables [`showsUserLocation`](/documentation/MapKitJS/Map/showsUserLocation).

Set this property to `false` to stop centering the map on the current location.

A programmatic or user-initiated change to the map’s region that moves the user location annotation off the center automatically disables [`tracksUserLocation`](/documentation/MapKitJS/Map/tracksUserLocation).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)