Bing Map Control Performance

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.

To give end users the best possible performance, Microsoft Bing Maps AJAX Control 6.3 offers the following improvements.

Core Functionality Version

Both full functionality and core functionality versions of the Bing Maps AJAX Control 6.3 are available. If you do not need enhanced map features, you can improve the performance of your application by using the core version of the map control. See the Using the Core Map Control topic for more information. Geocoding and routing capabilities are available from the Bing Maps REST API, which you can use in conjunction with the core map control as described in the Using the REST Services with the Core Map Control topic.

Quicker Content Delivery with Advanced Network Technology

Microsoft Content Delivery Network (CDN) support. The addition of CDN to the Bing Maps core infrastructure has improved delivery speeds of Bing Maps content up to 82%. CDN is a key pillar of Microsoft’s cloud computing strategy and is one of the primary investments the Bing Maps Platform team has made to increase overall platform performance. CDN is comprised of multiple worldwide datacenters that allow Microsoft to host Bing Maps content closer to end users.

To use CDN, set the map control src reference to the CDN URL, as demonstrated in the code below.

<script charset="UTF-8" type="text/javascript" src="https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.3&mkt=en-us"></script>

Note

The map control found at https://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.3 does not use CDN, but will remain available for backwards compatibility.

Faster Rendering of Map Details

Add custom layer method. The VEMap.AddCustomLayer Method quickly adds custom data to the map.

Add bulk pushpins. The Bing Maps AJAX Control 6.3 allows you to bulk add pushpins to the map. The time to add these pushpins to the map is close to half the time it takes to add these pushpins using the traditional method. The code below demonstrates this feature.

// Create an array with a large number of pushpins:
var center = map.GetCenter(); 
var shapes = new Array();
for (i=0 ; i < 150; ++i)
{
   var shape = new VEShape(VEShapeType.Pushpin, new VELatLong(center.Latitude + Math.random()*20 - 10, center.Longitude + Math.random()*20 - 10));
   shapes.push(shape); 
}

// Create an empty shape layer and add it to the map:
var shapeLayer = new VEShapeLayer();
map.AddShapeLayer(shapeLayer);

// Add the array of pushpins to the shape layer:
shapeLayer.AddShape(shapes);

Route rendering optimization. The Bing Maps AJAX Control 6.3 contains logic to optimize by zoom level the number of route points needed to display a route on the map. When the map is zoomed out, the route is rendered with fewer points.

Tip

In addition to the map control performance features above, you can further improve the performance of your web page by following tips in the Performance and Load Testing in Bing Maps article in the Bing Maps Articles.

See Also

Concepts

Displaying a Map Using JavaScript