VEMap.SetTileBuffer Method

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.

Sets the number of "rings" of map tiles that should be loaded outside of the visible mapview area. This is also called tile overfetching.



Parameter Description


An integer value greater than or equal to 0 that indicates the number of rings of additional tiles that should be loaded. The default is 0, and the maximum is 3.

This method can be called before VEMap.LoadMap Method to affect how tiles are loaded initially, but it can also be called at any time after the map is loaded to change the overfetch behavior.

There are performance considerations with this method. Loading more rings may improve a user's initial map panning experience, but this may initially cause the page to load more slowly.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

      <script type="text/javascript" src=""></script>

      <script type="text/javascript">
         var map = null;
         var value = 0;
         function GetMap()
            map = new VEMap('myMap');

         function SetVal(v)
            value = v;
         function SetTileBuffer()
            alert("The tile buffer has been set to " + value + 
               ".\nLarger buffer values improve panning," +
               "\nbut may also cause the page to load more slowly.");
   <body onload="GetMap();">
      <div id='myMap' style="position:relative; width:400px; height:400px;">
      <input id="btnSetBuffer" type="button" value="Set Tile Buffer" 
         onclick="SetTileBuffer()"><br />
      <form id="buffValues">
            0<input name="tbVal" type="radio" onclick="SetVal('0')" 
            1<input name="tbVal" type="radio" onclick="SetVal('1')" />&nbsp;|&nbsp;
            2<input name="tbVal" type="radio" onclick="SetVal('2')" />&nbsp;|&nbsp;
            3<input name="tbVal" type="radio" onclick="SetVal('3')" />