diff --git a/web/src/gis/globe/ArcgisElevationCoverage.js b/web/src/gis/globe/ArcgisElevationCoverage.js index 82428b62..91a6bdb9 100644 --- a/web/src/gis/globe/ArcgisElevationCoverage.js +++ b/web/src/gis/globe/ArcgisElevationCoverage.js @@ -57,21 +57,11 @@ ArcgisElevationCoverage.prototype.retrieveTileImage = function (tile) { return; } - let z = 360 / (tile.sector.maxLongitude - tile.sector.minLongitude); - let x = (180 + tile.sector.minLongitude) / 360 * Math.pow(2, z); - - if (Math.abs(tile.sector.minLatitude) > 85.01) { - return; - } - - let lat = Math.log(Math.tan((Math.PI / 2.0 + tile.sector.minLatitude * Math.PI / 180) / 2.0)) * 180 / Math.PI; - let y = Math.floor((180 - lat) / 360 * Math.pow(2, z)); - this.worker.postMessage({ tileKey: tile.tileKey, - x, - y, - z + x: tile.column, + y: tile.row, + z: tile.level.levelNumber }); this.currentRetrievals.push(tile.tileKey); diff --git a/web/src/gis/globe/Tessellator.js b/web/src/gis/globe/Tessellator.js index 17be76d2..69c0456f 100644 --- a/web/src/gis/globe/Tessellator.js +++ b/web/src/gis/globe/Tessellator.js @@ -913,9 +913,6 @@ Tessellator.prototype.isTileVisible = function (dc, tile) { if (dc.globe.projectionLimits && !tile.sector.overlaps(dc.globe.projectionLimits)) { return false; } - if (tile.level.levelNumber < 4) { - return true; - } return tile.extent.intersectsFrustum(dc.frustumInModelCoordinates); }; diff --git a/web/src/gis/globe/TiledElevationCoverage.js b/web/src/gis/globe/TiledElevationCoverage.js index ae2dcc7e..6ae1933d 100644 --- a/web/src/gis/globe/TiledElevationCoverage.js +++ b/web/src/gis/globe/TiledElevationCoverage.js @@ -107,7 +107,7 @@ function TiledElevationCoverage(config) { * @type {Boolean} * @default true */ - this.pixelIsPoint = false; + this.pixelIsPoint = true; /** * The {@link LevelSet} dividing this coverage's geographic domain into a multi-resolution, hierarchical diff --git a/web/src/gis/projections/ProjectionWgs84.js b/web/src/gis/projections/ProjectionWgs84.js index dce7a495..468ff91e 100644 --- a/web/src/gis/projections/ProjectionWgs84.js +++ b/web/src/gis/projections/ProjectionWgs84.js @@ -68,6 +68,8 @@ ProjectionWgs84.prototype.geographicToCartesian = function (globe, latitude, lon "geographicToCartesian", "missingGlobe")); } + // latitude = WWMath._mercatorLatInvert(latitude); // TODO + var cosLat = Math.cos(latitude * Angle.DEGREES_TO_RADIANS), sinLat = Math.sin(latitude * Angle.DEGREES_TO_RADIANS), cosLon = Math.cos(longitude * Angle.DEGREES_TO_RADIANS), @@ -120,7 +122,7 @@ ProjectionWgs84.prototype.geographicToCartesianGrid = function (globe, sector, n lat = maxLat; // explicitly set the last lat to the max longitude to ensure alignment } - //lat = WWMath._mercatorLatInvert(lat); // TODO + lat = WWMath._mercatorLatInvert(lat); // TODO // Latitude is constant for each row. Values that are a function of latitude can be computed once per row. cosLat = Math.cos(lat); diff --git a/web/src/gis/util/Tile.js b/web/src/gis/util/Tile.js index d76543aa..3d44ef5f 100644 --- a/web/src/gis/util/Tile.js +++ b/web/src/gis/util/Tile.js @@ -449,10 +449,10 @@ Tile.computeColumn = function (delta, longitude) { * @returns {Number} The computed row number. */ Tile.computeLastRow = function (delta, maxLatitude) { - var row = Math.ceil((maxLatitude + 90) / delta - 1); + var row = Math.ceil((maxLatitude + 180) / delta - 1); // If max latitude is in the first row, set the max row to 0. - if (maxLatitude + 90 < delta) { + if (maxLatitude + 180 < delta) { row = 0; }