In my Bing Maps V6.3 implementation, I was able to center my map around an array of points using the following code.
map.SetMapView(latlonArray);
if (map.GetZoomLevel() > 10) {
map.SetZoomLevel(10);
};
This code does not work in Bing Maps V7, and I can’t find an alternative on the web.
Note: latlonArray is simply being populated as such
var increment = 0;
$.each(json_object, function () {
latlonArray[increment] = new VELatLong(this.lat, this.lon);
increment = ++increment;
});
You need the LocationRect.fromLocations() method. It accepts an array of locations, and returns a rectangle.
also: For v7, the new type representing a latitude/longitude location is Microsoft.Maps.Location , not VELatLong.