Export (0) Print
Expand All

Map Class

Bing
Represents the default map class.

Namespace: Microsoft.Maps.MapControl.WPF
Assembly: Microsoft.Maps.MapControl.WPF (in Microsoft.Maps.MapControl.WPF)

Visual Basic
Dim instance As Map

'Declaration
Public Class Map
	Inherits MapCore

<Window x:Class="WPFTestApplication.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:m="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF">
    <Grid x:Name="LayoutRoot" Background="White">
        <m:Map CredentialsProvider="INSERT_YOUR_BING_MAPS_KEY" Mode=”AerialWithLabels” Center="37.806029,-122.407007" ZoomLevel="16"/>
    </Grid>
</Window>
//Set the map mode to Aerial with labels
myMap.Mode = new AerialMode(true);
'Set the map mode to Aerial with labels
myMap.Mode = New AerialMode(True)

Use the Mode property to set the map view to Aerial, Road (default) or AerialWithLabels.


System.Object
   System.Windows.Threading.DispatcherObject
     System.Windows.DependencyObject
       System.Windows.Media.Visual
         System.Windows.UIElement
           System.Windows.FrameworkElement
             System.Windows.Controls.Control
               Microsoft.Maps.MapControl.WPF.MapCore
                Microsoft.Maps.MapControl.WPF.Map

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Target Platforms

Show:
© 2014 Microsoft