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

# urlTemplate

A string, or callback function, that provides the requested tile.

```
get urlTemplate(): TileOverlayUrlTemplate | TileOverlayImageCallback;
set urlTemplate(
    urlTemplate: TileOverlayUrlTemplate | TileOverlayImageCallback,
);
```

## Discussion

MapKit JS sets the `urlTemplate` in the tile overlay constructor, and accesses or overrides it on the [`TileOverlay`](/documentation/MapKitJS/TileOverlay) object directly.

## Topics

[`type TileOverlayUrlTemplate =
    | string
    | ((
          x: number,
          y: number,
          z: number,
          scale: number,
          data: any,
      ) => string | null);`](/documentation/MapKitJS/TileOverlayUrlTemplate)

A type that specifies the URL template for a tile overlay.



---

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)