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

# imageForTile

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

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

## Discussion

Set this property to a [`TileOverlayUrlTemplate`](/documentation/MapKitJS/TileOverlayUrlTemplate) to provide tiles by URL, or a [`TileOverlayImageCallback`](/documentation/MapKitJS/TileOverlayImageCallback) to provide tiles as image sources directly.

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

## Topics

[`TileOverlayUrlTemplate`](/documentation/MapKitJS/TileOverlayUrlTemplate)

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

[`TileOverlayImageCallback`](/documentation/MapKitJS/TileOverlayImageCallback)

A callback function that provides tile images 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)