From 5db030bb7d53e32ea454dbf2597bf5fbf2c85c28 Mon Sep 17 00:00:00 2001 From: tengge <930372551@qq.com> Date: Tue, 21 Jul 2020 21:26:26 +0800 Subject: [PATCH] update --- web/src/gis/globe/EarthElevationModel.js | 2 +- web/src/gis/globe/Tessellator.js | 12 ++++++------ web/src/gis/layer/XYZLayer.js | 4 ++-- web/src/gis/render/FramebufferTileController.js | 2 +- web/src/gis/shapes/SurfaceShapeTileBuilder.js | 8 ++++---- web/src/gis/util/Level.js | 1 - web/src/gis/util/Tile.js | 4 ++-- web/src/gis/util/WWMath.js | 2 +- 8 files changed, 17 insertions(+), 18 deletions(-) diff --git a/web/src/gis/globe/EarthElevationModel.js b/web/src/gis/globe/EarthElevationModel.js index ebc5378d..969d4b8e 100644 --- a/web/src/gis/globe/EarthElevationModel.js +++ b/web/src/gis/globe/EarthElevationModel.js @@ -32,7 +32,7 @@ import ArcgisElevationCoverage from './ArcgisElevationCoverage'; function EarthElevationModel() { ElevationModel.call(this); - this.addCoverage(new ArcgisElevationCoverage()); + // this.addCoverage(new ArcgisElevationCoverage()); // this.addCoverage(new GebcoElevationCoverage()); // this.addCoverage(new AsterV2ElevationCoverage()); // this.addCoverage(new UsgsNedElevationCoverage()); diff --git a/web/src/gis/globe/Tessellator.js b/web/src/gis/globe/Tessellator.js index 28360f89..c0512e4c 100644 --- a/web/src/gis/globe/Tessellator.js +++ b/web/src/gis/globe/Tessellator.js @@ -46,15 +46,15 @@ function Tessellator() { // Parameterize top level subdivision in one place. // TilesInTopLevel describes the most coarse tile structure. - this.numRowsTilesInTopLevel = 4; // baseline: 4 - this.numColumnsTilesInTopLevel = 8; // baseline: 8 + this.numRowsTilesInTopLevel = 1; // baseline: 4 + this.numColumnsTilesInTopLevel = 1; // baseline: 8 // The maximum number of levels that will ever be tessellated. - this.maximumSubdivisionDepth = 15; // baseline: 15 + this.maximumSubdivisionDepth = 16; // baseline: 15 // tileWidth, tileHeight - the number of subdivisions a single tile has; this determines the sampling grid. - this.tileWidth = 32; // baseline: 32 - this.tileHeight = 32; // baseline: 32 + this.tileWidth = 256; // baseline: 32 + this.tileHeight = 256; // baseline: 32 /** * Controls the level of detail switching for this layer. The next highest resolution level is @@ -68,7 +68,7 @@ function Tessellator() { this.levels = new LevelSet( Sector.FULL_SPHERE, new Location( - 180 / this.numRowsTilesInTopLevel, + 360 / this.numRowsTilesInTopLevel, 360 / this.numColumnsTilesInTopLevel), this.maximumSubdivisionDepth, this.tileWidth, diff --git a/web/src/gis/layer/XYZLayer.js b/web/src/gis/layer/XYZLayer.js index 34c4f7da..1bfd648d 100644 --- a/web/src/gis/layer/XYZLayer.js +++ b/web/src/gis/layer/XYZLayer.js @@ -12,7 +12,7 @@ class XYZLayer extends MercatorTiledImageLayer { constructor() { let imageSize = 256; let displayName = 'Bing'; - super(new Sector(-85.05, 85.05, -180, 180), new Location(85.05, 180), 23, "image/jpeg", + super(new Sector(-180, 180, -180, 180), new Location(360, 360), 18, "image/jpeg", displayName, imageSize, imageSize); this.imageSize = imageSize; @@ -30,7 +30,7 @@ class XYZLayer extends MercatorTiledImageLayer { } mapSizeForLevel(levelNumber) { - return 256 << (levelNumber + 1); + return 256 << levelNumber + 1; } } diff --git a/web/src/gis/render/FramebufferTileController.js b/web/src/gis/render/FramebufferTileController.js index 22664e3d..7862d6ae 100644 --- a/web/src/gis/render/FramebufferTileController.js +++ b/web/src/gis/render/FramebufferTileController.js @@ -60,7 +60,7 @@ function FramebufferTileController() { this.detailControl = 1.75; // Internal. Intentionally not documented. - this.levels = new LevelSet(Sector.FULL_SPHERE, new Location(45, 45), 16, this.tileWidth, this.tileHeight); + this.levels = new LevelSet(Sector.FULL_SPHERE, new Location(360, 360), 18, this.tileWidth, this.tileHeight); // Internal. Intentionally not documented. this.topLevelTiles = []; diff --git a/web/src/gis/shapes/SurfaceShapeTileBuilder.js b/web/src/gis/shapes/SurfaceShapeTileBuilder.js index 3c638b37..20081fb9 100644 --- a/web/src/gis/shapes/SurfaceShapeTileBuilder.js +++ b/web/src/gis/shapes/SurfaceShapeTileBuilder.js @@ -45,11 +45,11 @@ function SurfaceShapeTileBuilder() { // Parameterize top level subdivision in one place. // TilesInTopLevel describes the most coarse tile structure. - this.numRowsTilesInTopLevel = 4; - this.numColumnsTilesInTopLevel = 8; + this.numRowsTilesInTopLevel = 1; + this.numColumnsTilesInTopLevel = 1; // The maximum number of levels that will ever be tessellated. - this.maximumSubdivisionDepth = 15; + this.maximumSubdivisionDepth = 18; // tileWidth, tileHeight - the number of subdivisions a single tile has; this determines the sampling grid. this.tileWidth = 256; @@ -62,7 +62,7 @@ function SurfaceShapeTileBuilder() { this.levels = new LevelSet( Sector.FULL_SPHERE, new Location( - 180 / this.numRowsTilesInTopLevel, + 360 / this.numRowsTilesInTopLevel, 360 / this.numColumnsTilesInTopLevel), this.maximumSubdivisionDepth, this.tileWidth, diff --git a/web/src/gis/util/Level.js b/web/src/gis/util/Level.js index 0c359c86..33e7bb54 100644 --- a/web/src/gis/util/Level.js +++ b/web/src/gis/util/Level.js @@ -31,7 +31,6 @@ import Logger from '../util/Logger'; * @throws {ArgumentError} If either the specified tile delta or parent level set is null or undefined. */ function Level(levelNumber, tileDelta, parent) { - debugger; if (!tileDelta) { throw new ArgumentError( Logger.logMessage(Logger.LEVEL_SEVERE, "Level", "constructor", diff --git a/web/src/gis/util/Tile.js b/web/src/gis/util/Tile.js index 0743837d..694c1080 100644 --- a/web/src/gis/util/Tile.js +++ b/web/src/gis/util/Tile.js @@ -415,10 +415,10 @@ Tile.computeTileKey = function (levelNumber, row, column) { * @returns {Number} The computed row number. */ Tile.computeRow = function (delta, latitude) { - var row = Math.floor((latitude + 90) / delta); + var row = Math.floor((latitude + 180) / delta); // If latitude is at the end of the grid, subtract 1 from the computed row to return the last row. - if (latitude == 90) { + if (latitude == 180) { row -= 1; } diff --git a/web/src/gis/util/WWMath.js b/web/src/gis/util/WWMath.js index 51aa0c42..e4fa775b 100644 --- a/web/src/gis/util/WWMath.js +++ b/web/src/gis/util/WWMath.js @@ -868,7 +868,7 @@ var WWMath = { return this._getDistance(lon1, lat1, lon2, lat2); }, // this.mercatorLatInvert(180) - MAX_LAT: 85.0511287798066 + MAX_LAT: 180 }; export default WWMath;