Back to Devexpress

UriBasedVectorTileDataProvider Class

wpf-devexpress-dot-xpf-dot-map-dd505c28.md

latest3.5 KB
Original Source

UriBasedVectorTileDataProvider Class

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

Namespace : DevExpress.Xpf.Map

Assembly : DevExpress.Xpf.Map.v25.2.dll

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public class UriBasedVectorTileDataProvider :
    VectorTileDataProviderBase
vb
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. Note that the MapControl.Layers is a content property. You can declare layers in XAML directly after a map control’s declaration without wrapping them in opening and closing MapControl.Layers tags.
  2. Create a UriBasedVectorTileDataProvider instance and assign it to the ImageLayer.DataProvider property. Note that the ImageLayer.DataProvider is a content property. You can declare a provider in XAML directly after a layer’s declaration without wrapping it in opening and closing ImageLayer.DataProvider tags.
  3. Specify the UriBasedVectorTileDataProvider.TileUriTemplate property.
xaml
<dxm:MapControl>
    <dxm:ImageLayer>
        <dxm:UriBasedVectorTileDataProvider TileUriTemplate="D:\PbfFiles\{x}-{y}-{level}.pbf"/>
    </dxm:ImageLayer>
</dxm:MapControl>

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.

xaml
<dxm:UriBasedVectorTileDataProvider ... StyleFileUri="D:\Styles\basic-style.json"/>

Inheritance

Show 11 items

Object DispatcherObject DependencyObject Freezable MapDependencyObject MapImageDataProviderBase DevExpress.Xpf.Map.MapTileDataProviderBase ImageTileDataProvider VectorTileDataProviderBase UriBasedVectorTileDataProvider MapboxDataProvider

See Also

UriBasedVectorTileDataProvider Members

DevExpress.Xpf.Map Namespace