Export (0) Print
Expand All

MapTileLayer Class

Bing
Represents a layer of image tiles on the map.

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

Visual Basic
Dim instance As MapTileLayer

public class MapTileLayer : Canvas

This sample code creates a map tile layer and adds it to the map. For more information and the complete sample, see Adding Tile Overlays to the Map.

        private void AddTileOverlay()
        {
            
            // Create a new map layer to add the tile overlay to.
            tileLayer = new MapTileLayer();
            
            // The source of the overlay.
            TileSource tileSource = new TileSource();
            tileSource.UriFormat = "{UriScheme}://ecn.t0.tiles.virtualearth.net/tiles/r{quadkey}.jpeg?g=129&mkt=en-us&shading=hill&stl=H";
            
            // Add the tile overlay to the map layer
            tileLayer.TileSource=tileSource;

            // Add the map layer to the map
            if (!MapTileOverlay.Children.Contains(tileLayer))
            {
                MapTileOverlay.Children.Add(tileLayer);
            }
            tileLayer.Opacity = tileOpacity;
        }

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.Canvas
                Microsoft.Maps.MapControl.WPF.MapTileLayer

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