Skip to main content

MapboxDataProvider.AccessToken Property

Gets or sets the Mapbox service’s access token.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.1.dll

NuGet Package: DevExpress.Win.Map

Declaration

[DefaultValue("")]
public string AccessToken { get; set; }

Property Value

Type Default Description
String String.Empty

A string that represents the access token.

Remarks

Use the AccessToken property to specify a Mapbox Service’s access token. See the access token page for more information on how to obtain the token.

Example

The following example shows how to use a MapboxDataProvider object to connect to the Mapbox Service.

private void Form1_Load(object sender, EventArgs e) {
    ImageLayer layer = new ImageLayer();
    MapboxDataProvider dataProvider = new MapboxDataProvider();

    dataProvider.AccessToken = "Your_access_token_here.";

    layer.DataProvider = dataProvider;
    mapControl1.Layers.Add(layer);
}
See Also