Online Maps v3
Loading...
Searching...
No Matches
OnlineMapsTileManager Class Reference

Manages map tiles. More...

Public Member Functions

void Add (OnlineMapsTile tile)
 Add a tile to the manager.
 
OnlineMapsTile GetTile (int zoom, int x, int y)
 Gets a tile for zoom, x, y.
 
bool GetTile (int zoom, int x, int y, out OnlineMapsTile tile)
 Gets a tile for zoom, x, y.
 
void Remove (OnlineMapsTile tile)
 Remove tile.
 
void Reset ()
 Reset state of tile manager and dispose all tiles.
 
void StartDownloading ()
 Start next downloads (if any).
 

Static Public Member Functions

static ulong GetTileKey (int zoom, int x, int y)
 Gets a tile key for zoom, x, y.
 
static void StartDownloadTile (OnlineMapsTile tile)
 Starts downloading of specified tile.
 

Static Public Attributes

static int maxTileDownloads = 5
 The maximum number simultaneously downloading tiles.
 
static Action< OnlineMapsTileOnLoadFromCache
 This event is used to load a tile from the cache. Use this event only if you are implementing your own caching system.
 
static Action OnPreloadTiles
 The event occurs after generating buffer and before update control to preload tiles for tileset.
 
static Action< OnlineMapsTileOnPrepareDownloadTile
 This event is used in preparation for loading a tile.
 
static Action< OnlineMapsTileOnStartDownloadTile
 An event that occurs when loading the tile. Allows you to intercept of loading tile, and load it yourself.
 
static Action< OnlineMapsTileOnTileLoaded
 This event is occurs when a tile is loaded.
 

Properties

Dictionary< ulong, OnlineMapsTiledTiles [get]
 Dictionary of tiles.
 
List< OnlineMapsTiletiles [get, set]
 List of tiles.
 
OnlineMaps map [get]
 Reference to the map.
 

Detailed Description

Manages map tiles.

Member Function Documentation

◆ Add()

void OnlineMapsTileManager.Add ( OnlineMapsTile tile)

Add a tile to the manager.

Parameters
tileTile

◆ GetTile() [1/2]

OnlineMapsTile OnlineMapsTileManager.GetTile ( int zoom,
int x,
int y )

Gets a tile for zoom, x, y.

Parameters
zoomTile zoom
xTile X
yTile Y
Returns
Tile or null

◆ GetTile() [2/2]

bool OnlineMapsTileManager.GetTile ( int zoom,
int x,
int y,
out OnlineMapsTile tile )

Gets a tile for zoom, x, y.

Parameters
zoomTile zoom
xTile X
yTile Y
tileTile
Returns
True - success, false - otherwise

◆ GetTileKey()

static ulong OnlineMapsTileManager.GetTileKey ( int zoom,
int x,
int y )
static

Gets a tile key for zoom, x, y.

Parameters
zoomTile zoom
xTile X
yTile Y
Returns
Tile key

◆ Remove()

void OnlineMapsTileManager.Remove ( OnlineMapsTile tile)

Remove tile.

Parameters
tileTile

◆ StartDownloadTile()

static void OnlineMapsTileManager.StartDownloadTile ( OnlineMapsTile tile)
static

Starts downloading of specified tile.

Parameters
tileTile to be downloaded.