This commit is contained in:
tengge 2020-07-21 21:26:26 +08:00
parent 01ff2f9939
commit 5db030bb7d
8 changed files with 17 additions and 18 deletions

View File

@ -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());

View File

@ -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,

View File

@ -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;
}
}

View File

@ -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 = [];

View File

@ -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,

View File

@ -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",

View File

@ -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;
}

View File

@ -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;