Instance Method

url(forTilePath:)

Returns the URL to use to access the specified tile.

Declaration

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

The URL to use to retrieve the tile.

Discussion

The default implementation of this method uses the template string you provided 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. Tiles can be located either on a local file system or on a remote server.

See Also

Customizing the Loading of Tiles

var urlTemplate: String?

The template for generating tile image URLs.

struct MKTileOverlayPath

Use this structure to specify the index values for a single tile.