TileLoadFailedEventArgs¶
Namespace: ThinkGeo.Core
A tile that could not be loaded: the request failed, timed out or returned an error, the feature source threw while the tile was cut, or the bytes would not decode. The tile is left out and whatever lies underneath it shows; the map does not throw. Raised through GpuBasemap.TileLoadFailed, on the UI thread. https://community.thinkgeo.com/t/wmsrastertilesource-wmtsrastertilesource-and-authentication/12470
public sealed class TileLoadFailedEventArgs : System.EventArgs
Inheritance object → EventArgs → TileLoadFailedEventArgs
Properties¶
TileSize¶
The tile's size on screen, in device pixels, at the moment it failed - what a picture drawn in its place is stretched to. An TileLoadFailedEventArgs.Image drawn at this size shows one pixel to one; the default drawing is made at it. 0 for a source that could not be opened, which has no tile.
public int TileSize { get; }
Property Value¶
DevicePixelRatio¶
Device pixels per CSS pixel on the map's display, so text drawn into TileLoadFailedEventArgs.Image can be sized the way the map's own labels are: 12 CSS pixels is 12 times this.
public float DevicePixelRatio { get; }
Property Value¶
Source¶
The source the tile belongs to - the RasterTileSource or IVectorTileSource object the style was given.
public object Source { get; }
Property Value¶
SourceName¶
The name the style knows the source by; null when the map was opened over a plain list of sources rather than a style that names them.
public string SourceName { get; }
Property Value¶
Kind¶
Whether an image tile or a data tile failed.
public TileLoadKind Kind { get; }
Property Value¶
Zoom¶
The tile's zoom level; -1 when the source itself could not be opened and no tile of it was asked for - a WMTS whose grid comes from the capabilities it could not fetch. A source with a grid of its own fails tile by tile instead.
public int Zoom { get; }
Property Value¶
X¶
The tile's column; -1 with a TileLoadFailedEventArgs.Zoom of -1.
public long X { get; }
Property Value¶
Y¶
The tile's row; -1 with a TileLoadFailedEventArgs.Zoom of -1.
public long Y { get; }
Property Value¶
Exception¶
What went wrong.
public Exception Exception { get; }
Property Value¶
Retry¶
Whether the tile is asked for again; true by default, for a raster tile and a vector tile alike. The map draws on demand and asks only when it draws: the next pan, zoom or refresh that still has the tile in view asks for it again, 3 seconds after the failure at the soonest - a small pan is enough, once the server or the network is back - and a map nobody moves asks nothing. A tile that fails is never kept in a tile cache. Set false to stop a tile being asked for again while the view still needs it; it is asked for afresh once the view has left it and come back, or its source is refreshed.
public bool Retry { get; set; }
Property Value¶
ShowOnMap¶
Whether the failure is drawn in the tile's place: a translucent tile with a cross and the message, the classic layers' DrawException as a tile. False by default - the tile is left out and what is underneath shows. The drawing stays until a retry brings the tile, the view leaves it, or the source is refreshed. A source that could not be opened (TileLoadFailedEventArgs.Zoom of -1) has no tile to draw in. Set TileLoadFailedEventArgs.Image to draw your own picture instead.
public bool ShowOnMap { get; set; }
Property Value¶
Image¶
A picture to draw in the tile's place - the classic DrawExceptionCore, as an image - stretched to the tile; draw it square for it to show as drawn. Null with TileLoadFailedEventArgs.ShowOnMap set draws the default; null without it draws nothing.
public GeoImage Image { get; set; }