Contents

MKTileOverlay

An overlay that covers an area of the map with tiles of bitmap images.

Declaration

class MKTileOverlay

Overview

You use tile overlay objects to represent your own tile-based content and to coordinate the display of that content in a map view. Your tiles can supplement the underlying map content or replace it completely. A tile overlay object coordinates the loading and management of the tiles, and a corresponding MKTileOverlayRenderer object handles the actual drawing of the tiles on the map.

You can use a single tile overlay object to represent all of the tiles at one or more zoom levels of the map. The default tile overlay object uses a template string to build URLs so that it can locate the map tiles it needs. Each URL incorporates the x and y index of the map tile, the zoom level it’s intended for, and the scale factor corresponding to the screen resolution on which to display the tile. The default class lets you specify map tiles with indexes that start in either the upper-left corner or lower-left corner of the map. If you use a different indexing scheme for your tiles, you can also subclass and override the url(forTilePath:) or loadTile(at:result:) methods to map between the requested tile and your custom indexing scheme.

Topics

Creating a tile overlay

Accessing the tile attributes

Customizing the loading of tiles

Initializers

See Also

Tiled image overlays