New to Telerik UI for WPFStart a free 30-day trial

Open street base map source.

Definition

Namespace:Telerik.Windows.Controls.Map

Assembly:Telerik.Windows.Controls.DataVisualization.dll

Syntax:

C#
public class OsmTileMapSource : TiledMapSource, IMapSource

Inheritance: objectMultiScaleTileSourceTiledMapSourceOsmTileMapSource

Derived Classes: OpenStreetCycleSourceOpenStreetCycleTransportSourceOpenStreetHumanitarianSourceOpenStreetMapnikSourceOpenStreetOsmarenderSourceOsmBasedMapSource...

Implements: IMapSource

Inherited Members TiledMapSource.OpacityPropertyTiledMapSource.CacheTile(int, int, int, Uri, DateTime, byte[])TiledMapSource.IsLevelSupported(int)TiledMapSource.ConvertTileToZoomLevel(int)TiledMapSource.ConvertZoomToTileLevel(int)TiledMapSource.GetCachedTileName(int, int, int)TiledMapSource.GetCachedTile(int, int, int)TiledMapSource.GetCachedTileAsync(int, int, int, Action<byte[]>)TiledMapSource.GetTileLayers(int, int, int, IList<object>)TiledMapSource.IsValidTileLevel(int)TiledMapSource.InvalidateNullTiles()TiledMapSource.RaiseInitializeCompleted()TiledMapSource.RaiseInitializationFaulted(string, Exception)TiledMapSource.CacheStorageTiledMapSource.CultureTiledMapSource.IsTileCachingEnabledTiledMapSource.OpacityTiledMapSource.UniqueIdTiledMapSource.MinZoomLevelTiledMapSource.MaxZoomLevelTiledMapSource.InitializeCompletedTiledMapSource.InitializationFaultedMultiScaleTileSource.InvalidateTileLayer(int, int, int, int)MultiScaleTileSource.SetTileCacheSize(int)MultiScaleTileSource.OnHttpAuthenticationRequired(Uri, string, Dictionary<string, string>)MultiScaleTileSource.RequestCredentialsMultiScaleTileSource.WebHeaders...

Constructors

Initializes a new instance of the OsmTileMapSource class with API key.

C#
protected OsmTileMapSource(string tileUrlFormat, string key)
Parameters:tileUrlFormatstring

Format string for the tile renderer.

keystring

The API key for Cycle/Transport maps.

Initializes a new instance of the OsmTileMapSource class.

C#
protected OsmTileMapSource(string tileUrlFormat, string[] tilePathPrefixes, int maxZoomLevel = 18)
Parameters:tileUrlFormatstring

Format string for the tile renderer.

tilePathPrefixesstring[]

Path prefixes for tile URL.

maxZoomLevelint

Optional max zoom level. Default value for OSM is 18.

Initializes a new instance of the OsmTileMapSource class.

C#
protected OsmTileMapSource(string tileUrlFormat)
Parameters:tileUrlFormatstring

Format string for the tile renderer.

Fields

Default max zoom level for OpenStreet Maps.

C#
public const int DefaultMaxZoomLevel = 18

Properties

The API key needed for Transport and Cycle modes of OpenStreetMap.

C#
public string APIKey { get; set; }

Methods

Gets the image URI.

C#
protected override Uri GetTile(int tileLevel, int tilePositionX, int tilePositionY)
Parameters:tileLevelint

Tile level.

tilePositionXint

Tile X.

tilePositionYint

Tile Y.

Returns:

Uri

URI of image.

Overrides: TiledMapSource.GetTile(int, int, int)

Initialize provider.

C#
public override void Initialize()

Overrides: TiledMapSource.Initialize()

Validates loaded uri to tile position. Should be overridden if the provider loads the same tile from different http addresses.

C#
protected override bool IsValidCacheUri(int tileLevel, int tilePositionX, int tilePositionY, Uri uri)
Parameters:tileLevelint

The MSI tile Level.

tilePositionXint

The number of tiles from the left (0 based) for this tile level.

tilePositionYint

The number of tiles from the top (0 based) for this tile level.

uriUri

Uri.

Returns:

bool

True if the loaded uri is valid.

Overrides: TiledMapSource.IsValidCacheUri(int, int, int, Uri)