---
title: "url(forTilePath:)"
framework: mapkit
role: symbol
role_heading: Instance Method
path: "mapkit/mktileoverlay/url(fortilepath:)"
---

# url(forTilePath:)

Returns the URL to use to access the specified tile.

## Declaration

```swift
func url(forTilePath path: MKTileOverlayPath) -> URL
```

## Parameters

- `path`: The path structure that identifies the specific tile you want. This structure incorporates the tile’s x-y coordinate at a given zoom level and scale factor.

## Return Value

Return Value The URL to use to retrieve the tile.

## Discussion

Discussion The default implementation of this method uses the template string you provide at initialization time to build a URL to the specified tile image. Subclasses can override this method and use a different scheme to provide URLs for tiles. You can locate the tiles either on a local file system or on a remote server.

## See Also

### Related Documentation

- [init(urlTemplate:)](mapkit/mktileoverlay/init(urltemplate:)-9s8h7.md)

### Customizing the loading of tiles

- [urlTemplate](mapkit/mktileoverlay/urltemplate.md)
- [loadTile(at:result:)](mapkit/mktileoverlay/loadtile(at:result:).md)
- [MKTileOverlayPath](mapkit/mktileoverlaypath.md)
