|
CartoType API
|
#include <cartotype_tile_accessor.h>
Classes | |
| class | MTileNameProvider |
Public Member Functions | |
| CMapDataBase * | NewDataBase (TResult &aError, MInputStream &) |
| CT_IMPORT CMapDataBase * | NewTileDataBase (TResult &aError, const char *aTileNameFormat, const char *aZoomLevels, MTileNameProvider *aTileNameProvider=NULL) |
Static Public Member Functions | |
|
static CT_IMPORT CTileDataAccessor * | New (TResult &aError) |
A tile data accessor provides the data for the Mercator-projected square tiles used by CTileServer. It accesses CTM1 files, choosing the smallest file covering the requested data. It returns data from a single CTM1 file only, meaning that the caller (intended to be CTileServer) must set the bounding box of the data it requests accordingly.
| CMapDataBase* CartoType::CTileDataAccessor::NewDataBase | ( | TResult & | aError, |
| MInputStream & | |||
| ) | [inline, virtual] |
It is not possible to create a tile database from an input stream, so this function returns null and sets aError to KErrorUnimplemented.
Implements CartoType::CMapDataAccessor.
| CT_EXPORT CMapDataBase * CTileDataAccessor::NewTileDataBase | ( | TResult & | aError, |
| const char * | aTileNameFormat, | ||
| const char * | aZoomLevels, | ||
| CTileDataAccessor::MTileNameProvider * | aTileNameProvider = NULL |
||
| ) |
Create a new tile map database.
The parameter aTileNameFormat specifies the full path and filename for all tiles: the symbols z, x, and y are replaced by the zoom level and the tile x and y coordinates. The symbols z, x and y may appear more than once (so that a tilename at the end of a hierarchy of directories may itself be uniquely identified: e.g., /z/x/tilez_x_y). The format must contain at least one each of z, x and y.
If a more general method of specifying tile filenames is required, in particular if different groups of files are stored in different trees, you can supply a file name provider object as aTileNameProvider. If it is present, it is used and aTileNameFormat is ignored; it can be null if aTileNameProvider is non-null.
The parameter aZoomLevels is a string containing the space-separated zoom levels supported as CTM1 files; the database always chooses the smallest CTM1 file containing the desired zoom level. For example, CTM1 files may be available only for zoom levels 0 to 14, skipping odd-numbered levels: aZoomLevels would then be "0 2 4 6 8 10 12 14". Zoom levels in the range 0...18 inclusive are legal.
If a particular tile is not found at a zoom level declared to be available, it is sought in lower-numbered available zoom levels successively. Thus a tile set may be expanded to greater levels in some areas than in others.
1.7.5.1