MapControl.Layers Property
Provides access to the collection of layers to be displayed within the MapControl.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v21.2.dll
NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Map
Declaration
Property Value
Type | Description |
---|---|
LayerCollection | A LayerCollection object containing map layers. |
Example
This example demonstrates how to connect to the Bing Maps using the BingMapDataProvider object.
Note that if you run this sample as is, you will get a warning message saying that the specified Bing Maps key is invalid. To learn more about Bing Map keys, please refer to the How to: Get a Bing Maps Key tutorial.
mapControl1.Layers.Add(new ImageLayer() {
DataProvider = new BingMapDataProvider() {
BingKey = "YOUR BING KEY",
Kind = BingMapKind.Road
}
});
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Layers property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.