Skip to main content
All docs
V25.1
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    VectorTileDataProviderBase Class

    The base class for vector tile data providers.

    Namespace: DevExpress.Xpf.Map

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

    NuGet Package: DevExpress.Wpf.Map

    #Declaration

    public abstract class VectorTileDataProviderBase :
        ImageTileDataProvider,
        IVectorTileStreamProvider,
        IDisposable

    #Remarks

    Follow the steps below to implement a provider that loads tiles from a custom source.

    • Create a provider class that implements VectorTileDataProviderBase.
    • Implement the VectorTileDataProviderBase.GetStream method so that it returns a tile as a sequence of bytes for specific coordinates in the tile grid at the specified zoom level.
    • Assign the provider 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.

      <dxm:MapControl>
          <dxm:ImageLayer>
              <local:VectorTileProvider/>
          </dxm:ImageLayer>
      </dxm:MapControl>
      
      public class VectorTileProvider : VectorTileDataProviderBase {
          public override Stream GetStream(long x, long y, long level) {
              // Your implementation here.            
          }
      }
      
    See Also