VEMap.SetShapesAccuracyRequestLimit 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.

Specifies the maximum number of shapes that are accurately converted at one time when the map style is changed to birdseye.

VEMap.SetShapesAccuracyRequestLimit(max);

Parameters

Parameter Description

max

The maximum number of shapes that are accurately converted.

Remarks

By default, shapes are not subject to increased accuracy representation when the map style is set to birdseye (the default accuracy is VEShapeAccuracy.None). Use the VEMap.SetShapesAccuracy Method to improve the accuracy of shapes when setting the map style to birdseye. By default, up to 50 shapes are converted at a time. To change this value, use this method.

The examples uses the following custom images.

Bb877840.308601ce-86f6-46fc-8bfb-2d5d97688b15(en-us,MSDN.10).gifBb877840.8c503060-0bbd-4e3e-bd49-38739442678b(en-us,MSDN.10).gif

Examples

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
   <head>
      <title></title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <script type="text/javascript" src="https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.3"></script>

      <script type="text/javascript">
         var map = null;

         function GetMap()
         {
            map = new VEMap('myMap');
            map.onLoadMap = DoAfterMapLoaded;
            map.LoadMap(new VELatLong(47.6215, -122.3472), 17, VEMapStyle.Road);
         }

         function DoAfterMapLoaded()
         {
            // Show pushpins accurately,
            // User can disable by deselecting check button before selecting birdseye
            map.SetShapesAccuracy(VEShapeAccuracy.Pushpin);

            // Don't try to show extra shapes
            map.SetFailedShapeRequest(VEFailedShapeRequest.DoNotDraw);

            // Convert a max of 10 points accurately at a time
            map.SetShapesAccuracyRequestLimit(10);

            var FifthAndHarrison  = new VELatLong(47.62205, -122.34753);
            var HarrisonAndTaylor = new VELatLong(47.62205, -122.34627);
            var TaylorAndBroad    = new VELatLong(47.6217, -122.34627);
            var FifthAndBroad     = new VELatLong(47.6207, -122.34753);

            var pushpin1 = new VEShape(VEShapeType.Pushpin, FifthAndHarrison);
            pushpin1.SetCustomIcon("images/RedX16.gif");
            var pushpin2 = new VEShape(VEShapeType.Pushpin, HarrisonAndTaylor);
            pushpin2.SetCustomIcon("images/RedX16.gif");
            var pushpin3 = new VEShape(VEShapeType.Pushpin, TaylorAndBroad);
            pushpin3.SetCustomIcon("images/RedX16.gif");
            var pushpin4 = new VEShape(VEShapeType.Pushpin, FifthAndBroad);
            pushpin4.SetCustomIcon("images/RedX16.gif");

            map.AddShape(pushpin1);
            map.AddShape(pushpin2);
            map.AddShape(pushpin3);
            map.AddShape(pushpin4);
         }

         function CheckBoxClicked(cb)
         {
            var shapeAccuracy = VEShapeAccuracy.None;

            if (cb.checked)
            {
               shapeAccuracy = VEShapeAccuracy.Pushpin;
            }

            map.SetShapesAccuracy(shapeAccuracy);
         }
      </script>
   </head>
   <body onload="GetMap();">
      <div id='myMap' style="position:relative; width:600px; height:400px;"></div>

      <input id='CB1' type=checkbox checked onclick="CheckBoxClicked(this)" />
      Enable Birdseye Accuracy
      <br/>
     (you don't really notice it until you look west in birdseye by clicking the
     <img border="0" src="images/CounterClockwise.gif" width="22" height="21">
     button once).
   </body>
</html>

Remarks

The default value is 50. This method only effects pushpin locations.