@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
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import Check from "./Check.js";
|
|
1
2
|
import Credit from "./Credit.js";
|
|
2
3
|
import defaultValue from "./defaultValue.js";
|
|
3
4
|
import defined from "./defined.js";
|
|
4
|
-
import
|
|
5
|
+
import deprecationWarning from "./deprecationWarning.js";
|
|
5
6
|
import Event from "./Event.js";
|
|
6
7
|
import GeographicTilingScheme from "./GeographicTilingScheme.js";
|
|
7
8
|
import GoogleEarthEnterpriseMetadata from "./GoogleEarthEnterpriseMetadata.js";
|
|
@@ -67,46 +68,42 @@ TerrainCache.prototype.tidy = function () {
|
|
|
67
68
|
};
|
|
68
69
|
|
|
69
70
|
/**
|
|
71
|
+
* @typedef {Object} GoogleEarthEnterpriseTerrainProvider.ConstructorOptions
|
|
72
|
+
*
|
|
73
|
+
* Initialization options for GoogleEarthEnterpriseTerrainProvider constructor
|
|
74
|
+
*
|
|
75
|
+
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
|
|
76
|
+
* @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
|
|
77
|
+
* @property {Resource|string} [url] The url of the Google Earth Enterprise server hosting the imagery. Deprecated.
|
|
78
|
+
* @property {GoogleEarthEnterpriseMetadata} [metadata] A metadata object that can be used to share metadata requests with a GoogleEarthEnterpriseImageryProvider. Deprecated.
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* <div class="notice">
|
|
83
|
+
* To construct a GoogleEarthEnterpriseTerrainProvider, call {@link GoogleEarthEnterpriseTerrainProvider.fromMetadata}. Do not call the constructor directly.
|
|
84
|
+
* </div>
|
|
85
|
+
*
|
|
70
86
|
* Provides tiled terrain using the Google Earth Enterprise REST API.
|
|
71
87
|
*
|
|
72
88
|
* @alias GoogleEarthEnterpriseTerrainProvider
|
|
73
89
|
* @constructor
|
|
74
90
|
*
|
|
75
|
-
* @param {
|
|
76
|
-
* @param {Resource|string} options.url The url of the Google Earth Enterprise server hosting the imagery.
|
|
77
|
-
* @param {GoogleEarthEnterpriseMetadata} options.metadata A metadata object that can be used to share metadata requests with a GoogleEarthEnterpriseImageryProvider.
|
|
78
|
-
* @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
|
|
79
|
-
* @param {Credit|string} [options.credit] A credit for the data source, which is displayed on the canvas.
|
|
91
|
+
* @param {GoogleEarthEnterpriseTerrainProvider.ConstructorOptions} options An object describing initialization options
|
|
80
92
|
*
|
|
93
|
+
* @see GoogleEarthEnterpriseTerrainProvider.fromMetadata
|
|
94
|
+
* @see GoogleEarthEnterpriseMetadata.fromUrl
|
|
81
95
|
* @see GoogleEarthEnterpriseImageryProvider
|
|
82
96
|
* @see CesiumTerrainProvider
|
|
83
97
|
*
|
|
84
98
|
* @example
|
|
85
|
-
* const geeMetadata =
|
|
86
|
-
* const gee =
|
|
87
|
-
* metadata : geeMetadata
|
|
88
|
-
* });
|
|
99
|
+
* const geeMetadata = await GoogleEarthEnterpriseMetadata.fromUrl("http://www.example.com");
|
|
100
|
+
* const gee = Cesium.GoogleEarthEnterpriseTerrainProvider.fromMetadata(geeMetadata);
|
|
89
101
|
*
|
|
90
102
|
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
|
|
91
103
|
*/
|
|
92
104
|
function GoogleEarthEnterpriseTerrainProvider(options) {
|
|
93
105
|
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
|
|
94
106
|
|
|
95
|
-
//>>includeStart('debug', pragmas.debug);
|
|
96
|
-
if (!(defined(options.url) || defined(options.metadata))) {
|
|
97
|
-
throw new DeveloperError("options.url or options.metadata is required.");
|
|
98
|
-
}
|
|
99
|
-
//>>includeEnd('debug');
|
|
100
|
-
|
|
101
|
-
let metadata;
|
|
102
|
-
if (defined(options.metadata)) {
|
|
103
|
-
metadata = options.metadata;
|
|
104
|
-
} else {
|
|
105
|
-
const resource = Resource.createIfNeeded(options.url);
|
|
106
|
-
metadata = new GoogleEarthEnterpriseMetadata(resource);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
this._metadata = metadata;
|
|
110
107
|
this._tilingScheme = new GeographicTilingScheme({
|
|
111
108
|
numberOfLevelZeroTilesX: 2,
|
|
112
109
|
numberOfLevelZeroTilesY: 2,
|
|
@@ -133,16 +130,32 @@ function GoogleEarthEnterpriseTerrainProvider(options) {
|
|
|
133
130
|
this._terrainRequests = {};
|
|
134
131
|
|
|
135
132
|
this._errorEvent = new Event();
|
|
136
|
-
|
|
137
133
|
this._ready = false;
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
134
|
+
|
|
135
|
+
if (defined(options.url)) {
|
|
136
|
+
deprecationWarning(
|
|
137
|
+
"GoogleEarthEnterpriseTerrainProvider options.url",
|
|
138
|
+
"options.url was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use GoogleEarthEnterpriseTerrainProvider.fromMetadata instead."
|
|
139
|
+
);
|
|
140
|
+
const resource = Resource.createIfNeeded(options.url);
|
|
141
|
+
const that = this;
|
|
142
|
+
let metadataError;
|
|
143
|
+
this._readyPromise = GoogleEarthEnterpriseMetadata.fromUrl(resource)
|
|
144
|
+
.then((metadata) => {
|
|
145
|
+
if (!metadata.terrainPresent) {
|
|
146
|
+
const e = new RuntimeError(
|
|
147
|
+
`The server ${metadata.url} doesn't have terrain`
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
return Promise.reject(e);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
TileProviderError.reportSuccess(metadataError);
|
|
154
|
+
that._metadata = metadata;
|
|
155
|
+
that._ready = true;
|
|
156
|
+
return true;
|
|
157
|
+
})
|
|
158
|
+
.catch((e) => {
|
|
146
159
|
metadataError = TileProviderError.reportError(
|
|
147
160
|
metadataError,
|
|
148
161
|
that,
|
|
@@ -153,26 +166,29 @@ function GoogleEarthEnterpriseTerrainProvider(options) {
|
|
|
153
166
|
undefined,
|
|
154
167
|
e
|
|
155
168
|
);
|
|
156
|
-
return Promise.reject(e);
|
|
157
|
-
}
|
|
158
169
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
170
|
+
throw e;
|
|
171
|
+
});
|
|
172
|
+
} else if (defined(options.metadata)) {
|
|
173
|
+
deprecationWarning(
|
|
174
|
+
"GoogleEarthEnterpriseTerrainProvider options.metadata",
|
|
175
|
+
"options.metadata was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use GoogleEarthEnterpriseTerrainProvider.fromMetadata instead."
|
|
176
|
+
);
|
|
177
|
+
const metadata = options.metadata;
|
|
178
|
+
this._metadata = metadata;
|
|
179
|
+
const that = this;
|
|
180
|
+
this._readyPromise = Promise.resolve(this._metadata._readyPromise).then(
|
|
181
|
+
() => {
|
|
182
|
+
if (!metadata.terrainPresent) {
|
|
183
|
+
throw new RuntimeError(
|
|
184
|
+
`The server ${metadata.url} doesn't have terrain`
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
that._ready = true;
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
}
|
|
176
192
|
}
|
|
177
193
|
|
|
178
194
|
Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, {
|
|
@@ -201,22 +217,13 @@ Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, {
|
|
|
201
217
|
},
|
|
202
218
|
|
|
203
219
|
/**
|
|
204
|
-
* Gets the tiling scheme used by this provider.
|
|
205
|
-
* not be called before {@link GoogleEarthEnterpriseTerrainProvider#ready} returns true.
|
|
220
|
+
* Gets the tiling scheme used by this provider.
|
|
206
221
|
* @memberof GoogleEarthEnterpriseTerrainProvider.prototype
|
|
207
222
|
* @type {TilingScheme}
|
|
208
223
|
* @readonly
|
|
209
224
|
*/
|
|
210
225
|
tilingScheme: {
|
|
211
226
|
get: function () {
|
|
212
|
-
//>>includeStart('debug', pragmas.debug);
|
|
213
|
-
if (!this._ready) {
|
|
214
|
-
throw new DeveloperError(
|
|
215
|
-
"tilingScheme must not be called before the imagery provider is ready."
|
|
216
|
-
);
|
|
217
|
-
}
|
|
218
|
-
//>>includeEnd('debug');
|
|
219
|
-
|
|
220
227
|
return this._tilingScheme;
|
|
221
228
|
},
|
|
222
229
|
},
|
|
@@ -240,9 +247,14 @@ Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, {
|
|
|
240
247
|
* @memberof GoogleEarthEnterpriseTerrainProvider.prototype
|
|
241
248
|
* @type {boolean}
|
|
242
249
|
* @readonly
|
|
250
|
+
* @deprecated
|
|
243
251
|
*/
|
|
244
252
|
ready: {
|
|
245
253
|
get: function () {
|
|
254
|
+
deprecationWarning(
|
|
255
|
+
"GoogleEarthEnterpriseTerrainProvider.ready",
|
|
256
|
+
"GoogleEarthEnterpriseTerrainProvider.ready was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107."
|
|
257
|
+
);
|
|
246
258
|
return this._ready;
|
|
247
259
|
},
|
|
248
260
|
},
|
|
@@ -252,16 +264,21 @@ Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, {
|
|
|
252
264
|
* @memberof GoogleEarthEnterpriseTerrainProvider.prototype
|
|
253
265
|
* @type {Promise<boolean>}
|
|
254
266
|
* @readonly
|
|
267
|
+
* @deprecated
|
|
255
268
|
*/
|
|
256
269
|
readyPromise: {
|
|
257
270
|
get: function () {
|
|
271
|
+
deprecationWarning(
|
|
272
|
+
"GoogleEarthEnterpriseTerrainProvider.readyPromise",
|
|
273
|
+
"GoogleEarthEnterpriseTerrainProvider.readyPromise was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107."
|
|
274
|
+
);
|
|
258
275
|
return this._readyPromise;
|
|
259
276
|
},
|
|
260
277
|
},
|
|
261
278
|
|
|
262
279
|
/**
|
|
263
280
|
* Gets the credit to display when this terrain provider is active. Typically this is used to credit
|
|
264
|
-
* the source of the terrain.
|
|
281
|
+
* the source of the terrain.
|
|
265
282
|
* @memberof GoogleEarthEnterpriseTerrainProvider.prototype
|
|
266
283
|
* @type {Credit}
|
|
267
284
|
* @readonly
|
|
@@ -275,8 +292,7 @@ Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, {
|
|
|
275
292
|
/**
|
|
276
293
|
* Gets a value indicating whether or not the provider includes a water mask. The water mask
|
|
277
294
|
* indicates which areas of the globe are water rather than land, so they can be rendered
|
|
278
|
-
* as a reflective surface with animated waves.
|
|
279
|
-
* called before {@link GoogleEarthEnterpriseTerrainProvider#ready} returns true.
|
|
295
|
+
* as a reflective surface with animated waves.
|
|
280
296
|
* @memberof GoogleEarthEnterpriseTerrainProvider.prototype
|
|
281
297
|
* @type {boolean}
|
|
282
298
|
* @readonly
|
|
@@ -289,7 +305,6 @@ Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, {
|
|
|
289
305
|
|
|
290
306
|
/**
|
|
291
307
|
* Gets a value indicating whether or not the requested tiles include vertex normals.
|
|
292
|
-
* This function should not be called before {@link GoogleEarthEnterpriseTerrainProvider#ready} returns true.
|
|
293
308
|
* @memberof GoogleEarthEnterpriseTerrainProvider.prototype
|
|
294
309
|
* @type {boolean}
|
|
295
310
|
* @readonly
|
|
@@ -302,8 +317,7 @@ Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, {
|
|
|
302
317
|
|
|
303
318
|
/**
|
|
304
319
|
* Gets an object that can be used to determine availability of terrain from this provider, such as
|
|
305
|
-
* at points and in rectangles.
|
|
306
|
-
* {@link GoogleEarthEnterpriseTerrainProvider#ready} returns true. This property may be undefined if availability
|
|
320
|
+
* at points and in rectangles. This property may be undefined if availability
|
|
307
321
|
* information is not available.
|
|
308
322
|
* @memberof GoogleEarthEnterpriseTerrainProvider.prototype
|
|
309
323
|
* @type {TileAvailability}
|
|
@@ -316,6 +330,41 @@ Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, {
|
|
|
316
330
|
},
|
|
317
331
|
});
|
|
318
332
|
|
|
333
|
+
/**
|
|
334
|
+
* Creates a GoogleEarthTerrainProvider from GoogleEarthEnterpriseMetadata
|
|
335
|
+
*
|
|
336
|
+
* @param {GoogleEarthEnterpriseMetadata} metadata A metadata object that can be used to share metadata requests with a GoogleEarthEnterpriseImageryProvider.
|
|
337
|
+
* @param {GoogleEarthEnterpriseTerrainProvider.ConstructorOptions} options An object describing initialization options
|
|
338
|
+
* @returns {GoogleEarthEnterpriseTerrainProvider}
|
|
339
|
+
*
|
|
340
|
+
* @see GoogleEarthEnterpriseMetadata.fromUrl
|
|
341
|
+
*
|
|
342
|
+
* @exception {RuntimeError} metadata does not specify terrain
|
|
343
|
+
*
|
|
344
|
+
* @example
|
|
345
|
+
* const geeMetadata = await GoogleEarthEnterpriseMetadata.fromUrl("http://www.example.com");
|
|
346
|
+
* const gee = Cesium.GoogleEarthEnterpriseTerrainProvider.fromMetadata(geeMetadata);
|
|
347
|
+
*/
|
|
348
|
+
GoogleEarthEnterpriseTerrainProvider.fromMetadata = function (
|
|
349
|
+
metadata,
|
|
350
|
+
options
|
|
351
|
+
) {
|
|
352
|
+
//>>includeStart('debug', pragmas.debug);
|
|
353
|
+
Check.defined("metadata", metadata);
|
|
354
|
+
//>>includeEnd('debug');
|
|
355
|
+
|
|
356
|
+
if (!metadata.terrainPresent) {
|
|
357
|
+
throw new RuntimeError(`The server ${metadata.url} doesn't have terrain`);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
const provider = new GoogleEarthEnterpriseTerrainProvider(options);
|
|
361
|
+
provider._metadata = metadata;
|
|
362
|
+
provider._readyPromise = Promise.resolve(true);
|
|
363
|
+
provider._ready = true;
|
|
364
|
+
|
|
365
|
+
return provider;
|
|
366
|
+
};
|
|
367
|
+
|
|
319
368
|
const taskProcessor = new TaskProcessor("decodeGoogleEarthEnterprisePacket");
|
|
320
369
|
|
|
321
370
|
// If the tile has its own terrain, then you can just use its child bitmask. If it was requested using it's parent
|
|
@@ -338,8 +387,7 @@ function computeChildMask(quadKey, info, metadata) {
|
|
|
338
387
|
}
|
|
339
388
|
|
|
340
389
|
/**
|
|
341
|
-
* Requests the geometry for a given tile.
|
|
342
|
-
* {@link GoogleEarthEnterpriseTerrainProvider#ready} returns true. The result must include terrain data and
|
|
390
|
+
* Requests the geometry for a given tile. The result must include terrain data and
|
|
343
391
|
* may optionally include a water mask and an indication of which child tiles are available.
|
|
344
392
|
*
|
|
345
393
|
* @param {number} x The X coordinate of the tile for which to request geometry.
|
|
@@ -349,9 +397,6 @@ function computeChildMask(quadKey, info, metadata) {
|
|
|
349
397
|
* @returns {Promise<TerrainData>|undefined} A promise for the requested geometry. If this method
|
|
350
398
|
* returns undefined instead of a promise, it is an indication that too many requests are already
|
|
351
399
|
* pending and the request will be retried later.
|
|
352
|
-
*
|
|
353
|
-
* @exception {DeveloperError} This function must not be called before {@link GoogleEarthEnterpriseTerrainProvider#ready}
|
|
354
|
-
* returns true.
|
|
355
400
|
*/
|
|
356
401
|
GoogleEarthEnterpriseTerrainProvider.prototype.requestTileGeometry = function (
|
|
357
402
|
x,
|
|
@@ -359,14 +404,6 @@ GoogleEarthEnterpriseTerrainProvider.prototype.requestTileGeometry = function (
|
|
|
359
404
|
level,
|
|
360
405
|
request
|
|
361
406
|
) {
|
|
362
|
-
//>>includeStart('debug', pragmas.debug)
|
|
363
|
-
if (!this._ready) {
|
|
364
|
-
throw new DeveloperError(
|
|
365
|
-
"requestTileGeometry must not be called before the terrain provider is ready."
|
|
366
|
-
);
|
|
367
|
-
}
|
|
368
|
-
//>>includeEnd('debug');
|
|
369
|
-
|
|
370
407
|
const quadKey = GoogleEarthEnterpriseMetadata.tileXYToQuadKey(x, y, level);
|
|
371
408
|
const terrainCache = this._terrainCache;
|
|
372
409
|
const metadata = this._metadata;
|
package/Source/Core/Ion.js
CHANGED
|
@@ -4,7 +4,7 @@ import Resource from "./Resource.js";
|
|
|
4
4
|
|
|
5
5
|
let defaultTokenCredit;
|
|
6
6
|
const defaultAccessToken =
|
|
7
|
-
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
7
|
+
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIwZWQ3OWFlZC1kOTg3LTRlZjctYTAyYy0xNjFmODE1MWE2NGUiLCJpZCI6MjU5LCJpYXQiOjE2ODI5NDYzODh9.DEH4GpqliH-xsDE7h-ZCICtHgnGu32wdSjt4hFqw7lU";
|
|
8
8
|
/**
|
|
9
9
|
* Default settings for accessing the Cesium ion API.
|
|
10
10
|
*
|
|
@@ -33,7 +33,7 @@ function IonGeocoderService(options) {
|
|
|
33
33
|
|
|
34
34
|
const defaultTokenCredit = Ion.getDefaultTokenCredit(accessToken);
|
|
35
35
|
if (defined(defaultTokenCredit)) {
|
|
36
|
-
options.scene.frameState.creditDisplay.
|
|
36
|
+
options.scene.frameState.creditDisplay.addStaticCredit(
|
|
37
37
|
Credit.clone(defaultTokenCredit)
|
|
38
38
|
);
|
|
39
39
|
}
|
|
@@ -51,6 +51,21 @@ function IonGeocoderService(options) {
|
|
|
51
51
|
this._pelias = new PeliasGeocoderService(searchEndpoint);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
Object.defineProperties(IonGeocoderService.prototype, {
|
|
55
|
+
/**
|
|
56
|
+
* Gets the credit to display after a geocode is performed. Typically this is used to credit
|
|
57
|
+
* the geocoder service.
|
|
58
|
+
* @memberof IonGeocoderService.prototype
|
|
59
|
+
* @type {Credit|undefined}
|
|
60
|
+
* @readonly
|
|
61
|
+
*/
|
|
62
|
+
credit: {
|
|
63
|
+
get: function () {
|
|
64
|
+
return undefined;
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
|
|
54
69
|
/**
|
|
55
70
|
* @function
|
|
56
71
|
*
|
|
@@ -58,7 +73,7 @@ function IonGeocoderService(options) {
|
|
|
58
73
|
* @param {GeocodeType} [type=GeocodeType.SEARCH] The type of geocode to perform.
|
|
59
74
|
* @returns {Promise<GeocoderService.Result[]>}
|
|
60
75
|
*/
|
|
61
|
-
IonGeocoderService.prototype.geocode = function (query, geocodeType) {
|
|
76
|
+
IonGeocoderService.prototype.geocode = async function (query, geocodeType) {
|
|
62
77
|
return this._pelias.geocode(query, geocodeType);
|
|
63
78
|
};
|
|
64
79
|
export default IonGeocoderService;
|
|
@@ -16,7 +16,7 @@ import RuntimeError from "./RuntimeError.js";
|
|
|
16
16
|
* @augments Resource
|
|
17
17
|
*
|
|
18
18
|
* @param {object} endpoint The result of the Cesium ion asset endpoint service.
|
|
19
|
-
* @param {Resource} endpointResource The resource used to
|
|
19
|
+
* @param {Resource} endpointResource The resource used to retrieve the endpoint.
|
|
20
20
|
*
|
|
21
21
|
* @see Ion
|
|
22
22
|
* @see IonImageryProvider
|
|
@@ -87,8 +87,14 @@ if (defined(Object.create)) {
|
|
|
87
87
|
* @returns {Promise<IonResource>} A Promise to am instance representing the Cesium ion Asset.
|
|
88
88
|
*
|
|
89
89
|
* @example
|
|
90
|
-
* //Load a Cesium3DTileset with asset ID of 124624234
|
|
91
|
-
*
|
|
90
|
+
* // Load a Cesium3DTileset with asset ID of 124624234
|
|
91
|
+
* try {
|
|
92
|
+
* const resource = await Cesium.IonResource.fromAssetId(124624234);
|
|
93
|
+
* const tileset = await Cesium.Cesium3DTileset.fromUrl(resource);
|
|
94
|
+
* scene.primitives.add(tileset);
|
|
95
|
+
* } catch (error) {
|
|
96
|
+
* console.error(`Error creating tileset: ${error}`);
|
|
97
|
+
* }
|
|
92
98
|
*
|
|
93
99
|
* @example
|
|
94
100
|
* //Load a CZML file with asset ID of 10890
|
|
@@ -197,6 +203,11 @@ IonResource.prototype._makeRequest = function (options) {
|
|
|
197
203
|
options.headers = {};
|
|
198
204
|
}
|
|
199
205
|
options.headers.Authorization = `Bearer ${this._ionEndpoint.accessToken}`;
|
|
206
|
+
options.headers["X-Cesium-Client"] = "CesiumJS";
|
|
207
|
+
/* global CESIUM_VERSION */
|
|
208
|
+
if (typeof CESIUM_VERSION !== "undefined") {
|
|
209
|
+
options.headers["X-Cesium-Client-Version"] = CESIUM_VERSION;
|
|
210
|
+
}
|
|
200
211
|
|
|
201
212
|
return Resource.prototype._makeRequest.call(this, options);
|
|
202
213
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Cartesian3 from "./Cartesian3.js";
|
|
2
2
|
import Check from "./Check.js";
|
|
3
3
|
import combine from "./combine.js";
|
|
4
|
+
import Credit from "./Credit.js";
|
|
4
5
|
import defaultValue from "./defaultValue.js";
|
|
5
6
|
import defined from "./defined.js";
|
|
6
7
|
import Rectangle from "./Rectangle.js";
|
|
@@ -48,6 +49,10 @@ function OpenCageGeocoderService(url, apiKey, params) {
|
|
|
48
49
|
url.setQueryParameters({ key: apiKey });
|
|
49
50
|
this._url = url;
|
|
50
51
|
this._params = defaultValue(params, {});
|
|
52
|
+
this._credit = new Credit(
|
|
53
|
+
`Geodata copyright <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors`,
|
|
54
|
+
false
|
|
55
|
+
);
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
Object.defineProperties(OpenCageGeocoderService.prototype, {
|
|
@@ -73,6 +78,18 @@ Object.defineProperties(OpenCageGeocoderService.prototype, {
|
|
|
73
78
|
return this._params;
|
|
74
79
|
},
|
|
75
80
|
},
|
|
81
|
+
/**
|
|
82
|
+
* Gets the credit to display after a geocode is performed. Typically this is used to credit
|
|
83
|
+
* the geocoder service.
|
|
84
|
+
* @memberof OpenCageGeocoderService.prototype
|
|
85
|
+
* @type {Credit|undefined}
|
|
86
|
+
* @readonly
|
|
87
|
+
*/
|
|
88
|
+
credit: {
|
|
89
|
+
get: function () {
|
|
90
|
+
return this._credit;
|
|
91
|
+
},
|
|
92
|
+
},
|
|
76
93
|
});
|
|
77
94
|
|
|
78
95
|
/**
|
|
@@ -81,7 +98,7 @@ Object.defineProperties(OpenCageGeocoderService.prototype, {
|
|
|
81
98
|
* @param {string} query The query to be sent to the geocoder service
|
|
82
99
|
* @returns {Promise<GeocoderService.Result[]>}
|
|
83
100
|
*/
|
|
84
|
-
OpenCageGeocoderService.prototype.geocode = function (query) {
|
|
101
|
+
OpenCageGeocoderService.prototype.geocode = async function (query) {
|
|
85
102
|
//>>includeStart('debug', pragmas.debug);
|
|
86
103
|
Check.typeOf.string("query", query);
|
|
87
104
|
//>>includeEnd('debug');
|
|
@@ -24,7 +24,7 @@ import Rectangle from "./Rectangle.js";
|
|
|
24
24
|
*
|
|
25
25
|
* @param {Cartesian3} [center=Cartesian3.ZERO] The center of the box.
|
|
26
26
|
* @param {Matrix3} [halfAxes=Matrix3.ZERO] The three orthogonal half-axes of the bounding box.
|
|
27
|
-
* Equivalently, the transformation matrix, to rotate and scale a
|
|
27
|
+
* Equivalently, the transformation matrix, to rotate and scale a 2x2x2
|
|
28
28
|
* cube centered at the origin.
|
|
29
29
|
*
|
|
30
30
|
*
|
|
@@ -46,7 +46,9 @@ function OrientedBoundingBox(center, halfAxes) {
|
|
|
46
46
|
*/
|
|
47
47
|
this.center = Cartesian3.clone(defaultValue(center, Cartesian3.ZERO));
|
|
48
48
|
/**
|
|
49
|
-
* The
|
|
49
|
+
* The three orthogonal half-axes of the bounding box. Equivalently, the
|
|
50
|
+
* transformation matrix, to rotate and scale a 2x2x2 cube centered at the
|
|
51
|
+
* origin.
|
|
50
52
|
* @type {Matrix3}
|
|
51
53
|
* @default {@link Matrix3.ZERO}
|
|
52
54
|
*/
|
|
@@ -184,6 +184,19 @@ Object.defineProperties(OrthographicFrustum.prototype, {
|
|
|
184
184
|
return this._offCenterFrustum.projectionMatrix;
|
|
185
185
|
},
|
|
186
186
|
},
|
|
187
|
+
/**
|
|
188
|
+
* Gets the orthographic projection matrix computed from the view frustum.
|
|
189
|
+
* @memberof OrthographicFrustum.prototype
|
|
190
|
+
* @type {OrthographicOffCenterFrustum}
|
|
191
|
+
* @readonly
|
|
192
|
+
* @private
|
|
193
|
+
*/
|
|
194
|
+
offCenterFrustum: {
|
|
195
|
+
get: function () {
|
|
196
|
+
update(this);
|
|
197
|
+
return this._offCenterFrustum;
|
|
198
|
+
},
|
|
199
|
+
},
|
|
187
200
|
});
|
|
188
201
|
|
|
189
202
|
/**
|
|
@@ -44,6 +44,18 @@ Object.defineProperties(PeliasGeocoderService.prototype, {
|
|
|
44
44
|
return this._url;
|
|
45
45
|
},
|
|
46
46
|
},
|
|
47
|
+
/**
|
|
48
|
+
* Gets the credit to display after a geocode is performed. Typically this is used to credit
|
|
49
|
+
* the geocoder service.
|
|
50
|
+
* @memberof PeliasGeocoderService.prototype
|
|
51
|
+
* @type {Credit|undefined}
|
|
52
|
+
* @readonly
|
|
53
|
+
*/
|
|
54
|
+
credit: {
|
|
55
|
+
get: function () {
|
|
56
|
+
return undefined;
|
|
57
|
+
},
|
|
58
|
+
},
|
|
47
59
|
});
|
|
48
60
|
|
|
49
61
|
/**
|
|
@@ -53,7 +65,7 @@ Object.defineProperties(PeliasGeocoderService.prototype, {
|
|
|
53
65
|
* @param {GeocodeType} [type=GeocodeType.SEARCH] The type of geocode to perform.
|
|
54
66
|
* @returns {Promise<GeocoderService.Result[]>}
|
|
55
67
|
*/
|
|
56
|
-
PeliasGeocoderService.prototype.geocode = function (query, type) {
|
|
68
|
+
PeliasGeocoderService.prototype.geocode = async function (query, type) {
|
|
57
69
|
//>>includeStart('debug', pragmas.debug);
|
|
58
70
|
Check.typeOf.string("query", query);
|
|
59
71
|
//>>includeEnd('debug');
|
|
@@ -86,6 +98,7 @@ PeliasGeocoderService.prototype.geocode = function (query, type) {
|
|
|
86
98
|
return {
|
|
87
99
|
displayName: resultObject.properties.label,
|
|
88
100
|
destination: destination,
|
|
101
|
+
attributions: results.attributions,
|
|
89
102
|
};
|
|
90
103
|
});
|
|
91
104
|
});
|
|
@@ -274,6 +274,20 @@ Object.defineProperties(PerspectiveFrustum.prototype, {
|
|
|
274
274
|
return this._sseDenominator;
|
|
275
275
|
},
|
|
276
276
|
},
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Gets the orthographic projection matrix computed from the view frustum.
|
|
280
|
+
* @memberof PerspectiveFrustum.prototype
|
|
281
|
+
* @type {PerspectiveOffCenterFrustum}
|
|
282
|
+
* @readonly
|
|
283
|
+
* @private
|
|
284
|
+
*/
|
|
285
|
+
offCenterFrustum: {
|
|
286
|
+
get: function () {
|
|
287
|
+
update(this);
|
|
288
|
+
return this._offCenterFrustum;
|
|
289
|
+
},
|
|
290
|
+
},
|
|
277
291
|
});
|
|
278
292
|
|
|
279
293
|
/**
|
package/Source/Core/Request.js
CHANGED
|
@@ -18,6 +18,7 @@ import RequestType from "./RequestType.js";
|
|
|
18
18
|
* @param {boolean} [options.throttle=false] Whether to throttle and prioritize the request. If false, the request will be sent immediately. If true, the request will be throttled and sent based on priority.
|
|
19
19
|
* @param {boolean} [options.throttleByServer=false] Whether to throttle the request by server.
|
|
20
20
|
* @param {RequestType} [options.type=RequestType.OTHER] The type of request.
|
|
21
|
+
* @param {string} [options.serverKey] A key used to identify the server that a request is going to.
|
|
21
22
|
*/
|
|
22
23
|
function Request(options) {
|
|
23
24
|
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
|
|
@@ -105,7 +106,7 @@ function Request(options) {
|
|
|
105
106
|
*
|
|
106
107
|
* @private
|
|
107
108
|
*/
|
|
108
|
-
this.serverKey =
|
|
109
|
+
this.serverKey = options.serverKey;
|
|
109
110
|
|
|
110
111
|
/**
|
|
111
112
|
* The current state of the request.
|
|
@@ -166,7 +167,7 @@ Request.prototype.clone = function (result) {
|
|
|
166
167
|
result.serverKey = this.serverKey;
|
|
167
168
|
|
|
168
169
|
// These get defaulted because the cloned request hasn't been issued
|
|
169
|
-
result.state =
|
|
170
|
+
result.state = RequestState.UNISSUED;
|
|
170
171
|
result.deferred = undefined;
|
|
171
172
|
result.cancelled = false;
|
|
172
173
|
|
|
@@ -65,18 +65,23 @@ RequestScheduler.maximumRequests = 50;
|
|
|
65
65
|
RequestScheduler.maximumRequestsPerServer = 6;
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
|
-
* A per server key list of overrides to use for throttling instead of <code>maximumRequestsPerServer</code
|
|
68
|
+
* A per server key list of overrides to use for throttling instead of <code>maximumRequestsPerServer</code>.
|
|
69
|
+
* Useful when streaming data from a known HTTP/2 or HTTP/3 server.
|
|
69
70
|
* @type {object}
|
|
70
71
|
*
|
|
71
72
|
* @example
|
|
73
|
+
* RequestScheduler.requestsByServer["myserver.com:443"] = 18;
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
72
76
|
* RequestScheduler.requestsByServer = {
|
|
73
|
-
*
|
|
74
|
-
*
|
|
77
|
+
* "api.cesium.com:443": 18,
|
|
78
|
+
* "assets.cesium.com:443": 18,
|
|
75
79
|
* };
|
|
76
80
|
*/
|
|
77
81
|
RequestScheduler.requestsByServer = {
|
|
78
82
|
"api.cesium.com:443": 18,
|
|
79
|
-
"assets.cesium.com:443": 18,
|
|
83
|
+
"assets.ion.cesium.com:443": 18,
|
|
84
|
+
"ibasemaps-api.arcgis.com:443": 18,
|
|
80
85
|
};
|
|
81
86
|
|
|
82
87
|
/**
|
|
@@ -352,7 +357,7 @@ RequestScheduler.getServerKey = function (url) {
|
|
|
352
357
|
|
|
353
358
|
let uri = new Uri(url);
|
|
354
359
|
if (uri.scheme() === "") {
|
|
355
|
-
uri =
|
|
360
|
+
uri = uri.absoluteTo(pageUri);
|
|
356
361
|
uri.normalize();
|
|
357
362
|
}
|
|
358
363
|
|