---
title: code
framework: mapkitjs
role: symbol
role_heading: Instance Property
path: mapkitjs/mapuserlocationerrorevent/code
---

# code

The code indicating why location acquisition failed.

## Declaration

```data
readonly code: number;
```

## Discussion

Discussion The error codes mirror the HTML Geolocation API’s error codes with one additional MapKit JS-specific error code:
