Skip to content

Commit

Permalink
increase EARTH_RADIUS and MAX_PROJECTED_COORD to let level14 visible,#10
Browse files Browse the repository at this point in the history
  • Loading branch information
iSpring committed Nov 21, 2016
1 parent ee9cd69 commit baa0802
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/world/Kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const Kernel = {
globe: <Globe>null,
idCounter: 0, //Object3D对象的唯一标识
BASE_LEVEL: 6, //渲染的基准层级
EARTH_RADIUS: 637.8137,//6378137
MAX_PROJECTED_COORD: 2003.75083427892,//20037508.3427892
EARTH_RADIUS: 637.8137*26,//6378137
MAX_PROJECTED_COORD: 2003.75083427892*26,//20037508.3427892
proxy: ""
};

Expand Down
3 changes: 2 additions & 1 deletion src/world/math/Math.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ const MathUtils = {
*/
getLengthFromCamera2EarthSurface(level: number): number{
//7820683
return 1.2261704318988444 * Kernel.EARTH_RADIUS / Math.pow(2, level);
//1.2261704318988444 * Kernel.EARTH_RADIUS / Math.pow(2, level);
return Kernel.EARTH_RADIUS / Math.pow(2, level);
},

/**将经纬度转换为笛卡尔空间直角坐标系中的x、y、z
Expand Down

0 comments on commit baa0802

Please sign in to comment.