|
7 | 7 | '../Core/destroyObject',
|
8 | 8 | '../Core/DeveloperError',
|
9 | 9 | '../Core/FeatureDetection',
|
| 10 | + '../Core/GeographicProjection', |
10 | 11 | '../Core/GeographicTilingScheme',
|
11 | 12 | '../Core/IndexDatatype',
|
12 | 13 | '../Core/Math',
|
@@ -48,6 +49,7 @@ define([
|
48 | 49 | destroyObject,
|
49 | 50 | DeveloperError,
|
50 | 51 | FeatureDetection,
|
| 52 | + GeographicProjection, |
51 | 53 | GeographicTilingScheme,
|
52 | 54 | IndexDatatype,
|
53 | 55 | CesiumMath,
|
@@ -480,7 +482,7 @@ define([
|
480 | 482 | // Use Web Mercator for our texture coordinate computations if this imagery layer uses
|
481 | 483 | // that projection and the terrain tile falls entirely inside the valid bounds of the
|
482 | 484 | // projection.
|
483 |
| - var useWebMercatorT = imageryProvider.tilingScheme instanceof WebMercatorTilingScheme && |
| 485 | + var useWebMercatorT = imageryProvider.tilingScheme.projection instanceof WebMercatorProjection && |
484 | 486 | tile.rectangle.north < WebMercatorProjection.MaximumLatitude &&
|
485 | 487 | tile.rectangle.south > -WebMercatorProjection.MaximumLatitude;
|
486 | 488 |
|
@@ -847,7 +849,7 @@ define([
|
847 | 849 | });
|
848 | 850 | }
|
849 | 851 |
|
850 |
| - if (imageryProvider.tilingScheme instanceof WebMercatorTilingScheme) { |
| 852 | + if (imageryProvider.tilingScheme.projection instanceof WebMercatorProjection) { |
851 | 853 | imagery.textureWebMercator = texture;
|
852 | 854 | } else {
|
853 | 855 | imagery.texture = texture;
|
@@ -932,7 +934,7 @@ define([
|
932 | 934 | // avoids precision problems in the reprojection transformation while making
|
933 | 935 | // no noticeable difference in the georeferencing of the image.
|
934 | 936 | if (needGeographicProjection &&
|
935 |
| - !(this._imageryProvider.tilingScheme instanceof GeographicTilingScheme) && |
| 937 | + !(this._imageryProvider.tilingScheme.projection instanceof GeographicProjection) && |
936 | 938 | rectangle.width / texture.width > 1e-5) {
|
937 | 939 | var that = this;
|
938 | 940 | imagery.addReference();
|
@@ -1210,7 +1212,7 @@ define([
|
1210 | 1212 | var imageryProvider = layer._imageryProvider;
|
1211 | 1213 | var tilingScheme = imageryProvider.tilingScheme;
|
1212 | 1214 | var ellipsoid = tilingScheme.ellipsoid;
|
1213 |
| - var latitudeFactor = !(layer._imageryProvider.tilingScheme instanceof GeographicTilingScheme) ? Math.cos(latitudeClosestToEquator) : 1.0; |
| 1215 | + var latitudeFactor = !(layer._imageryProvider.tilingScheme.projection instanceof GeographicProjection) ? Math.cos(latitudeClosestToEquator) : 1.0; |
1214 | 1216 | var tilingSchemeRectangle = tilingScheme.rectangle;
|
1215 | 1217 | var levelZeroMaximumTexelSpacing = ellipsoid.maximumRadius * tilingSchemeRectangle.width * latitudeFactor / (imageryProvider.tileWidth * tilingScheme.getNumberOfXTilesAtLevel(0));
|
1216 | 1218 |
|
|
0 commit comments