Export (0) Print
Expand All

TileSource Class

Retrieves the URI for a tile based on its zoom level and tile position.

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

Visual Basic
Dim instance As TileSource

public class TileSource : INotifyPropertyChanged

This sample code uses the TileSource class to create a map tile layer and adds the map layer 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

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


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

© 2015 Microsoft