@cesium/engine 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/Workers/{AttributeCompression-8a5a065e.js → AttributeCompression-f9f6c717.js} +1 -1
- package/Build/Workers/{AxisAlignedBoundingBox-a6f9f0e5.js → AxisAlignedBoundingBox-31fadcf0.js} +1 -1
- package/Build/Workers/{BoundingRectangle-b0a68595.js → BoundingRectangle-995f0079.js} +1 -1
- package/Build/Workers/{BoxGeometry-baedd794.js → BoxGeometry-7eb1af60.js} +1 -1
- package/Build/Workers/{Color-f85df1be.js → Color-2dc49658.js} +1 -1
- package/Build/Workers/{CoplanarPolygonGeometryLibrary-30516950.js → CoplanarPolygonGeometryLibrary-d7d972d6.js} +1 -1
- package/Build/Workers/{CorridorGeometryLibrary-5d5d3b3a.js → CorridorGeometryLibrary-1f5ef7b3.js} +1 -1
- package/Build/Workers/{CylinderGeometry-d899ae26.js → CylinderGeometry-23c67a6c.js} +1 -1
- package/Build/Workers/{CylinderGeometryLibrary-135b0858.js → CylinderGeometryLibrary-7bf291b4.js} +1 -1
- package/Build/Workers/{EllipseGeometry-a49f8449.js → EllipseGeometry-37014da4.js} +1 -1
- package/Build/Workers/{EllipseGeometryLibrary-cba7edde.js → EllipseGeometryLibrary-92ab6b1e.js} +1 -1
- package/Build/Workers/{EllipseOutlineGeometry-8095c8cb.js → EllipseOutlineGeometry-12b6fef5.js} +1 -1
- package/Build/Workers/{EllipsoidGeodesic-dcff5cbd.js → EllipsoidGeodesic-5b3623dc.js} +1 -1
- package/Build/Workers/{EllipsoidGeometry-ed93f571.js → EllipsoidGeometry-508da15c.js} +1 -1
- package/Build/Workers/{EllipsoidOutlineGeometry-e4854854.js → EllipsoidOutlineGeometry-40d97455.js} +1 -1
- package/Build/Workers/{EllipsoidRhumbLine-b672d507.js → EllipsoidRhumbLine-ef872433.js} +1 -1
- package/Build/Workers/{EllipsoidTangentPlane-7ae1aa9a.js → EllipsoidTangentPlane-46d4d9c2.js} +1 -1
- package/Build/Workers/{EncodedCartesian3-e8bbca36.js → EncodedCartesian3-57415c8a.js} +1 -1
- package/Build/Workers/{FrustumGeometry-b62db3e3.js → FrustumGeometry-38605e69.js} +32 -4
- package/Build/Workers/{GeometryAttribute-780af4fa.js → GeometryAttribute-a466e9c7.js} +1 -1
- package/Build/Workers/{GeometryInstance-3fb607b7.js → GeometryInstance-34d9e21e.js} +1 -1
- package/Build/Workers/{GeometryPipeline-36b61c99.js → GeometryPipeline-dcf79306.js} +1 -1
- package/Build/Workers/{IndexDatatype-b8f3e09d.js → IndexDatatype-2643aa47.js} +1 -1
- package/Build/Workers/{IntersectionTests-e889fcf0.js → IntersectionTests-88c49b2e.js} +1 -1
- package/Build/Workers/{Math-dad82b4d.js → Math-0a2ac845.js} +12 -2
- package/Build/Workers/{Matrix2-1e403d0e.js → Matrix2-e1298525.js} +1 -1
- package/Build/Workers/{Matrix3-fa806b97.js → Matrix3-41c58dde.js} +1 -1
- package/Build/Workers/{OrientedBoundingBox-43478ac8.js → OrientedBoundingBox-2dd47921.js} +5 -3
- package/Build/Workers/{Plane-c27e1ac6.js → Plane-4c3d403b.js} +1 -1
- package/Build/Workers/{PolygonGeometryLibrary-38a98276.js → PolygonGeometryLibrary-59126025.js} +1 -1
- package/Build/Workers/PolygonPipeline-1fe328c0.js +1344 -0
- package/Build/Workers/{PolylinePipeline-30e4cec9.js → PolylinePipeline-896735cc.js} +1 -1
- package/Build/Workers/{PolylineVolumeGeometryLibrary-90551d26.js → PolylineVolumeGeometryLibrary-9c0639f7.js} +1 -1
- package/Build/Workers/{PrimitivePipeline-558d9cb0.js → PrimitivePipeline-fc1a47ff.js} +1 -1
- package/Build/Workers/{RectangleGeometryLibrary-815c68df.js → RectangleGeometryLibrary-a23c9ebe.js} +1 -1
- package/Build/Workers/{TerrainEncoding-341ead52.js → TerrainEncoding-51b8b33b.js} +1 -1
- package/Build/Workers/Transforms-bc45e707.js +14699 -0
- package/Build/Workers/{WallGeometryLibrary-ccf90976.js → WallGeometryLibrary-007e9883.js} +1 -1
- package/Build/Workers/{WebMercatorProjection-76a3fcc0.js → WebMercatorProjection-13ed1a6e.js} +1 -1
- package/Build/Workers/{arrayRemoveDuplicates-fac118a8.js → arrayRemoveDuplicates-d2061e85.js} +1 -1
- package/Build/Workers/cesiumWorkerBootstrapper.js +1 -1
- package/Build/Workers/combineGeometry.js +1 -1
- package/Build/Workers/createBoxGeometry.js +1 -1
- package/Build/Workers/createBoxOutlineGeometry.js +1 -1
- package/Build/Workers/createCircleGeometry.js +1 -1
- package/Build/Workers/createCircleOutlineGeometry.js +1 -1
- package/Build/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/Build/Workers/createCorridorGeometry.js +1 -1
- package/Build/Workers/createCorridorOutlineGeometry.js +1 -1
- package/Build/Workers/createCylinderGeometry.js +1 -1
- package/Build/Workers/createCylinderOutlineGeometry.js +1 -1
- package/Build/Workers/createEllipseGeometry.js +1 -1
- package/Build/Workers/createEllipseOutlineGeometry.js +1 -1
- package/Build/Workers/createEllipsoidGeometry.js +1 -1
- package/Build/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/Build/Workers/createFrustumGeometry.js +1 -1
- package/Build/Workers/createFrustumOutlineGeometry.js +1 -1
- package/Build/Workers/createGeometry.js +1 -1
- package/Build/Workers/createGroundPolylineGeometry.js +1 -1
- package/Build/Workers/createPlaneGeometry.js +1 -1
- package/Build/Workers/createPlaneOutlineGeometry.js +1 -1
- package/Build/Workers/createPolygonGeometry.js +1 -1
- package/Build/Workers/createPolygonOutlineGeometry.js +1 -1
- package/Build/Workers/createPolylineGeometry.js +1 -1
- package/Build/Workers/createPolylineVolumeGeometry.js +1 -1
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/Build/Workers/createRectangleGeometry.js +1 -1
- package/Build/Workers/createRectangleOutlineGeometry.js +1 -1
- package/Build/Workers/createSimplePolylineGeometry.js +1 -1
- package/Build/Workers/createSphereGeometry.js +1 -1
- package/Build/Workers/createSphereOutlineGeometry.js +1 -1
- package/Build/Workers/createVectorTileClampedPolylines.js +1 -1
- package/Build/Workers/createVectorTileGeometries.js +1 -1
- package/Build/Workers/createVectorTilePoints.js +1 -1
- package/Build/Workers/createVectorTilePolygons.js +1 -1
- package/Build/Workers/createVectorTilePolylines.js +1 -1
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/Build/Workers/createVerticesFromHeightmap.js +5 -8
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +10 -15
- package/Build/Workers/createWallGeometry.js +1 -1
- package/Build/Workers/createWallOutlineGeometry.js +1 -1
- package/Build/Workers/decodeDraco.js +1 -1
- package/Build/Workers/decodeI3S.js +1 -1
- package/Build/Workers/package.js +1 -1
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/Source/Core/ArcGISTiledElevationTerrainProvider.js +291 -191
- package/Source/Core/BingMapsGeocoderService.js +19 -1
- package/Source/Core/CartographicGeocoderService.js +15 -0
- package/Source/Core/CesiumTerrainProvider.js +571 -434
- package/Source/Core/Credit.js +1 -1
- package/Source/Core/CustomHeightmapTerrainProvider.js +12 -0
- package/Source/Core/EllipsoidTerrainProvider.js +17 -10
- package/Source/Core/FrustumGeometry.js +4 -3
- package/Source/Core/GeocoderService.js +32 -1
- package/Source/Core/GoogleEarthEnterpriseMetadata.js +86 -34
- package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +119 -82
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/IonGeocoderService.js +17 -2
- package/Source/Core/IonResource.js +14 -3
- package/Source/Core/OpenCageGeocoderService.js +18 -1
- package/Source/Core/OrientedBoundingBox.js +4 -2
- package/Source/Core/OrthographicFrustum.js +13 -0
- package/Source/Core/PeliasGeocoderService.js +14 -1
- package/Source/Core/PerspectiveFrustum.js +14 -0
- package/Source/Core/Request.js +3 -2
- package/Source/Core/RequestScheduler.js +10 -5
- package/Source/Core/Resource.js +230 -236
- package/Source/Core/TerrainProvider.js +9 -14
- package/Source/Core/TileProviderError.js +8 -8
- package/Source/Core/VRTheWorldTerrainProvider.js +193 -124
- package/Source/Core/buildModuleUrl.js +4 -3
- package/Source/Core/createWorldTerrain.js +20 -2
- package/Source/Core/createWorldTerrainAsync.js +48 -0
- package/Source/Core/sampleTerrain.js +9 -10
- package/Source/Core/sampleTerrainMostDetailed.js +66 -72
- package/Source/DataSources/Cesium3DTilesetVisualizer.js +37 -26
- package/Source/DataSources/DataSourceDisplay.js +2 -2
- package/Source/DataSources/Entity.js +6 -1
- package/Source/DataSources/EntityCluster.js +126 -128
- package/Source/DataSources/ModelVisualizer.js +104 -34
- package/Source/DataSources/PolygonGraphics.js +1 -1
- package/Source/Renderer/UniformState.js +3 -2
- package/Source/Renderer/demodernizeShader.js +5 -5
- package/Source/Scene/ArcGisBaseMapType.js +12 -0
- package/Source/Scene/ArcGisMapServerImageryProvider.js +694 -376
- package/Source/Scene/ArcGisMapService.js +83 -0
- package/Source/Scene/BingMapsImageryProvider.js +511 -305
- package/Source/Scene/BufferLoader.js +29 -34
- package/Source/Scene/Camera.js +8 -7
- package/Source/Scene/Cesium3DTile.js +392 -254
- package/Source/Scene/Cesium3DTileBatchTable.js +2 -2
- package/Source/Scene/Cesium3DTileContent.js +16 -0
- package/Source/Scene/Cesium3DTileContentFactory.js +4 -4
- package/Source/Scene/Cesium3DTilePass.js +8 -11
- package/Source/Scene/Cesium3DTileStyleEngine.js +1 -1
- package/Source/Scene/Cesium3DTilesVoxelProvider.js +225 -117
- package/Source/Scene/Cesium3DTileset.js +756 -482
- package/Source/Scene/Cesium3DTilesetBaseTraversal.js +301 -0
- package/Source/Scene/Cesium3DTilesetMostDetailedTraversal.js +33 -46
- package/Source/Scene/Cesium3DTilesetSkipTraversal.js +421 -0
- package/Source/Scene/Cesium3DTilesetTraversal.js +219 -671
- package/Source/Scene/ClassificationPrimitive.js +7 -0
- package/Source/Scene/Composite3DTileContent.js +69 -26
- package/Source/Scene/CreditDisplay.js +132 -20
- package/Source/Scene/DepthPlane.js +1 -1
- package/Source/Scene/Empty3DTileContent.js +31 -1
- package/Source/Scene/Geometry3DTileContent.js +47 -7
- package/Source/Scene/Globe.js +5 -1
- package/Source/Scene/GlobeSurfaceTile.js +2 -1
- package/Source/Scene/GlobeSurfaceTileProvider.js +53 -30
- package/Source/Scene/GltfBufferViewLoader.js +47 -91
- package/Source/Scene/GltfDracoLoader.js +110 -112
- package/Source/Scene/GltfImageLoader.js +71 -78
- package/Source/Scene/GltfIndexBufferLoader.js +108 -121
- package/Source/Scene/GltfJsonLoader.js +87 -74
- package/Source/Scene/GltfLoader.js +381 -300
- package/Source/Scene/GltfStructuralMetadataLoader.js +109 -110
- package/Source/Scene/GltfTextureLoader.js +97 -96
- package/Source/Scene/GltfVertexBufferLoader.js +128 -133
- package/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +353 -225
- package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +491 -331
- package/Source/Scene/GridImageryProvider.js +267 -104
- package/Source/Scene/GroundPolylinePrimitive.js +12 -1
- package/Source/Scene/GroundPrimitive.js +8 -1
- package/Source/Scene/I3SDataProvider.js +214 -113
- package/Source/Scene/I3SFeature.js +7 -6
- package/Source/Scene/I3SLayer.js +26 -37
- package/Source/Scene/I3SNode.js +59 -66
- package/Source/Scene/Imagery.js +6 -1
- package/Source/Scene/ImageryLayer.js +299 -48
- package/Source/Scene/ImageryLayerCollection.js +26 -0
- package/Source/Scene/ImageryProvider.js +129 -111
- package/Source/Scene/Implicit3DTileContent.js +72 -23
- package/Source/Scene/ImplicitSubtree.js +66 -45
- package/Source/Scene/IonImageryProvider.js +482 -275
- package/Source/Scene/MapboxImageryProvider.js +272 -112
- package/Source/Scene/MapboxStyleImageryProvider.js +270 -111
- package/Source/Scene/MetadataSchemaLoader.js +26 -36
- package/Source/Scene/Model/B3dmLoader.js +42 -46
- package/Source/Scene/Model/GeoJsonLoader.js +8 -32
- package/Source/Scene/Model/I3dmLoader.js +48 -74
- package/Source/Scene/Model/MaterialPipelineStage.js +12 -12
- package/Source/Scene/Model/Model.js +514 -135
- package/Source/Scene/Model/Model3DTileContent.js +83 -31
- package/Source/Scene/Model/ModelAnimationCollection.js +3 -3
- package/Source/Scene/Model/ModelDrawCommand.js +15 -26
- package/Source/Scene/Model/ModelUtility.js +16 -16
- package/Source/Scene/Model/PntsLoader.js +27 -32
- package/Source/Scene/Model/UniformType.js +1 -1
- package/Source/Scene/Multiple3DTileContent.js +134 -115
- package/Source/Scene/Picking.js +3 -2
- package/Source/Scene/PointCloud.js +11 -19
- package/Source/Scene/Primitive.js +20 -0
- package/Source/Scene/QuadtreePrimitive.js +5 -2
- package/Source/Scene/QuadtreeTileProvider.js +4 -8
- package/Source/Scene/ResourceCache.js +47 -105
- package/Source/Scene/ResourceCacheStatistics.js +24 -58
- package/Source/Scene/ResourceLoader.js +5 -17
- package/Source/Scene/ResourceLoaderState.js +12 -4
- package/Source/Scene/Scene.js +65 -0
- package/Source/Scene/SceneTransforms.js +3 -2
- package/Source/Scene/ScreenSpaceCameraController.js +2 -2
- package/Source/Scene/SingleTileImageryProvider.js +382 -209
- package/Source/Scene/Terrain.js +196 -0
- package/Source/Scene/TileCoordinatesImageryProvider.js +267 -104
- package/Source/Scene/TileMapServiceImageryProvider.js +177 -85
- package/Source/Scene/Tileset3DTileContent.js +47 -5
- package/Source/Scene/TimeDynamicPointCloud.js +15 -2
- package/Source/Scene/UrlTemplateImageryProvider.js +343 -215
- package/Source/Scene/Vector3DTileClampedPolylines.js +96 -84
- package/Source/Scene/Vector3DTileContent.js +47 -22
- package/Source/Scene/Vector3DTileGeometry.js +57 -52
- package/Source/Scene/Vector3DTilePoints.js +97 -81
- package/Source/Scene/Vector3DTilePolygons.js +118 -117
- package/Source/Scene/Vector3DTilePolylines.js +86 -82
- package/Source/Scene/Vector3DTilePrimitive.js +0 -1
- package/Source/Scene/VoxelContent.js +61 -63
- package/Source/Scene/VoxelPrimitive.js +39 -91
- package/Source/Scene/VoxelProvider.js +2 -2
- package/Source/Scene/WebMapServiceImageryProvider.js +272 -111
- package/Source/Scene/WebMapTileServiceImageryProvider.js +270 -107
- package/Source/Scene/computeFlyToLocationForRectangle.js +33 -37
- package/Source/Scene/createOsmBuildings.js +6 -0
- package/Source/Scene/createOsmBuildingsAsync.js +82 -0
- package/Source/Scene/createWorldImagery.js +14 -5
- package/Source/Scene/createWorldImageryAsync.js +39 -0
- package/Source/Shaders/AtmosphereCommon.glsl +51 -8
- package/Source/Shaders/AtmosphereCommon.js +51 -8
- package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.glsl +1 -1
- package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.js +1 -1
- package/Source/Shaders/PostProcessStages/AmbientOcclusionModulate.glsl +3 -3
- package/Source/Shaders/PostProcessStages/AmbientOcclusionModulate.js +3 -3
- package/Source/Widget/CesiumWidget.js +67 -27
- package/index.d.ts +2429 -1475
- package/index.js +324 -315
- package/package.json +4 -4
- package/Build/Workers/PolygonPipeline-d31ff61c.js +0 -1345
- package/Build/Workers/Transforms-9e9df299.js +0 -14714
|
@@ -3,6 +3,7 @@ import Check from "../Core/Check.js";
|
|
|
3
3
|
import Credit from "../Core/Credit.js";
|
|
4
4
|
import defaultValue from "../Core/defaultValue.js";
|
|
5
5
|
import defined from "../Core/defined.js";
|
|
6
|
+
import deprecationWarning from "../Core/deprecationWarning.js";
|
|
6
7
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
7
8
|
import Event from "../Core/Event.js";
|
|
8
9
|
import GeographicTilingScheme from "../Core/GeographicTilingScheme.js";
|
|
@@ -18,7 +19,7 @@ import ImageryProvider from "./ImageryProvider.js";
|
|
|
18
19
|
*
|
|
19
20
|
* Initialization options for the GoogleEarthEnterpriseMapsProvider constructor
|
|
20
21
|
*
|
|
21
|
-
* @property {Resource|string} url The url of the Google Earth server hosting the imagery.
|
|
22
|
+
* @property {Resource|string} [url] The url of the Google Earth server hosting the imagery. Deprecated.
|
|
22
23
|
* @property {number} channel The channel (id) to be used when requesting data from the server.
|
|
23
24
|
* The channel number can be found by looking at the json file located at:
|
|
24
25
|
* earth.localdomain/default_map/query?request=Json&vars=geeServerDefs The /default_map path may
|
|
@@ -47,6 +48,123 @@ import ImageryProvider from "./ImageryProvider.js";
|
|
|
47
48
|
*/
|
|
48
49
|
|
|
49
50
|
/**
|
|
51
|
+
* Used to track creation details while fetching initial metadata
|
|
52
|
+
*
|
|
53
|
+
* @constructor
|
|
54
|
+
* @private
|
|
55
|
+
*
|
|
56
|
+
* @param {GoogleEarthEnterpriseMapsProvider.ConstructorOptions} options An object describing initialization options
|
|
57
|
+
*/
|
|
58
|
+
function ImageryProviderBuilder(options) {
|
|
59
|
+
this.channel = options.channel;
|
|
60
|
+
this.ellipsoid = options.ellipsoid;
|
|
61
|
+
this.tilingScheme = undefined;
|
|
62
|
+
this.version = undefined;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Complete GoogleEarthEnterpriseMapsProvider creation based on builder values.
|
|
67
|
+
*
|
|
68
|
+
* @private
|
|
69
|
+
*
|
|
70
|
+
* @param {GoogleEarthEnterpriseMapsProvider} provider
|
|
71
|
+
*/
|
|
72
|
+
ImageryProviderBuilder.prototype.build = function (provider) {
|
|
73
|
+
provider._channel = this.channel;
|
|
74
|
+
provider._version = this.version;
|
|
75
|
+
provider._tilingScheme = this.tilingScheme;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
function metadataSuccess(text, imageryProviderBuilder) {
|
|
79
|
+
let data;
|
|
80
|
+
|
|
81
|
+
// The Google Earth server sends malformed JSON data currently...
|
|
82
|
+
try {
|
|
83
|
+
// First, try parsing it like normal in case a future version sends correctly formatted JSON
|
|
84
|
+
data = JSON.parse(text);
|
|
85
|
+
} catch (e) {
|
|
86
|
+
// Quote object strings manually, then try parsing again
|
|
87
|
+
data = JSON.parse(
|
|
88
|
+
text.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g, '$1"$2":')
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
let layer;
|
|
93
|
+
for (let i = 0; i < data.layers.length; i++) {
|
|
94
|
+
if (data.layers[i].id === imageryProviderBuilder.channel) {
|
|
95
|
+
layer = data.layers[i];
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (!defined(layer)) {
|
|
101
|
+
const message = `Could not find layer with channel (id) of ${imageryProviderBuilder.channel}.`;
|
|
102
|
+
throw new RuntimeError(message);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (!defined(layer.version)) {
|
|
106
|
+
const message = `Could not find a version in channel (id) ${imageryProviderBuilder.channel}.`;
|
|
107
|
+
throw new RuntimeError(message);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
imageryProviderBuilder.version = layer.version;
|
|
111
|
+
|
|
112
|
+
if (defined(data.projection) && data.projection === "flat") {
|
|
113
|
+
imageryProviderBuilder.tilingScheme = new GeographicTilingScheme({
|
|
114
|
+
numberOfLevelZeroTilesX: 2,
|
|
115
|
+
numberOfLevelZeroTilesY: 2,
|
|
116
|
+
rectangle: new Rectangle(-Math.PI, -Math.PI, Math.PI, Math.PI),
|
|
117
|
+
ellipsoid: imageryProviderBuilder.ellipsoid,
|
|
118
|
+
});
|
|
119
|
+
// Default to mercator projection when projection is undefined
|
|
120
|
+
} else if (!defined(data.projection) || data.projection === "mercator") {
|
|
121
|
+
imageryProviderBuilder.tilingScheme = new WebMercatorTilingScheme({
|
|
122
|
+
numberOfLevelZeroTilesX: 2,
|
|
123
|
+
numberOfLevelZeroTilesY: 2,
|
|
124
|
+
ellipsoid: imageryProviderBuilder.ellipsoid,
|
|
125
|
+
});
|
|
126
|
+
} else {
|
|
127
|
+
const message = `Unsupported projection ${data.projection}.`;
|
|
128
|
+
throw new RuntimeError(message);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function metadataFailure(error, metadataResource, provider) {
|
|
135
|
+
let message = `An error occurred while accessing ${metadataResource.url}.`;
|
|
136
|
+
if (defined(error) && defined(error.message)) {
|
|
137
|
+
message += `: ${error.message}`;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
TileProviderError.reportError(
|
|
141
|
+
undefined,
|
|
142
|
+
provider,
|
|
143
|
+
defined(provider) ? provider._errorEvent : undefined,
|
|
144
|
+
message
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
throw new RuntimeError(message);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
async function requestMetadata(
|
|
151
|
+
metadataResource,
|
|
152
|
+
imageryProviderBuilder,
|
|
153
|
+
provider
|
|
154
|
+
) {
|
|
155
|
+
try {
|
|
156
|
+
const text = await metadataResource.fetchText();
|
|
157
|
+
metadataSuccess(text, imageryProviderBuilder);
|
|
158
|
+
} catch (error) {
|
|
159
|
+
metadataFailure(error, metadataResource, provider);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* <div class="notice">
|
|
165
|
+
* To construct a GoogleEarthEnterpriseMapsProvider, call {@link GoogleEarthEnterpriseImageryProvider.fromUrl}. Do not call the constructor directly.
|
|
166
|
+
* </div>
|
|
167
|
+
*
|
|
50
168
|
* Provides tiled imagery using the Google Earth Imagery API.
|
|
51
169
|
*
|
|
52
170
|
* Notes: This imagery provider does not work with the public Google Earth servers. It works with the
|
|
@@ -81,124 +199,24 @@ import ImageryProvider from "./ImageryProvider.js";
|
|
|
81
199
|
*
|
|
82
200
|
*
|
|
83
201
|
* @example
|
|
84
|
-
* const google =
|
|
85
|
-
* url : 'https://earth.localdomain',
|
|
86
|
-
* channel : 1008
|
|
87
|
-
* });
|
|
202
|
+
* const google = await Cesium.GoogleEarthEnterpriseMapsProvider.fromUrl("https://earth.localdomain", 1008);
|
|
88
203
|
*
|
|
89
204
|
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
|
|
90
205
|
*/
|
|
91
206
|
function GoogleEarthEnterpriseMapsProvider(options) {
|
|
92
207
|
options = defaultValue(options, {});
|
|
93
208
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
* The default alpha blending value of this provider, with 0.0 representing fully transparent and
|
|
105
|
-
* 1.0 representing fully opaque.
|
|
106
|
-
*
|
|
107
|
-
* @type {number|undefined}
|
|
108
|
-
* @default undefined
|
|
109
|
-
*/
|
|
110
|
-
this.defaultAlpha = undefined;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
|
|
114
|
-
* 1.0 representing fully opaque.
|
|
115
|
-
*
|
|
116
|
-
* @type {number|undefined}
|
|
117
|
-
* @default undefined
|
|
118
|
-
*/
|
|
119
|
-
this.defaultNightAlpha = undefined;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and
|
|
123
|
-
* 1.0 representing fully opaque.
|
|
124
|
-
*
|
|
125
|
-
* @type {number|undefined}
|
|
126
|
-
* @default undefined
|
|
127
|
-
*/
|
|
128
|
-
this.defaultDayAlpha = undefined;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0
|
|
132
|
-
* makes the imagery darker while greater than 1.0 makes it brighter.
|
|
133
|
-
*
|
|
134
|
-
* @type {number|undefined}
|
|
135
|
-
* @default undefined
|
|
136
|
-
*/
|
|
137
|
-
this.defaultBrightness = undefined;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
|
|
141
|
-
* the contrast while greater than 1.0 increases it.
|
|
142
|
-
*
|
|
143
|
-
* @type {number|undefined}
|
|
144
|
-
* @default undefined
|
|
145
|
-
*/
|
|
146
|
-
this.defaultContrast = undefined;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* The default hue of this provider in radians. 0.0 uses the unmodified imagery color.
|
|
150
|
-
*
|
|
151
|
-
* @type {number|undefined}
|
|
152
|
-
* @default undefined
|
|
153
|
-
*/
|
|
154
|
-
this.defaultHue = undefined;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
|
|
158
|
-
* saturation while greater than 1.0 increases it.
|
|
159
|
-
*
|
|
160
|
-
* @type {number|undefined}
|
|
161
|
-
* @default undefined
|
|
162
|
-
*/
|
|
163
|
-
this.defaultSaturation = undefined;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color.
|
|
167
|
-
*
|
|
168
|
-
* @type {number|undefined}
|
|
169
|
-
* @default 1.9
|
|
170
|
-
*/
|
|
171
|
-
this.defaultGamma = 1.9;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* The default texture minification filter to apply to this provider.
|
|
175
|
-
*
|
|
176
|
-
* @type {TextureMinificationFilter}
|
|
177
|
-
* @default undefined
|
|
178
|
-
*/
|
|
179
|
-
this.defaultMinificationFilter = undefined;
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* The default texture magnification filter to apply to this provider.
|
|
183
|
-
*
|
|
184
|
-
* @type {TextureMagnificationFilter}
|
|
185
|
-
* @default undefined
|
|
186
|
-
*/
|
|
187
|
-
this.defaultMagnificationFilter = undefined;
|
|
209
|
+
this._defaultAlpha = undefined;
|
|
210
|
+
this._defaultNightAlpha = undefined;
|
|
211
|
+
this._defaultDayAlpha = undefined;
|
|
212
|
+
this._defaultBrightness = undefined;
|
|
213
|
+
this._defaultContrast = undefined;
|
|
214
|
+
this._defaultHue = undefined;
|
|
215
|
+
this._defaultSaturation = undefined;
|
|
216
|
+
this._defaultGamma = 1.9;
|
|
217
|
+
this._defaultMinificationFilter = undefined;
|
|
218
|
+
this._defaultMagnificationFilter = undefined;
|
|
188
219
|
|
|
189
|
-
const url = options.url;
|
|
190
|
-
const path = defaultValue(options.path, "/default_map");
|
|
191
|
-
|
|
192
|
-
const resource = Resource.createIfNeeded(url).getDerivedResource({
|
|
193
|
-
// We used to just append path to url, so now that we do proper URI resolution, removed the /
|
|
194
|
-
url: path[0] === "/" ? path.substring(1) : path,
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
resource.appendForwardSlash();
|
|
198
|
-
|
|
199
|
-
this._resource = resource;
|
|
200
|
-
this._url = url;
|
|
201
|
-
this._path = path;
|
|
202
220
|
this._tileDiscardPolicy = options.tileDiscardPolicy;
|
|
203
221
|
this._channel = options.channel;
|
|
204
222
|
this._requestType = "ImageryMaps";
|
|
@@ -216,126 +234,56 @@ function GoogleEarthEnterpriseMapsProvider(options) {
|
|
|
216
234
|
|
|
217
235
|
this._errorEvent = new Event();
|
|
218
236
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
url
|
|
222
|
-
|
|
223
|
-
request: "Json",
|
|
224
|
-
vars: "geeServerDefs",
|
|
225
|
-
is2d: "t",
|
|
226
|
-
},
|
|
227
|
-
});
|
|
228
|
-
const that = this;
|
|
229
|
-
let metadataError;
|
|
230
|
-
|
|
231
|
-
function metadataSuccess(text) {
|
|
232
|
-
let data;
|
|
233
|
-
|
|
234
|
-
// The Google Earth server sends malformed JSON data currently...
|
|
235
|
-
try {
|
|
236
|
-
// First, try parsing it like normal in case a future version sends correctly formatted JSON
|
|
237
|
-
data = JSON.parse(text);
|
|
238
|
-
} catch (e) {
|
|
239
|
-
// Quote object strings manually, then try parsing again
|
|
240
|
-
data = JSON.parse(
|
|
241
|
-
text.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g, '$1"$2":')
|
|
242
|
-
);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
let layer;
|
|
246
|
-
for (let i = 0; i < data.layers.length; i++) {
|
|
247
|
-
if (data.layers[i].id === that._channel) {
|
|
248
|
-
layer = data.layers[i];
|
|
249
|
-
break;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
let message;
|
|
254
|
-
|
|
255
|
-
if (!defined(layer)) {
|
|
256
|
-
message = `Could not find layer with channel (id) of ${that._channel}.`;
|
|
257
|
-
metadataError = TileProviderError.reportError(
|
|
258
|
-
metadataError,
|
|
259
|
-
that,
|
|
260
|
-
that._errorEvent,
|
|
261
|
-
message
|
|
262
|
-
);
|
|
263
|
-
if (metadataError.retry) {
|
|
264
|
-
return requestMetadata();
|
|
265
|
-
}
|
|
266
|
-
return Promise.reject(new RuntimeError(message));
|
|
237
|
+
if (defined(options.url) || defined(options.channel)) {
|
|
238
|
+
//>>includeStart('debug', pragmas.debug);
|
|
239
|
+
if (!defined(options.url)) {
|
|
240
|
+
throw new DeveloperError("options.url is required.");
|
|
267
241
|
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
message = `Could not find a version in channel (id) ${that._channel}.`;
|
|
271
|
-
metadataError = TileProviderError.reportError(
|
|
272
|
-
metadataError,
|
|
273
|
-
that,
|
|
274
|
-
that._errorEvent,
|
|
275
|
-
message
|
|
276
|
-
);
|
|
277
|
-
if (metadataError.retry) {
|
|
278
|
-
return requestMetadata();
|
|
279
|
-
}
|
|
280
|
-
return Promise.reject(new RuntimeError(message));
|
|
242
|
+
if (!defined(options.channel)) {
|
|
243
|
+
throw new DeveloperError("options.channel is required.");
|
|
281
244
|
}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
if (defined(data.projection) && data.projection === "flat") {
|
|
285
|
-
that._tilingScheme = new GeographicTilingScheme({
|
|
286
|
-
numberOfLevelZeroTilesX: 2,
|
|
287
|
-
numberOfLevelZeroTilesY: 2,
|
|
288
|
-
rectangle: new Rectangle(-Math.PI, -Math.PI, Math.PI, Math.PI),
|
|
289
|
-
ellipsoid: options.ellipsoid,
|
|
290
|
-
});
|
|
291
|
-
// Default to mercator projection when projection is undefined
|
|
292
|
-
} else if (!defined(data.projection) || data.projection === "mercator") {
|
|
293
|
-
that._tilingScheme = new WebMercatorTilingScheme({
|
|
294
|
-
numberOfLevelZeroTilesX: 2,
|
|
295
|
-
numberOfLevelZeroTilesY: 2,
|
|
296
|
-
ellipsoid: options.ellipsoid,
|
|
297
|
-
});
|
|
298
|
-
} else {
|
|
299
|
-
message = `Unsupported projection ${data.projection}.`;
|
|
300
|
-
metadataError = TileProviderError.reportError(
|
|
301
|
-
metadataError,
|
|
302
|
-
that,
|
|
303
|
-
that._errorEvent,
|
|
304
|
-
message
|
|
305
|
-
);
|
|
306
|
-
if (metadataError.retry) {
|
|
307
|
-
return requestMetadata();
|
|
308
|
-
}
|
|
309
|
-
return Promise.reject(new RuntimeError(message));
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
that._ready = true;
|
|
313
|
-
TileProviderError.reportSuccess(metadataError);
|
|
314
|
-
return Promise.resolve(true);
|
|
315
|
-
}
|
|
245
|
+
//>>includeEnd('debug');
|
|
316
246
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
`An error occurred while accessing ${metadataResource.url}.`
|
|
247
|
+
deprecationWarning(
|
|
248
|
+
"GoogleEarthEnterpriseMapsProvider.url",
|
|
249
|
+
"GoogleEarthEnterpriseMapsProvider.url and GoogleEarthEnterpriseMapsProvider.channel were deprecated in CesiumJS 1.104. They will be in CesiumJS 1.107. Use GoogleEarthEnterpriseMapsProvider.fromUrl instead."
|
|
321
250
|
);
|
|
322
|
-
metadataError = TileProviderError.reportError(
|
|
323
|
-
metadataError,
|
|
324
|
-
that,
|
|
325
|
-
that._errorEvent,
|
|
326
|
-
message
|
|
327
|
-
);
|
|
328
|
-
return Promise.reject(new RuntimeError(message));
|
|
329
|
-
}
|
|
330
251
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
252
|
+
const url = options.url;
|
|
253
|
+
const path = defaultValue(options.path, "/default_map");
|
|
254
|
+
|
|
255
|
+
const resource = Resource.createIfNeeded(url).getDerivedResource({
|
|
256
|
+
// We used to just append path to url, so now that we do proper URI resolution, removed the /
|
|
257
|
+
url: path[0] === "/" ? path.substring(1) : path,
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
resource.appendForwardSlash();
|
|
261
|
+
|
|
262
|
+
this._resource = resource;
|
|
263
|
+
this._url = url;
|
|
264
|
+
this._path = path;
|
|
265
|
+
|
|
266
|
+
this._ready = false;
|
|
267
|
+
const metadataResource = resource.getDerivedResource({
|
|
268
|
+
url: "query",
|
|
269
|
+
queryParameters: {
|
|
270
|
+
request: "Json",
|
|
271
|
+
vars: "geeServerDefs",
|
|
272
|
+
is2d: "t",
|
|
273
|
+
},
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
const imageryProviderBuilder = new ImageryProviderBuilder(options);
|
|
277
|
+
this._readyPromise = requestMetadata(
|
|
278
|
+
metadataResource,
|
|
279
|
+
imageryProviderBuilder,
|
|
280
|
+
this
|
|
281
|
+
).then(() => {
|
|
282
|
+
imageryProviderBuilder.build(this);
|
|
283
|
+
this._ready = true;
|
|
284
|
+
return true;
|
|
285
|
+
});
|
|
336
286
|
}
|
|
337
|
-
|
|
338
|
-
this._readyPromise = requestMetadata();
|
|
339
287
|
}
|
|
340
288
|
|
|
341
289
|
Object.defineProperties(GoogleEarthEnterpriseMapsProvider.prototype, {
|
|
@@ -388,168 +336,96 @@ Object.defineProperties(GoogleEarthEnterpriseMapsProvider.prototype, {
|
|
|
388
336
|
},
|
|
389
337
|
|
|
390
338
|
/**
|
|
391
|
-
* Gets the width of each tile, in pixels.
|
|
392
|
-
* not be called before {@link GoogleEarthEnterpriseMapsProvider#ready} returns true.
|
|
339
|
+
* Gets the width of each tile, in pixels.
|
|
393
340
|
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
394
341
|
* @type {number}
|
|
395
342
|
* @readonly
|
|
396
343
|
*/
|
|
397
344
|
tileWidth: {
|
|
398
345
|
get: function () {
|
|
399
|
-
//>>includeStart('debug', pragmas.debug);
|
|
400
|
-
if (!this._ready) {
|
|
401
|
-
throw new DeveloperError(
|
|
402
|
-
"tileWidth must not be called before the imagery provider is ready."
|
|
403
|
-
);
|
|
404
|
-
}
|
|
405
|
-
//>>includeEnd('debug');
|
|
406
|
-
|
|
407
346
|
return this._tileWidth;
|
|
408
347
|
},
|
|
409
348
|
},
|
|
410
349
|
|
|
411
350
|
/**
|
|
412
|
-
* Gets the height of each tile, in pixels.
|
|
413
|
-
* not be called before {@link GoogleEarthEnterpriseMapsProvider#ready} returns true.
|
|
351
|
+
* Gets the height of each tile, in pixels.
|
|
414
352
|
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
415
353
|
* @type {number}
|
|
416
354
|
* @readonly
|
|
417
355
|
*/
|
|
418
356
|
tileHeight: {
|
|
419
357
|
get: function () {
|
|
420
|
-
//>>includeStart('debug', pragmas.debug);
|
|
421
|
-
if (!this._ready) {
|
|
422
|
-
throw new DeveloperError(
|
|
423
|
-
"tileHeight must not be called before the imagery provider is ready."
|
|
424
|
-
);
|
|
425
|
-
}
|
|
426
|
-
//>>includeEnd('debug');
|
|
427
|
-
|
|
428
358
|
return this._tileHeight;
|
|
429
359
|
},
|
|
430
360
|
},
|
|
431
361
|
|
|
432
362
|
/**
|
|
433
|
-
* Gets the maximum level-of-detail that can be requested.
|
|
434
|
-
* not be called before {@link GoogleEarthEnterpriseMapsProvider#ready} returns true.
|
|
363
|
+
* Gets the maximum level-of-detail that can be requested.
|
|
435
364
|
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
436
365
|
* @type {number|undefined}
|
|
437
366
|
* @readonly
|
|
438
367
|
*/
|
|
439
368
|
maximumLevel: {
|
|
440
369
|
get: function () {
|
|
441
|
-
//>>includeStart('debug', pragmas.debug);
|
|
442
|
-
if (!this._ready) {
|
|
443
|
-
throw new DeveloperError(
|
|
444
|
-
"maximumLevel must not be called before the imagery provider is ready."
|
|
445
|
-
);
|
|
446
|
-
}
|
|
447
|
-
//>>includeEnd('debug');
|
|
448
|
-
|
|
449
370
|
return this._maximumLevel;
|
|
450
371
|
},
|
|
451
372
|
},
|
|
452
373
|
|
|
453
374
|
/**
|
|
454
|
-
* Gets the minimum level-of-detail that can be requested.
|
|
455
|
-
* not be called before {@link GoogleEarthEnterpriseMapsProvider#ready} returns true.
|
|
375
|
+
* Gets the minimum level-of-detail that can be requested.
|
|
456
376
|
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
457
377
|
* @type {number}
|
|
458
378
|
* @readonly
|
|
459
379
|
*/
|
|
460
380
|
minimumLevel: {
|
|
461
381
|
get: function () {
|
|
462
|
-
//>>includeStart('debug', pragmas.debug);
|
|
463
|
-
if (!this._ready) {
|
|
464
|
-
throw new DeveloperError(
|
|
465
|
-
"minimumLevel must not be called before the imagery provider is ready."
|
|
466
|
-
);
|
|
467
|
-
}
|
|
468
|
-
//>>includeEnd('debug');
|
|
469
|
-
|
|
470
382
|
return 0;
|
|
471
383
|
},
|
|
472
384
|
},
|
|
473
385
|
|
|
474
386
|
/**
|
|
475
|
-
* Gets the tiling scheme used by this provider.
|
|
476
|
-
* not be called before {@link GoogleEarthEnterpriseMapsProvider#ready} returns true.
|
|
387
|
+
* Gets the tiling scheme used by this provider.
|
|
477
388
|
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
478
389
|
* @type {TilingScheme}
|
|
479
390
|
* @readonly
|
|
480
391
|
*/
|
|
481
392
|
tilingScheme: {
|
|
482
393
|
get: function () {
|
|
483
|
-
//>>includeStart('debug', pragmas.debug);
|
|
484
|
-
if (!this._ready) {
|
|
485
|
-
throw new DeveloperError(
|
|
486
|
-
"tilingScheme must not be called before the imagery provider is ready."
|
|
487
|
-
);
|
|
488
|
-
}
|
|
489
|
-
//>>includeEnd('debug');
|
|
490
|
-
|
|
491
394
|
return this._tilingScheme;
|
|
492
395
|
},
|
|
493
396
|
},
|
|
494
397
|
|
|
495
398
|
/**
|
|
496
|
-
* Gets the version of the data used by this provider.
|
|
497
|
-
* not be called before {@link GoogleEarthEnterpriseMapsProvider#ready} returns true.
|
|
399
|
+
* Gets the version of the data used by this provider.
|
|
498
400
|
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
499
401
|
* @type {number}
|
|
500
402
|
* @readonly
|
|
501
403
|
*/
|
|
502
404
|
version: {
|
|
503
405
|
get: function () {
|
|
504
|
-
//>>includeStart('debug', pragmas.debug);
|
|
505
|
-
if (!this._ready) {
|
|
506
|
-
throw new DeveloperError(
|
|
507
|
-
"version must not be called before the imagery provider is ready."
|
|
508
|
-
);
|
|
509
|
-
}
|
|
510
|
-
//>>includeEnd('debug');
|
|
511
|
-
|
|
512
406
|
return this._version;
|
|
513
407
|
},
|
|
514
408
|
},
|
|
515
409
|
|
|
516
410
|
/**
|
|
517
|
-
* Gets the type of data that is being requested from the provider.
|
|
518
|
-
* not be called before {@link GoogleEarthEnterpriseMapsProvider#ready} returns true.
|
|
411
|
+
* Gets the type of data that is being requested from the provider.
|
|
519
412
|
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
520
413
|
* @type {string}
|
|
521
414
|
* @readonly
|
|
522
415
|
*/
|
|
523
416
|
requestType: {
|
|
524
417
|
get: function () {
|
|
525
|
-
//>>includeStart('debug', pragmas.debug);
|
|
526
|
-
if (!this._ready) {
|
|
527
|
-
throw new DeveloperError(
|
|
528
|
-
"requestType must not be called before the imagery provider is ready."
|
|
529
|
-
);
|
|
530
|
-
}
|
|
531
|
-
//>>includeEnd('debug');
|
|
532
|
-
|
|
533
418
|
return this._requestType;
|
|
534
419
|
},
|
|
535
420
|
},
|
|
536
421
|
/**
|
|
537
|
-
* Gets the rectangle, in radians, of the imagery provided by this instance.
|
|
538
|
-
* not be called before {@link GoogleEarthEnterpriseMapsProvider#ready} returns true.
|
|
422
|
+
* Gets the rectangle, in radians, of the imagery provided by this instance.
|
|
539
423
|
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
540
424
|
* @type {Rectangle}
|
|
541
425
|
* @readonly
|
|
542
426
|
*/
|
|
543
427
|
rectangle: {
|
|
544
428
|
get: function () {
|
|
545
|
-
//>>includeStart('debug', pragmas.debug);
|
|
546
|
-
if (!this._ready) {
|
|
547
|
-
throw new DeveloperError(
|
|
548
|
-
"rectangle must not be called before the imagery provider is ready."
|
|
549
|
-
);
|
|
550
|
-
}
|
|
551
|
-
//>>includeEnd('debug');
|
|
552
|
-
|
|
553
429
|
return this._tilingScheme.rectangle;
|
|
554
430
|
},
|
|
555
431
|
},
|
|
@@ -557,22 +433,13 @@ Object.defineProperties(GoogleEarthEnterpriseMapsProvider.prototype, {
|
|
|
557
433
|
/**
|
|
558
434
|
* Gets the tile discard policy. If not undefined, the discard policy is responsible
|
|
559
435
|
* for filtering out "missing" tiles via its shouldDiscardImage function. If this function
|
|
560
|
-
* returns undefined, no tiles are filtered.
|
|
561
|
-
* not be called before {@link GoogleEarthEnterpriseMapsProvider#ready} returns true.
|
|
436
|
+
* returns undefined, no tiles are filtered.
|
|
562
437
|
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
563
438
|
* @type {TileDiscardPolicy}
|
|
564
439
|
* @readonly
|
|
565
440
|
*/
|
|
566
441
|
tileDiscardPolicy: {
|
|
567
442
|
get: function () {
|
|
568
|
-
//>>includeStart('debug', pragmas.debug);
|
|
569
|
-
if (!this._ready) {
|
|
570
|
-
throw new DeveloperError(
|
|
571
|
-
"tileDiscardPolicy must not be called before the imagery provider is ready."
|
|
572
|
-
);
|
|
573
|
-
}
|
|
574
|
-
//>>includeEnd('debug');
|
|
575
|
-
|
|
576
443
|
return this._tileDiscardPolicy;
|
|
577
444
|
},
|
|
578
445
|
},
|
|
@@ -596,9 +463,14 @@ Object.defineProperties(GoogleEarthEnterpriseMapsProvider.prototype, {
|
|
|
596
463
|
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
597
464
|
* @type {boolean}
|
|
598
465
|
* @readonly
|
|
466
|
+
* @deprecated
|
|
599
467
|
*/
|
|
600
468
|
ready: {
|
|
601
469
|
get: function () {
|
|
470
|
+
deprecationWarning(
|
|
471
|
+
"GoogleEarthEnterpriseMapsProvider.ready",
|
|
472
|
+
"GoogleEarthEnterpriseMapsProvider.ready was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use GoogleEarthEnterpriseMapsProvider.fromUrl instead."
|
|
473
|
+
);
|
|
602
474
|
return this._ready;
|
|
603
475
|
},
|
|
604
476
|
},
|
|
@@ -608,16 +480,21 @@ Object.defineProperties(GoogleEarthEnterpriseMapsProvider.prototype, {
|
|
|
608
480
|
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
609
481
|
* @type {Promise<boolean>}
|
|
610
482
|
* @readonly
|
|
483
|
+
* @deprecated
|
|
611
484
|
*/
|
|
612
485
|
readyPromise: {
|
|
613
486
|
get: function () {
|
|
487
|
+
deprecationWarning(
|
|
488
|
+
"GoogleEarthEnterpriseMapsProvider.readyPromise",
|
|
489
|
+
"GoogleEarthEnterpriseMapsProvider.readyPromise was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use GoogleEarthEnterpriseMapsProvider.fromUrl instead."
|
|
490
|
+
);
|
|
614
491
|
return this._readyPromise;
|
|
615
492
|
},
|
|
616
493
|
},
|
|
617
494
|
|
|
618
495
|
/**
|
|
619
496
|
* Gets the credit to display when this imagery provider is active. Typically this is used to credit
|
|
620
|
-
* the source of the imagery.
|
|
497
|
+
* the source of the imagery.
|
|
621
498
|
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
622
499
|
* @type {Credit}
|
|
623
500
|
* @readonly
|
|
@@ -643,8 +520,304 @@ Object.defineProperties(GoogleEarthEnterpriseMapsProvider.prototype, {
|
|
|
643
520
|
return true;
|
|
644
521
|
},
|
|
645
522
|
},
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* The default alpha blending value of this provider, with 0.0 representing fully transparent and
|
|
526
|
+
* 1.0 representing fully opaque.
|
|
527
|
+
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
528
|
+
* @type {Number|undefined}
|
|
529
|
+
* @deprecated
|
|
530
|
+
*/
|
|
531
|
+
defaultAlpha: {
|
|
532
|
+
get: function () {
|
|
533
|
+
deprecationWarning(
|
|
534
|
+
"GoogleEarthEnterpriseMapsProvider.defaultAlpha",
|
|
535
|
+
"GoogleEarthEnterpriseMapsProvider.defaultAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.alpha instead."
|
|
536
|
+
);
|
|
537
|
+
return this._defaultAlpha;
|
|
538
|
+
},
|
|
539
|
+
set: function (value) {
|
|
540
|
+
deprecationWarning(
|
|
541
|
+
"GoogleEarthEnterpriseMapsProvider.defaultAlpha",
|
|
542
|
+
"GoogleEarthEnterpriseMapsProvider.defaultAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.alpha instead."
|
|
543
|
+
);
|
|
544
|
+
this._defaultAlpha = value;
|
|
545
|
+
},
|
|
546
|
+
},
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
|
|
550
|
+
* 1.0 representing fully opaque.
|
|
551
|
+
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
552
|
+
* @type {Number|undefined}
|
|
553
|
+
* @deprecated
|
|
554
|
+
*/
|
|
555
|
+
defaultNightAlpha: {
|
|
556
|
+
get: function () {
|
|
557
|
+
deprecationWarning(
|
|
558
|
+
"GoogleEarthEnterpriseMapsProvider.defaultNightAlpha",
|
|
559
|
+
"GoogleEarthEnterpriseMapsProvider.defaultNightAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.nightAlpha instead."
|
|
560
|
+
);
|
|
561
|
+
return this.defaultNightAlpha;
|
|
562
|
+
},
|
|
563
|
+
set: function (value) {
|
|
564
|
+
deprecationWarning(
|
|
565
|
+
"GoogleEarthEnterpriseMapsProvider.defaultNightAlpha",
|
|
566
|
+
"GoogleEarthEnterpriseMapsProvider.defaultNightAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.nightAlpha instead."
|
|
567
|
+
);
|
|
568
|
+
this.defaultNightAlpha = value;
|
|
569
|
+
},
|
|
570
|
+
},
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and
|
|
574
|
+
* 1.0 representing fully opaque.
|
|
575
|
+
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
576
|
+
* @type {Number|undefined}
|
|
577
|
+
* @deprecated
|
|
578
|
+
*/
|
|
579
|
+
defaultDayAlpha: {
|
|
580
|
+
get: function () {
|
|
581
|
+
deprecationWarning(
|
|
582
|
+
"GoogleEarthEnterpriseMapsProvider.defaultDayAlpha",
|
|
583
|
+
"GoogleEarthEnterpriseMapsProvider.defaultDayAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.dayAlpha instead."
|
|
584
|
+
);
|
|
585
|
+
return this._defaultDayAlpha;
|
|
586
|
+
},
|
|
587
|
+
set: function (value) {
|
|
588
|
+
deprecationWarning(
|
|
589
|
+
"GoogleEarthEnterpriseMapsProvider.defaultDayAlpha",
|
|
590
|
+
"GoogleEarthEnterpriseMapsProvider.defaultDayAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.dayAlpha instead."
|
|
591
|
+
);
|
|
592
|
+
this._defaultDayAlpha = value;
|
|
593
|
+
},
|
|
594
|
+
},
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0
|
|
598
|
+
* makes the imagery darker while greater than 1.0 makes it brighter.
|
|
599
|
+
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
600
|
+
* @type {Number|undefined}
|
|
601
|
+
* @deprecated
|
|
602
|
+
*/
|
|
603
|
+
defaultBrightness: {
|
|
604
|
+
get: function () {
|
|
605
|
+
deprecationWarning(
|
|
606
|
+
"GoogleEarthEnterpriseMapsProvider.defaultBrightness",
|
|
607
|
+
"GoogleEarthEnterpriseMapsProvider.defaultBrightness was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.brightness instead."
|
|
608
|
+
);
|
|
609
|
+
return this._defaultBrightness;
|
|
610
|
+
},
|
|
611
|
+
set: function (value) {
|
|
612
|
+
deprecationWarning(
|
|
613
|
+
"GoogleEarthEnterpriseMapsProvider.defaultBrightness",
|
|
614
|
+
"GoogleEarthEnterpriseMapsProvider.defaultBrightness was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.brightness instead."
|
|
615
|
+
);
|
|
616
|
+
this._defaultBrightness = value;
|
|
617
|
+
},
|
|
618
|
+
},
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
|
|
622
|
+
* the contrast while greater than 1.0 increases it.
|
|
623
|
+
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
624
|
+
* @type {Number|undefined}
|
|
625
|
+
* @deprecated
|
|
626
|
+
*/
|
|
627
|
+
defaultContrast: {
|
|
628
|
+
get: function () {
|
|
629
|
+
deprecationWarning(
|
|
630
|
+
"GoogleEarthEnterpriseMapsProvider.defaultContrast",
|
|
631
|
+
"GoogleEarthEnterpriseMapsProvider.defaultContrast was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.contrast instead."
|
|
632
|
+
);
|
|
633
|
+
return this._defaultContrast;
|
|
634
|
+
},
|
|
635
|
+
set: function (value) {
|
|
636
|
+
deprecationWarning(
|
|
637
|
+
"GoogleEarthEnterpriseMapsProvider.defaultContrast",
|
|
638
|
+
"GoogleEarthEnterpriseMapsProvider.defaultContrast was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.contrast instead."
|
|
639
|
+
);
|
|
640
|
+
this._defaultContrast = value;
|
|
641
|
+
},
|
|
642
|
+
},
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* The default hue of this provider in radians. 0.0 uses the unmodified imagery color.
|
|
646
|
+
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
647
|
+
* @type {Number|undefined}
|
|
648
|
+
* @deprecated
|
|
649
|
+
*/
|
|
650
|
+
defaultHue: {
|
|
651
|
+
get: function () {
|
|
652
|
+
deprecationWarning(
|
|
653
|
+
"GoogleEarthEnterpriseMapsProvider.defaultHue",
|
|
654
|
+
"GoogleEarthEnterpriseMapsProvider.defaultHue was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.hue instead."
|
|
655
|
+
);
|
|
656
|
+
return this._defaultHue;
|
|
657
|
+
},
|
|
658
|
+
set: function (value) {
|
|
659
|
+
deprecationWarning(
|
|
660
|
+
"GoogleEarthEnterpriseMapsProvider.defaultHue",
|
|
661
|
+
"GoogleEarthEnterpriseMapsProvider.defaultHue was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.hue instead."
|
|
662
|
+
);
|
|
663
|
+
this._defaultHue = value;
|
|
664
|
+
},
|
|
665
|
+
},
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
|
|
669
|
+
* saturation while greater than 1.0 increases it.
|
|
670
|
+
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
671
|
+
* @type {Number|undefined}
|
|
672
|
+
* @deprecated
|
|
673
|
+
*/
|
|
674
|
+
defaultSaturation: {
|
|
675
|
+
get: function () {
|
|
676
|
+
deprecationWarning(
|
|
677
|
+
"GoogleEarthEnterpriseMapsProvider.defaultSaturation",
|
|
678
|
+
"GoogleEarthEnterpriseMapsProvider.defaultSaturation was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.saturation instead."
|
|
679
|
+
);
|
|
680
|
+
return this._defaultSaturation;
|
|
681
|
+
},
|
|
682
|
+
set: function (value) {
|
|
683
|
+
deprecationWarning(
|
|
684
|
+
"GoogleEarthEnterpriseMapsProvider.defaultSaturation",
|
|
685
|
+
"GoogleEarthEnterpriseMapsProvider.defaultSaturation was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.saturation instead."
|
|
686
|
+
);
|
|
687
|
+
this._defaultSaturation = value;
|
|
688
|
+
},
|
|
689
|
+
},
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color.
|
|
693
|
+
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
694
|
+
* @type {Number|undefined}
|
|
695
|
+
* @deprecated
|
|
696
|
+
*/
|
|
697
|
+
defaultGamma: {
|
|
698
|
+
get: function () {
|
|
699
|
+
deprecationWarning(
|
|
700
|
+
"GoogleEarthEnterpriseMapsProvider.defaultGamma",
|
|
701
|
+
"GoogleEarthEnterpriseMapsProvider.defaultGamma was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.gamma instead."
|
|
702
|
+
);
|
|
703
|
+
return this._defaultGamma;
|
|
704
|
+
},
|
|
705
|
+
set: function (value) {
|
|
706
|
+
deprecationWarning(
|
|
707
|
+
"GoogleEarthEnterpriseMapsProvider.defaultGamma",
|
|
708
|
+
"GoogleEarthEnterpriseMapsProvider.defaultGamma was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.gamma instead."
|
|
709
|
+
);
|
|
710
|
+
this._defaultGamma = value;
|
|
711
|
+
},
|
|
712
|
+
},
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* The default texture minification filter to apply to this provider.
|
|
716
|
+
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
717
|
+
* @type {TextureMinificationFilter}
|
|
718
|
+
* @deprecated
|
|
719
|
+
*/
|
|
720
|
+
defaultMinificationFilter: {
|
|
721
|
+
get: function () {
|
|
722
|
+
deprecationWarning(
|
|
723
|
+
"GoogleEarthEnterpriseMapsProvider.defaultMinificationFilter",
|
|
724
|
+
"GoogleEarthEnterpriseMapsProvider.defaultMinificationFilter was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.minificationFilter instead."
|
|
725
|
+
);
|
|
726
|
+
return this._defaultMinificationFilter;
|
|
727
|
+
},
|
|
728
|
+
set: function (value) {
|
|
729
|
+
deprecationWarning(
|
|
730
|
+
"GoogleEarthEnterpriseMapsProvider.defaultMinificationFilter",
|
|
731
|
+
"GoogleEarthEnterpriseMapsProvider.defaultMinificationFilter was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.minificationFilter instead."
|
|
732
|
+
);
|
|
733
|
+
this._defaultMinificationFilter = value;
|
|
734
|
+
},
|
|
735
|
+
},
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* The default texture magnification filter to apply to this provider.
|
|
739
|
+
* @memberof GoogleEarthEnterpriseMapsProvider.prototype
|
|
740
|
+
* @type {TextureMagnificationFilter}
|
|
741
|
+
* @deprecated
|
|
742
|
+
*/
|
|
743
|
+
defaultMagnificationFilter: {
|
|
744
|
+
get: function () {
|
|
745
|
+
deprecationWarning(
|
|
746
|
+
"GoogleEarthEnterpriseMapsProvider.defaultMagnificationFilter",
|
|
747
|
+
"GoogleEarthEnterpriseMapsProvider.defaultMagnificationFilter was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.magnificationFilter instead."
|
|
748
|
+
);
|
|
749
|
+
return this._defaultMagnificationFilter;
|
|
750
|
+
},
|
|
751
|
+
set: function (value) {
|
|
752
|
+
deprecationWarning(
|
|
753
|
+
"GoogleEarthEnterpriseMapsProvider.defaultMagnificationFilter",
|
|
754
|
+
"GoogleEarthEnterpriseMapsProvider.defaultMagnificationFilter was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.magnificationFilter instead."
|
|
755
|
+
);
|
|
756
|
+
this._defaultMagnificationFilter = value;
|
|
757
|
+
},
|
|
758
|
+
},
|
|
646
759
|
});
|
|
647
760
|
|
|
761
|
+
/**
|
|
762
|
+
* Creates a tiled imagery provider using the Google Earth Imagery API.
|
|
763
|
+
*
|
|
764
|
+
* @param {Resource|String} url The url of the Google Earth server hosting the imagery.
|
|
765
|
+
* @param {GoogleEarthEnterpriseMapsProvider.ConstructorOptions} [options] Object describing initialization options
|
|
766
|
+
* @returns {Promise<GoogleEarthEnterpriseMapsProvider>} The created GoogleEarthEnterpriseMapsProvider.
|
|
767
|
+
*
|
|
768
|
+
* @exception {RuntimeError} Could not find layer with channel (id) of <code>options.channel</code>.
|
|
769
|
+
* @exception {RuntimeError} Could not find a version in channel (id) <code>options.channel</code>.
|
|
770
|
+
* @exception {RuntimeError} Unsupported projection <code>data.projection</code>.
|
|
771
|
+
*
|
|
772
|
+
* @example
|
|
773
|
+
* const google = await Cesium.GoogleEarthEnterpriseMapsProvider.fromUrl("https://earth.localdomain", 1008);
|
|
774
|
+
*/
|
|
775
|
+
GoogleEarthEnterpriseMapsProvider.fromUrl = async function (
|
|
776
|
+
url,
|
|
777
|
+
channel,
|
|
778
|
+
options
|
|
779
|
+
) {
|
|
780
|
+
//>>includeStart('debug', pragmas.debug);
|
|
781
|
+
Check.defined("url", url);
|
|
782
|
+
Check.defined("channel", channel);
|
|
783
|
+
//>>includeEnd('debug');
|
|
784
|
+
|
|
785
|
+
options = defaultValue(options, {});
|
|
786
|
+
|
|
787
|
+
const path = defaultValue(options.path, "/default_map");
|
|
788
|
+
|
|
789
|
+
const resource = Resource.createIfNeeded(url).getDerivedResource({
|
|
790
|
+
// We used to just append path to url, so now that we do proper URI resolution, removed the /
|
|
791
|
+
url: path[0] === "/" ? path.substring(1) : path,
|
|
792
|
+
});
|
|
793
|
+
|
|
794
|
+
resource.appendForwardSlash();
|
|
795
|
+
|
|
796
|
+
const metadataResource = resource.getDerivedResource({
|
|
797
|
+
url: "query",
|
|
798
|
+
queryParameters: {
|
|
799
|
+
request: "Json",
|
|
800
|
+
vars: "geeServerDefs",
|
|
801
|
+
is2d: "t",
|
|
802
|
+
},
|
|
803
|
+
});
|
|
804
|
+
|
|
805
|
+
const imageryProviderBuilder = new ImageryProviderBuilder(options);
|
|
806
|
+
imageryProviderBuilder.channel = channel;
|
|
807
|
+
await requestMetadata(metadataResource, imageryProviderBuilder);
|
|
808
|
+
|
|
809
|
+
const provider = new GoogleEarthEnterpriseMapsProvider(options);
|
|
810
|
+
imageryProviderBuilder.build(provider);
|
|
811
|
+
|
|
812
|
+
provider._readyPromise = Promise.resolve(true);
|
|
813
|
+
provider._ready = true;
|
|
814
|
+
provider._resource = resource;
|
|
815
|
+
provider._url = url;
|
|
816
|
+
provider._path = path;
|
|
817
|
+
|
|
818
|
+
return provider;
|
|
819
|
+
};
|
|
820
|
+
|
|
648
821
|
/**
|
|
649
822
|
* Gets the credits to be displayed when a given tile is displayed.
|
|
650
823
|
*
|
|
@@ -652,8 +825,6 @@ Object.defineProperties(GoogleEarthEnterpriseMapsProvider.prototype, {
|
|
|
652
825
|
* @param {number} y The tile Y coordinate.
|
|
653
826
|
* @param {number} level The tile level;
|
|
654
827
|
* @returns {Credit[]} The credits to be displayed when the tile is displayed.
|
|
655
|
-
*
|
|
656
|
-
* @exception {DeveloperError} <code>getTileCredits</code> must not be called before the imagery provider is ready.
|
|
657
828
|
*/
|
|
658
829
|
GoogleEarthEnterpriseMapsProvider.prototype.getTileCredits = function (
|
|
659
830
|
x,
|
|
@@ -664,8 +835,7 @@ GoogleEarthEnterpriseMapsProvider.prototype.getTileCredits = function (
|
|
|
664
835
|
};
|
|
665
836
|
|
|
666
837
|
/**
|
|
667
|
-
* Requests the image for a given tile.
|
|
668
|
-
* not be called before {@link GoogleEarthEnterpriseMapsProvider#ready} returns true.
|
|
838
|
+
* Requests the image for a given tile.
|
|
669
839
|
*
|
|
670
840
|
* @param {number} x The tile X coordinate.
|
|
671
841
|
* @param {number} y The tile Y coordinate.
|
|
@@ -673,8 +843,6 @@ GoogleEarthEnterpriseMapsProvider.prototype.getTileCredits = function (
|
|
|
673
843
|
* @param {Request} [request] The request object. Intended for internal use only.
|
|
674
844
|
* @returns {Promise<ImageryTypes>|undefined} A promise for the image that will resolve when the image is available, or
|
|
675
845
|
* undefined if there are too many active requests to the server, and the request should be retried later.
|
|
676
|
-
*
|
|
677
|
-
* @exception {DeveloperError} <code>requestImage</code> must not be called before the imagery provider is ready.
|
|
678
846
|
*/
|
|
679
847
|
GoogleEarthEnterpriseMapsProvider.prototype.requestImage = function (
|
|
680
848
|
x,
|
|
@@ -682,14 +850,6 @@ GoogleEarthEnterpriseMapsProvider.prototype.requestImage = function (
|
|
|
682
850
|
level,
|
|
683
851
|
request
|
|
684
852
|
) {
|
|
685
|
-
//>>includeStart('debug', pragmas.debug);
|
|
686
|
-
if (!this._ready) {
|
|
687
|
-
throw new DeveloperError(
|
|
688
|
-
"requestImage must not be called before the imagery provider is ready."
|
|
689
|
-
);
|
|
690
|
-
}
|
|
691
|
-
//>>includeEnd('debug');
|
|
692
|
-
|
|
693
853
|
const resource = this._resource.getDerivedResource({
|
|
694
854
|
url: "query",
|
|
695
855
|
request: request,
|