VETileSourceSpecification.TileSource Property

You are not viewing the latest version of the AJAX control. Bing Maps AJAX V7 is the recommended JavaScript control for Bing Maps. If you need this documentation, it is available in as a CHM or PDF download.

Specifies the location of the tiles.

VETileSourceSpecification.TileSource = value;

Remarks

The value you specify for the TileSource property must be a valid URL. However, you can use 3 variables in the URL to specify the map mode with which to associate tiles, the number of servers that host the tiles, and a variable to retrieve the individual file names of tiles. The variables you can use are:

  • %1—this parameter specifies the map style to associate with your customer tiles. For example, if your tile file names begin with "r", the custom tiles will only be displayed if the map style is set to "road". Valid values are r, h, and a.

  • %2—if you are using more than one server for load-balancing, this parameter is used in conjunction with the VETileSourceSpecification.NumServers Property to cycle through the tile servers.

  • %4—the quadkey of the tile. This variable cycles through the file names.

For example, suppose you have three servers named TileServer0, TileServer1, and TileServer2 that host your tiles. You have a set of custom tiles that you only want to display when the map style is set to aerial. The tile names follow the standard Bing Maps naming convention, are preceded by the letter a, and are all .png files (for example, "a00245676.png"). You should set the TileSource property to https://TileServer%2/MyTiles/%1%4.png and the VETileSourceSpecification.NumServers Property to 3.

The %2 variable cycles through integer values, beginning with 0 and ending after the number of cycles that the NumServers property specifies. The %4 variable uses the standard Bing Maps naming convention. The %1 variable filters the results so that tiles will only display when the map style is set to aerial.

See Also

Other Resources

Bing Maps Tile System