.NET, WinForms, XtraMap
C#
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CS
VB
.gitattributes
.gitignore
LICENSE
Readme.md
config.json

Readme.md

How to load image tiles from another source by creating custom data provider

This example illustrates how to implement a custom provider of image tiles. For this it's necessary to create a MapDataProviderBase class descendant and assign it to the ImageTilesLayer.DataProvider property.

The sample below shows how to load image tiles from a local cache. It might be possible only if you previously downloaded a bulk of image tiles from one of the available image tile providers. For example, a list of alternative OpenStreetMap image tile providers is available here: OpenStreetMap: Tile usage policy.

Note: If you don't need to create a custom data provider and only require changing the Uri to the location of image tiles, use the OpenStreetMapDataProvider.TileUriTemplate property.