Export (0) Print
Expand All

MapTileLayer class

Bing

Represents a map tile layer.

Constructor

Definition Description

MapTileLayer()

Initializes a new instance of the MapTileLayer class.

Public Properties

Name Type Description

Bounds

LocationRectCollection

Gets or sets the areas on the tile layer that are visible.

An empty collection (default) displays the tile layer everywhere.

Opacity

double

Gets or sets the opacity of the tile layer, defined by a double between 0 (not visible) and 1.

FillMissingTiles

bool

Gets or sets whether tiles that are not available at the requested zoom level are displayed using the nearest zoom level available.

TileSource

string

Gets or sets the URL that defines the source of the tiles.

Do not use this callback event function if you are using the GetTileUri event and callback function.

MinZoomLevel, MaxZoomLevel

double

Gets or sets the minimum and maximum zoom level to display in the tile layer.

The default values are 1 and 20.

Visible

bool

Gets or sets whether the tile layer is shown.

The default is true.

ZIndex

int

Gets or sets the z-index of the tile layer with respect to other items on the map.

Events

Name Arguments Description

GetTileUri

GetTileUriEventArgs

Occurs when a map tile is requested and returns the map tile URL.

Do not use this callback event function if you are using the TileSource property.

TileDownloadCompleted

TileDownloadedEventArgs

Occurs when the all map tiles for the current view are downloaded.

Code Examples

Create a map tile layer and add it to the map tile layer collection (MapTileLayerCollection) of the map.

MapTileLayer tileLayer = new MapTileLayer();
tileLayer.TileSource = "http://www.microsoft.com/maps/isdk/ajax/layers/lidar/{quadkey}.png";
map.TileLayers.Add(tileLayer);
map.SetView(new Location(48.03, -122.42), 11, MapAnimationDuration.None);

A tile source can have {subdomain} and {quadkey} placeholders. When the tile layer source is created, {subdomain} is replaced by a value from zero (0) to three (3) and is used to distribute requests across multiple servers. Similarly, {quadkey} is replaced by the quadkey. A quadkey uniquely identifies single tiles at particular levels of detail. For information about quadkeys, see Bing Maps Tile System.

Show:
© 2014 Microsoft