TileSource Class

Bing
 

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.dll)

System.Object
  Microsoft.Maps.MapControl.WPF.TileSource

public class TileSource : INotifyPropertyChanged

NameDescription
System_CAPS_pubmethodTileSource()

Initializes a new instance of the TileSource class.

System_CAPS_pubmethodTileSource(String)

Initializes a new instance of the TileSource class.

NameDescription
System_CAPS_pubpropertyUriFormat

Gets or sets the format used to create the URI.

System_CAPS_pubpropertyVisibility

Gets or sets the visibility of the tile.

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetSubdomain(QuadKey)

Retrieves the sub-domain for the tile identified by the specified quad key.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodGetUri(Int32, Int32, Int32)

Retrieves the URI for the tile specified by the given x, y coordinates and zoom level.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethodOnPropertyChanged(String)

Enables the ability to provide custom handling when a property of the tile source changes.

System_CAPS_pubmethodSetSubdomains(String[][])

Sets a matrix that represents sub-domains.

System_CAPS_pubmethodToString()

(Inherited from Object.)

NameDescription
System_CAPS_pubfieldSystem_CAPS_staticQuadKeyUriFragment

Specifies the piece of the URI that is the quad key.

System_CAPS_pubfieldSystem_CAPS_staticSubdomainUriFragment

Specifies the piece of the URI that is the sub-domain.

System_CAPS_pubfieldSystem_CAPS_staticUriSchemeUriFragment

Specifies the pieces of the URI that specify the URI scheme.

NameDescription
System_CAPS_pubeventPropertyChanged

Occurs when a property of the tile source changes.

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
    tileLayer.TileSource=tileSource;

    // Add the map layer to the map
    if (!MapTileOverlay.Children.Contains(tileLayer))
    {
        MapTileOverlay.Children.Add(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.

Return to top
Show: