METileProvider Class Reference

Inherits from NSObject
Declared in METileProvider.h

Overview

Provides tiles to the mapping engine at run time on an as-needed basis.

  meMapViewController

The MEMapViewController that owns this METileProvider.

@property (retain) id<METileLoader> meMapViewController

Declared In

METileProvider.h

  isAsynchronous

If set to yes, the Engine will call your requestTileAsync function and expect you to call tileLoadComplete.

@property (assign) BOOL isAsynchronous

Declared In

METileProvider.h

– isNeeded:

Returns YES if the tile is still needed by a virtual map being displayed by the mapping engine. Warning: This call is marshalled to the main thread.

- (BOOL)isNeeded:(METileProviderRequest *)meTileRequest

Declared In

METileProvider.h

– requestTile:

Called by the engine to request a tile from a synchronous tile provider.

- (void)requestTile:(METileProviderRequest *)meTileRequest

Discussion

The callee should do one of the following to the meTileRequest object: a) Get an image from somewhere and either: 1) set uiImage to a valid UIImage object 2) set nsImageData to data that is compressed PNG or JPG image data, set imageDataType appropriately 3) set pImageData to point to memory that is compressed PNG or JPG data, set imageDataSize, set imageDataType 4) set fileName to a valid PNG or JPG file

-or-

b) Set isNotAvailable = YES

The engine thread that makes this call will block until this function returns.

Declared In

METileProvider.h

– requestTiles:

Called by the engine to request an array of tiles from a synchronous tile provider. The callee should do one of the following to each METileRequest objects in the meTileRequests array: a)set uiImage to a valid UIImage object b)set nsImageData to data that is compressed PNG or JPG image data, set imageDataType appropriately b)set pImageData to point to memory that is compressed PNG or JPG data, set imageDataSize, set imageDataType c)set fileName to a valid PNG or JPG file d)set isNotAvailable = YES The engine thread that makes this call will block until this function returns.

- (void)requestTiles:(NSArray *)meTileRequests

Declared In

METileProvider.h

– requestTileAsync:

Called by the engine to request a tile from an asynchronous tile provider. The callee should do one of the following to the meTileRequest object: a)set uiImage to a valid UIImage object b)set nsImageData to data that is compressed PNG or JPG image data, set imageDataType appropriately b)set pImageData to point to memory that is compressed PNG or JPG data, set imageDataSize, set imageDataType c)set fileName to a valid PNG or JPG file d)set isNotAvailable = YES

- (void)requestTileAsync:(METileProviderRequest *)meTileRequest

Discussion

The engine thread that makes this call will not block waiting on this function.

The callee should call tileLoadComplete passing the meTileRequest back to the engine when the tile is loaded.

Declared In

METileProvider.h

– requestTilesAsync:

Called by the engine to request an array of tiles from an asynchronous tile provider. The callee should do one of the following to each meTileRequest object in the meTileRequests array: a)set uiImage to a valid UIImage object b)set nsImageData to data that is compressed PNG or JPG image data, set imageDataType appropriately b)set pImageData to point to memory that is compressed PNG or JPG data, set imageDataSize, set imageDataType c)set fileName to a valid PNG or JPG file d)set isNotAvailable = YES The engine thread that makes this call will block until this function returns.

- (void)requestTilesAsync:(NSArray *)meTileRequests

Declared In

METileProvider.h

– tileLoadComplete:

This is provided as a convenience method and simply calls the MEMapViewController’s tileLoadComplete function.

- (void)tileLoadComplete:(METileProviderRequest *)meTileRequest

Declared In

METileProvider.h

– addActiveRequest:withId:

Convenience method for managing an array of URL request objects.

- (void)addActiveRequest:(id)request withId:(id)requestId

Declared In

METileProvider.h

– removeActiveRequestWithId:

Convenience method for managing an array of URL request objects.

- (void)removeActiveRequestWithId:(id)requestId

Declared In

METileProvider.h

– getActiveRequestWithId:

Convenience method for managing an array of URL request objects.

- (id)getActiveRequestWithId:(id)requestId

Declared In

METileProvider.h

– getAllActiveRequests

Convenience object for managing an array of URL request objects.

- (NSArray *)getAllActiveRequests

Declared In

METileProvider.h