New to Telerik UI for WinForms? Start a free 30-day trial

Downloads map tile data asynchronously using HTTP requests and supports canceling active requests.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.RadMap.dll

Syntax:

C#
public class AzureTileDownloader : IMapTileDownloader

Inheritance: objectAzureTileDownloader

Implements: IMapTileDownloader

Constructors

Initializes a new instance of the AzureTileDownloader class.

C#
public AzureTileDownloader()

Fields

webClientsPool

Dictionary<string, HttpClient>

Tracks active HTTP clients by the quadkey of their tile.

C#
protected Dictionary<string, HttpClient> webClientsPool

Synchronizes access to the active request and URI dictionaries.

C#
protected object webClientsPoolLockObject

Stores the URI associated with each active tile request.

C#
protected Dictionary<string, Uri> webRequestCache

Properties

Gets a collection of WebHeaders that will be sent to the server with each tile download request.

C#
public WebHeaderCollection WebHeaders { get; }

Methods

Begins downloading a map tile from the specified URI for the given tile information.

C#
public virtual void BeginDownloadTile(Uri uri, TileInfo tileInfo)
Parameters:uriUri

The URI of the tile to download.

tileInfoTileInfo

The tile information associated with the download.

Implements: IMapTileDownloader.BeginDownloadTile(Uri, TileInfo)

Cancels an ongoing tile download for the specified tile.

C#
public void CancelTileDownload(TileInfo tileInfo)
Parameters:tileInfoTileInfo

The tile information to cancel the download for.

Implements: IMapTileDownloader.CancelTileDownload(TileInfo)

Fires the event.

C#
protected virtual void OnTileDownloadComplete(TileInfoEventArgs e)
Parameters:eTileInfoEventArgs

The TileInfoEventArgs instance containing the event data.

Determines whether a failed download should be performed again.

C#
protected virtual bool ShouldRetryDownload(Exception error)
Parameters:errorException

The error.

Returns:

bool

true if XXXX, false otherwise.

Events

Occurs when a tile download is complete.

C#
public event TileInfoEventHandler TileDownloadComplete

Implements: IMapTileDownloader.TileDownloadComplete