MercatorMode Class
Bing Services
Represents the Mercator map mode.
Namespace: Microsoft.Maps.MapControl.WPF
Assembly: Microsoft.Maps.MapControl.WPF (in Microsoft.Maps.MapControl.WPF)
Assembly: Microsoft.Maps.MapControl.WPF (in Microsoft.Maps.MapControl.WPF)
| Visual Basic |
|---|
Dim instance As MercatorMode |
The following code samples use the Mercator mode to remove the base map tile layer. You can then create a new MapTileLayer and add your own TileSource. For more information and sample code, see Adding Tile Overlays to the Map.
<Window x:Class="MapControlInteractiveSdk.Tutorials.TileLayer.TutorialNoBaseTiles"
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" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<m:Map CredentialsProvider="InsertYourBingMapsKey" Center="48.03,-122.4" ZoomLevel="13" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="MyMap">
<!-- Set the MapMode to show no base tiles -->
<m:Map.Mode>
<m:MercatorMode/>
</m:Map.Mode>
</m:Map>
</Grid>
</Window>
You can use this mode to remove the base tile layer, and then you can add tile overlays, shapes, images or videos to one or more MapTileLayer objects. For more information and sample code, see Adding Tile Overlays to the Map.
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Panel
System.Windows.Controls.Grid
Microsoft.Maps.MapControl.WPF.MapMode
Microsoft.Maps.MapControl.WPF.MercatorMode
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Panel
System.Windows.Controls.Grid
Microsoft.Maps.MapControl.WPF.MapMode
Microsoft.Maps.MapControl.WPF.MercatorMode