|
CartoType API
|
#include <cartotype_map.h>
Public Types | |
| enum | { KMinZoomLevel = 0, KMaxZoomLevel = 18 } |
Public Member Functions | |
| CT_IMPORT TResult | DrawTile (TBitmap &aBitmap, int32 aZoomLevel, int32 aTileX, int32 aTileY) |
| CMapDrawParam & | MapDrawParam () |
Static Public Member Functions | |
| static CT_IMPORT CTileServer * | New (TResult &aError, CEngine &aEngine, CMapDataBase &aDb, MInputStream &aStyleSheet, int32 aTileSizeInPixels=256, CMapDataBase *aAuxDb=NULL, MBitmapTileSource *aOverlayTileSource=NULL) |
| static CT_IMPORT TResult | DegreesToTile (double aLong, double aLat, int32 aZoomLevel, int32 &aTileX, int32 &aTileY) |
| static CT_IMPORT TResult | TileToDegrees (int32 aZoomLevel, int32 aTileX, int32 aTileY, double &aLong, double &aLat) |
A tile server draws tiles on request. Tiles are square grid-oriented map 32bpp bitmaps.
Tile coordinates address a square grid of tiles covering most of the world: in fact everything between 85.011N and 85.011S, which when projected using a spherical Mercator projection is a square.
At zoom level 0 one tile covers the whole world. At zoom level 1 there are 4 tiles, at zoom level 2 there are 16 tiles, and so on. Legal zoom levels are 0...18. At zoom level 18 each tile is about 156 metres wide at the equator.
| anonymous enum |
| CT_EXPORT TResult CTileServer::DegreesToTile | ( | double | aLong, |
| double | aLat, | ||
| int32 | aZoomLevel, | ||
| int32 & | aTileX, | ||
| int32 & | aTileY | ||
| ) | [static] |
Return the tile containing a position in degrees.
| CMapDrawParam& CartoType::CTileServer::MapDrawParam | ( | ) | [inline] |
Provide access to the CMapDrawParam object used when drawing the tiles so that layers can be enabled or disabled, etc.
| CT_EXPORT CTileServer * CTileServer::New | ( | TResult & | aError, |
| CEngine & | aEngine, | ||
| CMapDataBase & | aDb, | ||
| MInputStream & | aStyleSheet, | ||
| int32 | aTileSizeInPixels = 256, |
||
| CMapDataBase * | aAuxDb = NULL, |
||
| MBitmapTileSource * | aOverlayTileSource = NULL |
||
| ) | [static] |
Create a new tile server. aEngine is the CartoType engine. aDb is the map database which is to provide the data for the tiles. It must have data projected using the Mercator projection. aTileSizeInPixels is the width and height of the square tiles in pixels. aAuxDb, if non-null, points to an optional auxiliary database.
This function does not take ownership of aEngine, aDb, aAuxDb or aStyleSheet, which must created and kept by the caller.
| CT_EXPORT TResult CTileServer::TileToDegrees | ( | int32 | aZoomLevel, |
| int32 | aTileX, | ||
| int32 | aTileY, | ||
| double & | aLong, | ||
| double & | aLat | ||
| ) | [static] |
Return the position in degrees of the north-west corner of a tile.
1.7.5.1