增大最远距离。

This commit is contained in:
tengge1 2019-04-14 14:00:04 +08:00
parent ef070add11
commit 848dcf21bc
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ function Globe(camera, renderer, options = {}) {
// 默认位置
var lon = 0;
var lat = 0;
var alt = GeoUtils.zoomToAlt(0);
var alt = GeoUtils.zoomToAlt(-1);
this.viewer.setPosition(lon, lat, alt);
}

View File

@ -130,9 +130,9 @@ OrbitViewer.prototype.onMouseWheel = function () {
var d = delta * (distance - WGS84.a) / 1000;
var d0 = GeoUtils.zoomToAlt(0) + WGS84.a;
var d_1 = GeoUtils.zoomToAlt(-1) + WGS84.a;
if (distance + d >= d0) { // 最远0层级距离
if (distance + d >= d_1) { // 最远0层级距离
d = 0;
}