All docs
V20.1
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

UriBasedVectorTileDataProvider Class

Provides map data from a set of PBF or MVT files.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v20.1.dll

Declaration

public class UriBasedVectorTileDataProvider :
    VectorTileDataProviderBase
Public Class UriBasedVectorTileDataProvider
    Inherits VectorTileDataProviderBase

Remarks

You can use UriBasedVectorTileDataProvider to draw a map based on a set of .PBF or .MVT files that store vector tiles in binary format.

  1. Create an image layer and add it to the MapControl.Layers collection.
  2. Create a UriBasedVectorTileDataProvider instance and assign it to the ImageLayer.DataProvider property.
  3. Specify the UriBasedVectorTileDataProvider.TileUriTemplate property.
ImageLayer layer = new ImageLayer();
UriBasedVectorTileDataProvider dataProvider = new UriBasedVectorTileDataProvider();            
dataProvider.TileUriTemplate = @"D:\PbfFiles\{x}-{y}-{level}.pbf";
layer.DataProvider = dataProvider;
mapControl1.Layers.Add(layer);

Apply a Custom Style

If a default vector tile style does not meet your requirements, you can apply a custom style. Use the VectorTileDataProviderBase.StyleFileUri property to define a path to a style file. See Vector Tile Providers: Vector Tile Styles for more information about styles.

dataProvider.StyleFileUri = new Uri(@"D:\style.json", UriKind.Absolute);
See Also