Top Layer
The RadMap
control allows you to specify the layer option that will be displayed over the received Bing Maps imagery service. To specify the layer or layers, set the TopLayer
property of the BingRestMapProvider
instance. This property is of the type BingTopLayer
.
The TopLayer property is a flag enumeration and it allows you to specify more than one layer. The options that are exposed by the BingTopLayer
enumeration are as follows:
-
Basemap
—This option displays the regular road map layer with labels. This option is the default value of the TopLayer property. -
Background
—The Background option shows only base geometry layer without labels. This option does not have effect when theMode
property of the provider is set toAriel
orRoad
modes. -
Foreground
—The Foreground option displays only a label layer. This option does not have effect when theMode
property of the provider is set toAriel
orRoad
modes. -
TrafficFlow
—This option shows a traffic flow layer on top of the roads. This option does not have effect when theMode
property of the provider is set toAriel
orRoad
modes.
Setting the TopLayer property
BingRestMapProvider bingRestMapProvider = new BingRestMapProvider();
bingRestMapProvider.ApplicationId = "Bing_Map_Key";
bingRestMapProvider.Mode = MapMode.AerialOnDemand;
bingRestMapProvider.TopLayer = BingTopLayer.TrafficFlow | BingTopLayer.Background;
this.radMap.Provider = bingRestMapProvider;
Dim bingRestMapProvider As BingRestMapProvider = New BingRestMapProvider()
bingRestMapProvider.ApplicationId = "Bing_Map_Key"
bingRestMapProvider.Mode = MapMode.AerialOnDemand
bingRestMapProvider.TopLayer = BingTopLayer.TrafficFlow Or BingTopLayer.Background
Me.radMap.Provider = bingRestMapProvider
RadMap with TopLayer property set to BingTopLayer.TrafficFlow and BingTopLayer.Background
Modifying the values of the
TopLayer
property at runtime is not fully supported. To change them during runtime, create a new instance of theBingRestMapProvider
class and set the new values to the TopLayer property.
The following scenarios of the TopLayer options are not supported:
Basemap
andBackground
Basemap
andForeground
Buildings
option