Class

MKTileOverlay

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

Declaration

@interface MKTileOverlay : NSObject

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 while 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 is 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 whose indexes 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 URLForTilePath: or loadTileAtPath:result: methods to map between the requested tile and your custom indexing scheme.

Topics

Creating a Tile Overlay

- initWithURLTemplate:

Initializes and returns a tile overlay object using the specified tile-access template.

Accessing the Tile Attributes

tileSize

The size (in pixels) of your tile images.

geometryFlipped

A Boolean value that indicates the orientation of tile indexes along the y axis.

minimumZ

The minimum zoom level supported by the tiles of this overlay object.

maximumZ

The maximum zoom level supported by the tiles of this overlay object.

canReplaceMapContent

A Boolean value that indicates whether the tile content is fully opaque.

Customizing the Loading of Tiles

URLTemplate

The template for generating tile image URLs.

- URLForTilePath:

Returns the URL to use to access the specified tile.

- loadTileAtPath:result:

Loads the specified tile asynchronously.

MKTileOverlayPath

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

Relationships

Inherits From

Conforms To

See Also

Tiled Images

MKTileOverlayRenderer

The renderer for a tile overlay that handles the drawing of bitmap images on the map surface.