Online Maps  v3
OnlineMapsTileManager Class Reference

Manages map tiles More...

Public Member Functions

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

Static Public Member Functions

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

Static Public Attributes

static int maxTileDownloads = 5
 The maximum number simultaneously downloading tiles. More...
 
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. More...
 
static Action OnPreloadTiles
 The event occurs after generating buffer and before update control to preload tiles for tileset. More...
 
static Action< OnlineMapsTileOnPrepareDownloadTile
 This event is used in preparation for loading a tile. More...
 
static Action< OnlineMapsTileOnStartDownloadTile
 An event that occurs when loading the tile. Allows you to intercept of loading tile, and load it yourself. More...
 
static Action< OnlineMapsTileOnTileLoaded
 This event is occurs when a tile is loaded. More...
 

Properties

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

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

◆ Reset()

void OnlineMapsTileManager.Reset ( )

Reset state of tile manager and dispose all tiles

◆ StartDownloading()

void OnlineMapsTileManager.StartDownloading ( )

Start next downloads (if any).

◆ StartDownloadTile()

static void OnlineMapsTileManager.StartDownloadTile ( OnlineMapsTile  tile)
static

Starts downloading of specified tile.

Parameters
tileTile to be downloaded.

Member Data Documentation

◆ maxTileDownloads

int OnlineMapsTileManager.maxTileDownloads = 5
static

The maximum number simultaneously downloading tiles.

◆ OnLoadFromCache

Action<OnlineMapsTile> OnlineMapsTileManager.OnLoadFromCache
static

This event is used to load a tile from the cache. Use this event only if you are implementing your own caching system.

◆ OnPreloadTiles

Action OnlineMapsTileManager.OnPreloadTiles
static

The event occurs after generating buffer and before update control to preload tiles for tileset.

◆ OnPrepareDownloadTile

Action<OnlineMapsTile> OnlineMapsTileManager.OnPrepareDownloadTile
static

This event is used in preparation for loading a tile.

◆ OnStartDownloadTile

Action<OnlineMapsTile> OnlineMapsTileManager.OnStartDownloadTile
static

An event that occurs when loading the tile. Allows you to intercept of loading tile, and load it yourself.

◆ OnTileLoaded

Action<OnlineMapsTile> OnlineMapsTileManager.OnTileLoaded
static

This event is occurs when a tile is loaded.

Property Documentation

◆ dTiles

Dictionary<ulong, OnlineMapsTile> OnlineMapsTileManager.dTiles
get

Dictionary of tiles

◆ map

OnlineMaps OnlineMapsTileManager.map
get

Reference to the map

◆ tiles

List<OnlineMapsTile> OnlineMapsTileManager.tiles
getset

List of tiles