Skip to main content

MapboxDataProvider.Tileset Property

Gets or sets a tileset that the provider loads from the service.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.1.dll

NuGet Package: DevExpress.Win.Map

Declaration

[DefaultValue(MapboxTileset.Streets | MapboxTileset.Terrain)]
public MapboxTileset Tileset { get; set; }

Property Value

Type Default Description
MapboxTileset Streets | Terrain

The tileset name/names.

Available values:

Name Description
Streets

The Streets tileset.

Terrain

The Terrain tileset.

Traffic

The Traffic tileset.

Remarks

The following example shows how to load the Terrain tileset:

using DevExpress.XtraMap;
using System;
using System.Windows.Forms;

private void Form1_Load(object sender, EventArgs e) {
    ImageLayer layer = new ImageLayer();
    MapboxDataProvider provider = new MapboxDataProvider();
    provider.AccessToken = "Your access token here.";
    provider.Tileset = MapboxTileset.Terrain;
    layer.DataProvider = provider;
    mapControl1.Layers.Add(layer);
}

You can display multiple tilesets simultaneously. Tilesets are displayed in the following order:

  • Streets (displayed as the bottommost in case of multiple tilesets)
  • Terrain
  • Traffic
using DevExpress.XtraMap;
using System;
using System.Windows.Forms;

private void Form1_Load(object sender, EventArgs e) {
    ImageLayer layer = new ImageLayer();
    MapboxDataProvider provider = new MapboxDataProvider();
    provider.AccessToken = "Your access token here.";
    provider.Tileset = MapboxTileset.Streets | MapboxTileset.Terrain | MapboxTileset.Traffic;
    layer.DataProvider = provider;
    mapControl1.Layers.Add(layer);
}
See Also