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.Int32
minZoomLevel
Min zoom level. |
System.Int32
maxZoomLevel
Max zoom level. |
System.Int32
tileWidth
Width of the tile. |
System.Int32
tileHeight
Height of the tile. |
Fields
OpacityProperty
Identifies the Opacity Opacity dependency property.
Declaration
public static readonly DependencyProperty OpacityProperty
Field Value
System.Windows.DependencyProperty
|
Properties
CacheStorage
Gets or sets the CacheStorage property.
Declaration
public ICacheStorage CacheStorage { get; set; }
Property Value
ICacheStorage
|
Implements
Culture
Gets or sets culture.
Declaration
public CultureInfo Culture { get; set; }
Property Value
System.Globalization.CultureInfo
|
Implements
IsTileCachingEnabled
Gets or sets the IsTileCachingEnabled property.
Declaration
public bool IsTileCachingEnabled { get; set; }
Property Value
System.Boolean
|
Implements
MaxZoomLevel
Gets maximum zoom level.
Declaration
protected int MaxZoomLevel { get; }
Property Value
System.Int32
|
MinZoomLevel
Gets minimal zoom level.
Declaration
protected int MinZoomLevel { get; }
Property Value
System.Int32
|
Opacity
Gets or sets the opacity factor.
Declaration
public double Opacity { get; set; }
Property Value
System.Double
|
Implements
UniqueId
Gets unique identifier of the map source.
Declaration
public string UniqueId { get; protected set; }
Property Value
System.String
|
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.Int32
tileLevel
The MSI tile Level. |
System.Int32
tilePositionX
The number of tiles from the left (0 based) for this tile level. |
System.Int32
tilePositionY
The number of tiles from the top (0 based) for this tile level. |
System.Uri
uri
Uri. |
System.DateTime
expires
DateTime of expires. |
System.Byte[]
tileBody
Tile body. |
Overrides
ConvertTileToZoomLevel(Int32)
Converts a tile level to a zoom level.
Declaration
protected virtual int ConvertTileToZoomLevel(int tileLevelDetail)
Parameters
System.Int32
tileLevelDetail
The tile level (2^n = pixel width). |
Returns
System.Int32
The zoom level. |
ConvertZoomToTileLevel(Int32)
Converts a zoom level to a tile level.
Declaration
protected virtual int ConvertZoomToTileLevel(int zoomLevel)
Parameters
System.Int32
zoomLevel
The zoom level. |
Returns
System.Int32
The tile level. |
GetCachedTile(Int32, Int32, Int32)
Gets the image URI.
Declaration
protected virtual Stream GetCachedTile(int tileLevel, int tilePositionX, int tilePositionY)
Parameters
System.Int32
tileLevel
Tile level. |
System.Int32
tilePositionX
Tile X. |
System.Int32
tilePositionY
Tile Y. |
Returns
System.IO.Stream
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.Int32
tileLevel
Level of the tile. |
System.Int32
tilePositionX
X-matrix coordinate of the tile. |
System.Int32
tilePositionY
Y-matrix coordinate of the tile. |
System.Action<System.Byte[]>
callback
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.Int32
tileLevel
Tile level. |
System.Int32
tilePositionX
Tile X. |
System.Int32
tilePositionY
Tile Y. |
Returns
System.String
Cache tile name. |
GetTile(Int32, Int32, Int32)
Gets the image URI.
Declaration
protected virtual Uri GetTile(int tileLevel, int tilePositionX, int tilePositionY)
Parameters
System.Int32
tileLevel
Tile level. |
System.Int32
tilePositionX
Tile X. |
System.Int32
tilePositionY
Tile Y. |
Returns
System.Uri
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.Int32
tileLevel
The MSI tile Level. |
System.Int32
tilePositionX
The number of tiles from the left (zero based) for this tile level. |
System.Int32
tilePositionY
The number of tiles from the top (zero based) for this tile level. |
System.Collections.Generic.IList<System.Object>
tileImageLayerSources
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.Int32
level
Tile level. |
Returns
System.Boolean
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.Int32
tileLevel
The MSI tile Level. |
System.Int32
tilePositionX
The number of tiles from the left (0 based) for this tile level. |
System.Int32
tilePositionY
The number of tiles from the top (0 based) for this tile level. |
System.Uri
uri
Uri. |
Returns
System.Boolean
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.Int32
tileLevel
The proposed level. |
Returns
System.Boolean
True if it is valid else false. |
RaiseInitializationFaulted(String, Exception)
Raise InitializeCompleted event.
Declaration
protected void RaiseInitializationFaulted(string uniqueId, Exception error)
Parameters
System.String
uniqueId
Unique identifier of the map source. |
System.Exception
error
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.EventHandler<InitializationFaultEventArgs>
|
InitializeCompleted
Occurs when initialization of the map source is completed.
Declaration
public event EventHandler InitializeCompleted
Event Type
System.EventHandler
|