METileDownloader Class Reference

Inherits from METileWorker : NSObject
Declared in METileDownloader.h

Overview

Downloads map tiles.

– initWithURLTemplate:subDomains:useNetworkCache:

Initialize instance for use with spherical mercator raster maps on the internet.

- (id)initWithURLTemplate:(NSString *)urlTemplate subDomains:(NSString *)subDomains useNetworkCache:(BOOL)useNetworkCache

Parameters

urlTemplate

Template for downloads. For example: If you have multiple subdomains you would use a url string like this: http://{s}.tiles.mapbox.com/v3/mymap/{z}/{x}/{y}.jpg {s} is not required, but if you do use it, make sure the subDomains parameter contains a comma delimited list of subdomains, i.e.: a,b,c,d

subDomains

Comma separate list of subdomains

Declared In

METileDownloader.h

– initWithURLTemplateCenter:urlTemplateNorth:urlTemplateSouth:subDomains:useNetworkCache:

Initialize instance for use with AltusRaster global raster tiles on the internet.

- (id)initWithURLTemplateCenter:(NSString *)urlTemplateCenter urlTemplateNorth:(NSString *)urlTemplateNorth urlTemplateSouth:(NSString *)urlTemplateSouth subDomains:(NSString *)subDomains useNetworkCache:(BOOL)useNetworkCache

Declared In

METileDownloader.h

  urlTemplateCenter

URL template string for tiles within the web mercator range of latitudes.

@property (retain) NSString *urlTemplateCenter

Declared In

METileDownloader.h

  urlTemplateNorth

URL template string for tiles north of the web mercator latitude that conform to the Altus projection.

@property (retain) NSString *urlTemplateNorth

Declared In

METileDownloader.h

  urlTemplateSouth

URL template string for tiles south of the web mercator latitude that conform to the Altus projection.

@property (retain) NSString *urlTemplateSouth

Declared In

METileDownloader.h

  subDomains

An array or sub-domain strings to round-robin requests for tiles. For example: {“a”,“b”,“c”,“d”} would indicate to round-robin request tiles from a.mytiles.com, b.mytiles.com, c.mytiles.com, and d.mytiles.com for a url template “{s}.mytiles.com”.

@property (retain) NSArray *subDomains

Declared In

METileDownloader.h

  useNetworkCache

Whether or not to use the NSURL cace.

@property (assign) BOOL useNetworkCache

Declared In

METileDownloader.h

  currentSubdomain

Current subdomain index.

@property (assign) int currentSubdomain

Declared In

METileDownloader.h

  timeOutInterval

Time in seconds to stop waiting for a tile to download.

@property (assign) int timeOutInterval

Declared In

METileDownloader.h

  httpResponse

Last http response code.

@property (assign) int httpResponse

Declared In

METileDownloader.h