Skip to main content

UriBasedVectorTileDataProvider.TileUriTemplate Property

SECURITY NOTE

Downloading image tiles passed through URLs specified by the TileUriTemplate property may create security issues. Review the following help topic and learn how to spot, analyze, and prohibit unwanted download requests:

Suppress Control Requests to Download Data from External URLs

Gets or sets a pattern to obtain tiles from a local folder path or tile server.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v23.2.dll

NuGet Package: 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"

The pattern.

Remarks

Use the following placeholders to specify the pattern:

  • {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.

Example: “D:\PbfFiles\{x}-{y}-{level}.pbf” loads tiles from the following files:

image

Example

The following example demonstrates how to use UriBasedVectorTileDataProvider to load vector tiles (in PBF format) from a local folder:

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