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

# data

A dictionary of custom properties to use with the URL template.

```
get data(): Record<string, any>;
set data(data: Record<string, any>);
```

## Discussion

The `data` object holds a dictionary of custom properties to fill the [`urlTemplate`](/documentation/MapKitJS/TileOverlay/urlTemplate).

- If the [`urlTemplate`](/documentation/MapKitJS/TileOverlay/urlTemplate) is a callback, MapKit JS passes the entire data object as a parameter.
- If the [`urlTemplate`](/documentation/MapKitJS/TileOverlay/urlTemplate) is a string, `data` key names should match up with the custom placeholder names. MapKit JS ignores the keys that don’t exist in the URL template string.

The default value is `{}`.

This example shows adding a customized tile overlay to a map.

```javascript
const customOverlay = new mapkit.TileOverlay("https://{subdomain}.customtileserver.com/{z}/{x}/{y}?scale={scale}&lang={lang}&imageFormat=jpg");
customOverlay.data = {
    subdomain: "staging",
    lang: mapkit.language
};
map.addTileOverlay(customOverlay);
```

---

---

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)