Export (0) Print
Expand All

MercatorMode Class

Bing
Represents the Mercator map mode.

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

Visual Basic
Dim instance As MercatorMode

public class MercatorMode : MapMode

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>
myMap.Mode = new MercatorMode();

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

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