this.setBounds = function () { var bounds = Microsoft.Maps.LocationRect.fromLocations(map.getLocations()); var zoomPrev = this.map.getZoom(); var cnt = 0; for (key in this.points) { if(this.points[key] != null) { cnt++; bounds.extend(this.points[key]); } } this.map.fitBounds(bounds); if (cnt < 2) this.map.setZoom(zoomPrev); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)