Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

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

$
0
0

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.


Viewing all articles
Browse latest Browse all 7205

Trending Articles