Class TiledMapSource
Map source which provides tiles for the MultiScaleImage.
Inherited Members
Namespace: Telerik.Windows.Controls.Map
Assembly: Telerik.Windows.Controls.DataVisualization.dll
Syntax
public class TiledMapSource : MultiScaleTileSource, IMapSource
Constructors
TiledMapSource(Int32, Int32, Int32, Int32)
Initializes a new instance of the TiledMapSource class.
Declaration
protected TiledMapSource(int minZoomLevel, int maxZoomLevel, int tileWidth, int tileHeight)
Parameters
System. Min zoom level. |
System. Max zoom level. |
System. Width of the tile. |
System. Height of the tile. |
Fields
OpacityProperty
Identifies the Opacity Opacity dependency property.
Declaration
public static readonly DependencyProperty OpacityProperty
Field Value
System.
|
Properties
CacheStorage
Gets or sets the CacheStorage property.
Declaration
public ICacheStorage CacheStorage { get; set; }
Property Value
Implements
Culture
Gets or sets culture.
Declaration
public CultureInfo Culture { get; set; }
Property Value
System.
|
Implements
IsTileCachingEnabled
Gets or sets the IsTileCachingEnabled property.
Declaration
public bool IsTileCachingEnabled { get; set; }
Property Value
System.
|
Implements
MaxZoomLevel
Gets maximum zoom level.
Declaration
protected int MaxZoomLevel { get; }
Property Value
System.
|
MinZoomLevel
Gets minimal zoom level.
Declaration
protected int MinZoomLevel { get; }
Property Value
System.
|
Opacity
Gets or sets the opacity factor.
Declaration
public double Opacity { get; set; }
Property Value
System.
|
Implements
UniqueId
Gets unique identifier of the map source.
Declaration
public string UniqueId { get; protected set; }
Property Value
System.
|
Implements
Methods
CacheTile(Int32, Int32, Int32, Uri, DateTime, Byte[])
The MultiScaleImage control calls this method to possible caching tiles by provider.
Declaration
public override void CacheTile(int tileLevel, int tilePositionX, int tilePositionY, Uri uri, DateTime expires, byte[] tileBody)
Parameters
System. The MSI tile Level. |
System. The number of tiles from the left (0 based) for this tile level. |
System. The number of tiles from the top (0 based) for this tile level. |
System. Uri. |
System. DateTime of expires. |
System. Tile body. |
Overrides
ConvertTileToZoomLevel(Int32)
Converts a tile level to a zoom level.
Declaration
protected virtual int ConvertTileToZoomLevel(int tileLevelDetail)
Parameters
System. The tile level (2^n = pixel width). |
Returns
System. The zoom level. |
ConvertZoomToTileLevel(Int32)
Converts a zoom level to a tile level.
Declaration
protected virtual int ConvertZoomToTileLevel(int zoomLevel)
Parameters
System. The zoom level. |
Returns
System. The tile level. |
GetCachedTile(Int32, Int32, Int32)
Gets the image URI.
Declaration
protected virtual Stream GetCachedTile(int tileLevel, int tilePositionX, int tilePositionY)
Parameters
System. Tile level. |
System. Tile X. |
System. Tile Y. |
Returns
System. URI of image. |
GetCachedTileAsync(Int32, Int32, Int32, Action<Byte[]>)
Requests the cached tile.
Declaration
protected override void GetCachedTileAsync(int tileLevel, int tilePositionX, int tilePositionY, Action<byte[]> callback)
Parameters
System. Level of the tile. |
System. X-matrix coordinate of the tile. |
System. Y-matrix coordinate of the tile. |
System. Callback which should be called to return tile if it is available or null. |
Overrides
GetCachedTileName(Int32, Int32, Int32)
Generates cache tile name.
Declaration
protected virtual string GetCachedTileName(int tileLevel, int tilePositionX, int tilePositionY)
Parameters
System. Tile level. |
System. Tile X. |
System. Tile Y. |
Returns
System. Cache tile name. |
GetTile(Int32, Int32, Int32)
Gets the image URI.
Declaration
protected virtual Uri GetTile(int tileLevel, int tilePositionX, int tilePositionY)
Parameters
System. Tile level. |
System. Tile X. |
System. Tile Y. |
Returns
System. URI of image. |
GetTileLayers(Int32, Int32, Int32, IList<Object>)
The MultiScaleImage control calls this method to get the URI's for the base layer and all Overlays.
Declaration
protected override void GetTileLayers(int tileLevel, int tilePositionX, int tilePositionY, IList<object> tileImageLayerSources)
Parameters
System. The MSI tile Level. |
System. The number of tiles from the left (zero based) for this tile level. |
System. The number of tiles from the top (zero based) for this tile level. |
System. A reference to the object to add the layer and Overlay's URI's too. |
Overrides
Initialize()
Initialize map source.
Declaration
public virtual void Initialize()
Implements
InvalidateNullTiles()
Invalidate tiles which have not been loaded yet.
Declaration
protected void InvalidateNullTiles()
IsLevelSupported(Int32)
Indicates whether specified tile level is supported.
Declaration
public virtual bool IsLevelSupported(int level)
Parameters
System. Tile level. |
Returns
System. true if tile level is supported. false otherwise. |
Implements
IsValidCacheUri(Int32, Int32, Int32, Uri)
Validates loaded uri to tile position. Should be overridden if the provider loads the same tile from different http addresses.
Declaration
protected virtual bool IsValidCacheUri(int tileLevel, int tilePositionX, int tilePositionY, Uri uri)
Parameters
System. The MSI tile Level. |
System. The number of tiles from the left (0 based) for this tile level. |
System. The number of tiles from the top (0 based) for this tile level. |
System. Uri. |
Returns
System. True if the loaded uri is valid. |
IsValidTileLevel(Int32)
Does the supplied tile Level fall within the range of valid levels.
Declaration
protected virtual bool IsValidTileLevel(int tileLevel)
Parameters
System. The proposed level. |
Returns
System. True if it is valid else false. |
RaiseInitializationFaulted(String, Exception)
Raise InitializeCompleted event.
Declaration
protected void RaiseInitializationFaulted(string uniqueId, Exception error)
Parameters
System. Unique identifier of the map source. |
System. Initialization error. |
RaiseInitializeCompleted()
Raise InitializeCompleted event.
Declaration
protected void RaiseInitializeCompleted()
Events
InitializationFaulted
Occurs when initialization of the map source is faulted.
Declaration
public event EventHandler<InitializationFaultEventArgs> InitializationFaulted
Event Type
System.
|
InitializeCompleted
Occurs when initialization of the map source is completed.
Declaration
public event EventHandler InitializeCompleted
Event Type
System.
|