Skip to main content
A newer version of this page is available. .

UriBasedVectorTileDataProvider.TileUriTemplate Property

Gets or sets a URI template used to obtain tiles from a local folder path or tile server.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v21.1.dll

NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Map

Declaration

[DefaultValue("@https://insert_tile_server/{level}/{x}/{y}.pbf")]
public string TileUriTemplate { get; set; }

Property Value

Type Default Description
String "@https://insert_tile_server/{level}/{x}/{y}.pbf"

A string that specifies a URI template. The default URI template is https://insert_tile_server/{level}/{x}/{y}.pbf

Remarks

Use the following placeholders to specify the TileUriTemplate:

  • {x} - Replaces a non-negative integer that is an x-coordinate of a tile in the grid.
  • {y} - Replaces a non-negative integer that is a y-coordinate of a tile in the grid.
  • {level} - Replaces a positive integer that represents the zoom level.

For example, use the “D:\PbfFiles\{x}-{y}-{level}.pbf” pattern to load tiles from the files below:

Example

This example shows how to use the UriBasedVectorTileDataProvider to load vector tiles (in PBF format) from a local directory:

ImageLayer layer = new ImageLayer();
UriBasedVectorTileDataProvider dataProvider = new UriBasedVectorTileDataProvider();            
dataProvider.TileUriTemplate = @"D:\PbfFiles\{x}-{y}-{level}.pbf";
layer.DataProvider = dataProvider;
mapControl1.Layers.Add(layer);
See Also