Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 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

MapboxDataProvider.AccessToken Property

Gets or sets the Mapbox service’s access token.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.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