---
title: imageForTile
framework: mapkitjs
role: symbol
role_heading: Instance Property
path: mapkitjs/tileoverlay/imagefortile
---

# imageForTile

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

## Declaration

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

## Mentioned in

MapKit JS 6 Migrating from Version 5 to Version 6

## Discussion

Discussion Set this property to a TileOverlayUrlTemplate to provide tiles by URL, or a 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 object directly.

## Topics

- [TileOverlayUrlTemplate](mapkitjs/tileoverlayurltemplate.md)
- [TileOverlayImageCallback](mapkitjs/tileoverlayimagecallback.md)

## See Also

### Customizing the tile overlay

- [data](mapkitjs/tileoverlay/data.md)
- [reload()](mapkitjs/tileoverlay/reload.md)
