var point1 = new BMap.Point(116.332782, 40.007978);
var point2 = new BMap.Point(116.332782, 41.007978);
var distance = map.getDistance(point1, point2);
var mileage = (distance / 1000).toFixed(2);
alert("与距离为" + mileage + "公里");
var point1 = new BMap.Point(116.332782, 40.007978);
var point2 = new BMap.Point(116.332782, 41.007978);
var distance = map.getDistance(point1, point2);
var mileage = (distance / 1000).toFixed(2);
alert("与距离为" + mileage + "公里");