MapTileLayer Constructor ()

Bing
 

Initializes a new instance of the MapTileLayer class.

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

Public Sub New

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 Sub AddTerrainTileOverlay()

    ' Creates a new map layer to add the tile overlay to.
    tileLayer = New MapTileLayer()

    ' The source of the overlay.
    Dim tileSource As New TileSource()
    tileSource.UriFormat = "{UriScheme}://ecn.t0.tiles.virtualearth.net/tiles/r{quadkey}.jpeg?g=129&mkt=en-us&shading=hill&stl=H"

    ' Adds the tile overlay to the map layer
    tileLayer.TileSource = tileSource

    ' Adds the map layer to the map
    If Not MapTileOverlay.Children.Contains(tileLayer) Then
        MapTileOverlay.Children.Add(tileLayer)
    End If
    tileLayer.Opacity = tileOpacity
End Sub

Return to top
Show: