MapTileLayer Constructor ()
Bing
Initializes a new instance of the MapTileLayer class.
Assembly: Microsoft.Maps.MapControl.WPF (in Microsoft.Maps.MapControl.WPF.dll)
The following example
The following example shows how to add a map tile layer to a map. For the complete example, see Adding Tile Overlays to the Map.
private void AddTerrainTileOverlay() { // 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; }
Show: