@cesium/engine 2.2.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.
Files changed (137) hide show
  1. package/Build/Workers/{AttributeCompression-8a5a065e.js → AttributeCompression-f9f6c717.js} +1 -1
  2. package/Build/Workers/{AxisAlignedBoundingBox-379015ef.js → AxisAlignedBoundingBox-31fadcf0.js} +1 -1
  3. package/Build/Workers/{BoundingRectangle-57f2b24f.js → BoundingRectangle-995f0079.js} +1 -1
  4. package/Build/Workers/{BoxGeometry-ecabfc78.js → BoxGeometry-7eb1af60.js} +1 -1
  5. package/Build/Workers/{Color-14d1a36d.js → Color-2dc49658.js} +1 -1
  6. package/Build/Workers/{CoplanarPolygonGeometryLibrary-048c3c14.js → CoplanarPolygonGeometryLibrary-d7d972d6.js} +1 -1
  7. package/Build/Workers/{CorridorGeometryLibrary-520c8619.js → CorridorGeometryLibrary-1f5ef7b3.js} +1 -1
  8. package/Build/Workers/{CylinderGeometry-119068b8.js → CylinderGeometry-23c67a6c.js} +1 -1
  9. package/Build/Workers/{CylinderGeometryLibrary-135b0858.js → CylinderGeometryLibrary-7bf291b4.js} +1 -1
  10. package/Build/Workers/{EllipseGeometry-2dfc3523.js → EllipseGeometry-37014da4.js} +1 -1
  11. package/Build/Workers/{EllipseGeometryLibrary-0a1e0170.js → EllipseGeometryLibrary-92ab6b1e.js} +1 -1
  12. package/Build/Workers/{EllipseOutlineGeometry-c5251669.js → EllipseOutlineGeometry-12b6fef5.js} +1 -1
  13. package/Build/Workers/{EllipsoidGeodesic-dcff5cbd.js → EllipsoidGeodesic-5b3623dc.js} +1 -1
  14. package/Build/Workers/{EllipsoidGeometry-d10a5221.js → EllipsoidGeometry-508da15c.js} +1 -1
  15. package/Build/Workers/{EllipsoidOutlineGeometry-7039a0ae.js → EllipsoidOutlineGeometry-40d97455.js} +1 -1
  16. package/Build/Workers/{EllipsoidRhumbLine-b672d507.js → EllipsoidRhumbLine-ef872433.js} +1 -1
  17. package/Build/Workers/{EllipsoidTangentPlane-857186be.js → EllipsoidTangentPlane-46d4d9c2.js} +1 -1
  18. package/Build/Workers/{EncodedCartesian3-e8bbca36.js → EncodedCartesian3-57415c8a.js} +1 -1
  19. package/Build/Workers/{FrustumGeometry-400fa1b7.js → FrustumGeometry-38605e69.js} +31 -3
  20. package/Build/Workers/{GeometryAttribute-7a2de5c6.js → GeometryAttribute-a466e9c7.js} +1 -1
  21. package/Build/Workers/{GeometryInstance-3fb607b7.js → GeometryInstance-34d9e21e.js} +1 -1
  22. package/Build/Workers/{GeometryPipeline-916636fa.js → GeometryPipeline-dcf79306.js} +1 -1
  23. package/Build/Workers/{IndexDatatype-b8f3e09d.js → IndexDatatype-2643aa47.js} +1 -1
  24. package/Build/Workers/{IntersectionTests-b4d02d4d.js → IntersectionTests-88c49b2e.js} +1 -1
  25. package/Build/Workers/{Math-dad82b4d.js → Math-0a2ac845.js} +12 -2
  26. package/Build/Workers/{Matrix2-1e403d0e.js → Matrix2-e1298525.js} +1 -1
  27. package/Build/Workers/{Matrix3-fa806b97.js → Matrix3-41c58dde.js} +1 -1
  28. package/Build/Workers/{OrientedBoundingBox-96fe1752.js → OrientedBoundingBox-2dd47921.js} +1 -1
  29. package/Build/Workers/{Plane-c27e1ac6.js → Plane-4c3d403b.js} +1 -1
  30. package/Build/Workers/{PolygonGeometryLibrary-931f1ec6.js → PolygonGeometryLibrary-59126025.js} +1 -1
  31. package/Build/Workers/PolygonPipeline-1fe328c0.js +1344 -0
  32. package/Build/Workers/{PolylinePipeline-6d5c63e5.js → PolylinePipeline-896735cc.js} +1 -1
  33. package/Build/Workers/{PolylineVolumeGeometryLibrary-f068c1fb.js → PolylineVolumeGeometryLibrary-9c0639f7.js} +1 -1
  34. package/Build/Workers/{PrimitivePipeline-879f996a.js → PrimitivePipeline-fc1a47ff.js} +1 -1
  35. package/Build/Workers/{RectangleGeometryLibrary-2d6f36f3.js → RectangleGeometryLibrary-a23c9ebe.js} +1 -1
  36. package/Build/Workers/{TerrainEncoding-82882059.js → TerrainEncoding-51b8b33b.js} +1 -1
  37. package/Build/Workers/Transforms-bc45e707.js +14699 -0
  38. package/Build/Workers/{WallGeometryLibrary-db7a64fb.js → WallGeometryLibrary-007e9883.js} +1 -1
  39. package/Build/Workers/{WebMercatorProjection-76a3fcc0.js → WebMercatorProjection-13ed1a6e.js} +1 -1
  40. package/Build/Workers/{arrayRemoveDuplicates-fac118a8.js → arrayRemoveDuplicates-d2061e85.js} +1 -1
  41. package/Build/Workers/cesiumWorkerBootstrapper.js +1 -1
  42. package/Build/Workers/combineGeometry.js +1 -1
  43. package/Build/Workers/createBoxGeometry.js +1 -1
  44. package/Build/Workers/createBoxOutlineGeometry.js +1 -1
  45. package/Build/Workers/createCircleGeometry.js +1 -1
  46. package/Build/Workers/createCircleOutlineGeometry.js +1 -1
  47. package/Build/Workers/createCoplanarPolygonGeometry.js +1 -1
  48. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
  49. package/Build/Workers/createCorridorGeometry.js +1 -1
  50. package/Build/Workers/createCorridorOutlineGeometry.js +1 -1
  51. package/Build/Workers/createCylinderGeometry.js +1 -1
  52. package/Build/Workers/createCylinderOutlineGeometry.js +1 -1
  53. package/Build/Workers/createEllipseGeometry.js +1 -1
  54. package/Build/Workers/createEllipseOutlineGeometry.js +1 -1
  55. package/Build/Workers/createEllipsoidGeometry.js +1 -1
  56. package/Build/Workers/createEllipsoidOutlineGeometry.js +1 -1
  57. package/Build/Workers/createFrustumGeometry.js +1 -1
  58. package/Build/Workers/createFrustumOutlineGeometry.js +1 -1
  59. package/Build/Workers/createGeometry.js +1 -1
  60. package/Build/Workers/createGroundPolylineGeometry.js +1 -1
  61. package/Build/Workers/createPlaneGeometry.js +1 -1
  62. package/Build/Workers/createPlaneOutlineGeometry.js +1 -1
  63. package/Build/Workers/createPolygonGeometry.js +1 -1
  64. package/Build/Workers/createPolygonOutlineGeometry.js +1 -1
  65. package/Build/Workers/createPolylineGeometry.js +1 -1
  66. package/Build/Workers/createPolylineVolumeGeometry.js +1 -1
  67. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
  68. package/Build/Workers/createRectangleGeometry.js +1 -1
  69. package/Build/Workers/createRectangleOutlineGeometry.js +1 -1
  70. package/Build/Workers/createSimplePolylineGeometry.js +1 -1
  71. package/Build/Workers/createSphereGeometry.js +1 -1
  72. package/Build/Workers/createSphereOutlineGeometry.js +1 -1
  73. package/Build/Workers/createVectorTileClampedPolylines.js +1 -1
  74. package/Build/Workers/createVectorTileGeometries.js +1 -1
  75. package/Build/Workers/createVectorTilePoints.js +1 -1
  76. package/Build/Workers/createVectorTilePolygons.js +1 -1
  77. package/Build/Workers/createVectorTilePolylines.js +1 -1
  78. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
  79. package/Build/Workers/createVerticesFromHeightmap.js +5 -8
  80. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
  81. package/Build/Workers/createWallGeometry.js +1 -1
  82. package/Build/Workers/createWallOutlineGeometry.js +1 -1
  83. package/Build/Workers/decodeDraco.js +1 -1
  84. package/Build/Workers/decodeI3S.js +1 -1
  85. package/Build/Workers/package.js +1 -1
  86. package/Build/Workers/transferTypedArrayTest.js +1 -1
  87. package/Build/Workers/upsampleQuantizedTerrainMesh.js +1 -1
  88. package/Source/Core/BingMapsGeocoderService.js +19 -1
  89. package/Source/Core/CartographicGeocoderService.js +15 -0
  90. package/Source/Core/Credit.js +1 -1
  91. package/Source/Core/FrustumGeometry.js +3 -2
  92. package/Source/Core/GeocoderService.js +32 -1
  93. package/Source/Core/Ion.js +1 -1
  94. package/Source/Core/IonGeocoderService.js +17 -2
  95. package/Source/Core/OpenCageGeocoderService.js +18 -1
  96. package/Source/Core/OrthographicFrustum.js +13 -0
  97. package/Source/Core/PeliasGeocoderService.js +14 -1
  98. package/Source/Core/PerspectiveFrustum.js +14 -0
  99. package/Source/Core/Request.js +3 -2
  100. package/Source/Core/RequestScheduler.js +9 -4
  101. package/Source/Core/Resource.js +228 -234
  102. package/Source/DataSources/DataSourceDisplay.js +2 -2
  103. package/Source/DataSources/EntityCluster.js +126 -128
  104. package/Source/DataSources/ModelVisualizer.js +5 -3
  105. package/Source/Renderer/UniformState.js +3 -2
  106. package/Source/Renderer/demodernizeShader.js +5 -5
  107. package/Source/Scene/ArcGisBaseMapType.js +12 -0
  108. package/Source/Scene/ArcGisMapServerImageryProvider.js +162 -20
  109. package/Source/Scene/ArcGisMapService.js +83 -0
  110. package/Source/Scene/Camera.js +8 -7
  111. package/Source/Scene/Cesium3DTile.js +4 -3
  112. package/Source/Scene/Cesium3DTileset.js +4 -4
  113. package/Source/Scene/CreditDisplay.js +112 -16
  114. package/Source/Scene/GlobeSurfaceTileProvider.js +4 -4
  115. package/Source/Scene/GltfJsonLoader.js +12 -0
  116. package/Source/Scene/GltfLoader.js +6 -37
  117. package/Source/Scene/IonImageryProvider.js +11 -11
  118. package/Source/Scene/Model/MaterialPipelineStage.js +12 -12
  119. package/Source/Scene/Model/Model.js +85 -44
  120. package/Source/Scene/Model/UniformType.js +1 -1
  121. package/Source/Scene/Picking.js +3 -2
  122. package/Source/Scene/QuadtreePrimitive.js +3 -2
  123. package/Source/Scene/SceneTransforms.js +3 -2
  124. package/Source/Scene/ScreenSpaceCameraController.js +1 -1
  125. package/Source/Scene/Vector3DTilePoints.js +25 -13
  126. package/Source/Shaders/AtmosphereCommon.glsl +51 -8
  127. package/Source/Shaders/AtmosphereCommon.js +51 -8
  128. package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.glsl +1 -1
  129. package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.js +1 -1
  130. package/Source/Shaders/PostProcessStages/AmbientOcclusionModulate.glsl +3 -3
  131. package/Source/Shaders/PostProcessStages/AmbientOcclusionModulate.js +3 -3
  132. package/Source/Widget/CesiumWidget.js +12 -0
  133. package/index.d.ts +207 -16
  134. package/index.js +286 -284
  135. package/package.json +4 -4
  136. package/Build/Workers/PolygonPipeline-32fc92cc.js +0 -1345
  137. package/Build/Workers/Transforms-9052372a.js +0 -14715
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.104
4
+ * Version 1.105
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.104
4
+ * Version 1.105
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -1,4 +1,4 @@
1
- define(['./AttributeCompression-8a5a065e', './Transforms-9052372a', './Matrix2-1e403d0e', './Matrix3-fa806b97', './defaultValue-fe22d8c0', './TerrainEncoding-82882059', './IndexDatatype-b8f3e09d', './Check-6ede7e26', './Math-dad82b4d', './OrientedBoundingBox-96fe1752', './createTaskProcessorWorker', './ComponentDatatype-cf1fa08e', './WebGLConstants-0b1ce7ba', './combine-d9581036', './RuntimeError-ef395448', './EllipsoidTangentPlane-857186be', './AxisAlignedBoundingBox-379015ef', './IntersectionTests-b4d02d4d', './Plane-c27e1ac6'], (function (AttributeCompression, Transforms, Matrix2, Matrix3, defaultValue, TerrainEncoding, IndexDatatype, Check, Math$1, OrientedBoundingBox, createTaskProcessorWorker, ComponentDatatype, WebGLConstants, combine, RuntimeError, EllipsoidTangentPlane, AxisAlignedBoundingBox, IntersectionTests, Plane) { 'use strict';
1
+ define(['./AttributeCompression-f9f6c717', './Transforms-bc45e707', './Matrix2-e1298525', './Matrix3-41c58dde', './defaultValue-fe22d8c0', './TerrainEncoding-51b8b33b', './IndexDatatype-2643aa47', './Check-6ede7e26', './Math-0a2ac845', './OrientedBoundingBox-2dd47921', './createTaskProcessorWorker', './ComponentDatatype-cf1fa08e', './WebGLConstants-0b1ce7ba', './combine-d9581036', './RuntimeError-ef395448', './EllipsoidTangentPlane-46d4d9c2', './AxisAlignedBoundingBox-31fadcf0', './IntersectionTests-88c49b2e', './Plane-4c3d403b'], (function (AttributeCompression, Transforms, Matrix2, Matrix3, defaultValue, TerrainEncoding, IndexDatatype, Check, Math$1, OrientedBoundingBox, createTaskProcessorWorker, ComponentDatatype, WebGLConstants, combine, RuntimeError, EllipsoidTangentPlane, AxisAlignedBoundingBox, IntersectionTests, Plane) { 'use strict';
2
2
 
3
3
  /**
4
4
  * Contains functions for operating on 2D triangles.
@@ -1,4 +1,5 @@
1
1
  import Check from "./Check.js";
2
+ import Credit from "./Credit.js";
2
3
  import defaultValue from "./defaultValue.js";
3
4
  import Rectangle from "./Rectangle.js";
4
5
  import Resource from "./Resource.js";
@@ -39,6 +40,11 @@ function BingMapsGeocoderService(options) {
39
40
  url: url,
40
41
  queryParameters: queryParameters,
41
42
  });
43
+
44
+ this._credit = new Credit(
45
+ `<img src="http:\/\/dev.virtualearth.net\/Branding\/logo_powered_by.png"\/>`,
46
+ false
47
+ );
42
48
  }
43
49
 
44
50
  Object.defineProperties(BingMapsGeocoderService.prototype, {
@@ -65,6 +71,18 @@ Object.defineProperties(BingMapsGeocoderService.prototype, {
65
71
  return this._key;
66
72
  },
67
73
  },
74
+ /**
75
+ * Gets the credit to display after a geocode is performed. Typically this is used to credit
76
+ * the geocoder service.
77
+ * @memberof BingMapsGeocoderService.prototype
78
+ * @type {Credit|undefined}
79
+ * @readonly
80
+ */
81
+ credit: {
82
+ get: function () {
83
+ return this._credit;
84
+ },
85
+ },
68
86
  });
69
87
 
70
88
  /**
@@ -73,7 +91,7 @@ Object.defineProperties(BingMapsGeocoderService.prototype, {
73
91
  * @param {string} query The query to be sent to the geocoder service
74
92
  * @returns {Promise<GeocoderService.Result[]>}
75
93
  */
76
- BingMapsGeocoderService.prototype.geocode = function (query) {
94
+ BingMapsGeocoderService.prototype.geocode = async function (query) {
77
95
  //>>includeStart('debug', pragmas.debug);
78
96
  Check.typeOf.string("query", query);
79
97
  //>>includeEnd('debug');
@@ -10,6 +10,21 @@ import Check from "./Check.js";
10
10
  */
11
11
  function CartographicGeocoderService() {}
12
12
 
13
+ Object.defineProperties(CartographicGeocoderService.prototype, {
14
+ /**
15
+ * Gets the credit to display after a geocode is performed. Typically this is used to credit
16
+ * the geocoder service.
17
+ * @memberof CartographicGeocoderService.prototype
18
+ * @type {Credit|undefined}
19
+ * @readonly
20
+ */
21
+ credit: {
22
+ get: function () {
23
+ return undefined;
24
+ },
25
+ },
26
+ });
27
+
13
28
  /**
14
29
  * @function
15
30
  *
@@ -17,7 +17,7 @@ const creditToId = {};
17
17
  * @exception {DeveloperError} html is required.
18
18
  *
19
19
  * @example
20
- * //Create a credit with a tooltip, image and link
20
+ * // Create a credit with a tooltip, image and link
21
21
  * const credit = new Cesium.Credit('<a href="https://cesium.com/" target="_blank"><img src="/images/cesium_logo.png" title="Cesium"/></a>');
22
22
  */
23
23
  function Credit(html, showOnScreen) {
@@ -327,8 +327,9 @@ FrustumGeometry._computeNearFarPlanes = function (
327
327
  );
328
328
 
329
329
  if (!defined(inverseViewProjection)) {
330
- if (defined(frustum._offCenterFrustum)) {
331
- frustum = frustum._offCenterFrustum;
330
+ const offCenterFrustum = frustum.offCenterFrustum;
331
+ if (defined(offCenterFrustum)) {
332
+ frustum = offCenterFrustum;
332
333
  }
333
334
 
334
335
  const near = frustumSplits[i];
@@ -1,9 +1,12 @@
1
+ import Credit from "./Credit.js";
2
+ import defined from "./defined.js";
1
3
  import DeveloperError from "./DeveloperError.js";
2
4
 
3
5
  /**
4
6
  * @typedef {object} GeocoderService.Result
5
7
  * @property {string} displayName The display name for a location
6
8
  * @property {Rectangle|Cartesian3} destination The bounding box for a location
9
+ * @property {object[]} [attributions]
7
10
  */
8
11
 
9
12
  /**
@@ -16,7 +19,35 @@ import DeveloperError from "./DeveloperError.js";
16
19
  * @see PeliasGeocoderService
17
20
  * @see OpenCageGeocoderService
18
21
  */
19
- function GeocoderService() {}
22
+ function GeocoderService() {
23
+ DeveloperError.throwInstantiationError();
24
+ }
25
+
26
+ Object.defineProperties(GeocoderService.prototype, {
27
+ /**
28
+ * Gets the credit to display after a geocode is performed. Typically this is used to credit
29
+ * the geocoder service.
30
+ * @memberof GeocoderService.prototype
31
+ * @type {Credit|undefined}
32
+ * @readonly
33
+ */
34
+ credit: {
35
+ get: DeveloperError.throwInstantiationError,
36
+ },
37
+ });
38
+
39
+ /**
40
+ * Parses credits from the geocoder result attributions, if present.
41
+ * @param {GeocoderService.Result} geocoderResult The geocoder result
42
+ * @returns {Credit[]|undefined} A list of credits if present in the result, otherwise undefined
43
+ */
44
+ GeocoderService.getCreditsFromResult = function (geocoderResult) {
45
+ if (defined(geocoderResult.attributions)) {
46
+ return geocoderResult.attributions.map(Credit.getIonCredit);
47
+ }
48
+
49
+ return undefined;
50
+ };
20
51
 
21
52
  /**
22
53
  * @function
@@ -4,7 +4,7 @@ import Resource from "./Resource.js";
4
4
 
5
5
  let defaultTokenCredit;
6
6
  const defaultAccessToken =
7
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkYjk1OWEzOS0wM2UzLTQ1MmItYjVhNi0xOGE2NDAyNDc4ZjYiLCJpZCI6MjU5LCJpYXQiOjE2ODA1MzgxNTl9.ANfifMhFxb5agKqgDghPl1R__jvaz6dcEbkoNFM-txE";
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.addDefaultCredit(
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;
@@ -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');
@@ -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
  /**
@@ -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 = undefined;
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 = this.RequestState.UNISSUED;
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
- * 'api.cesium.com:443': 18,
74
- * 'assets.cesium.com:443': 18
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
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 = new Uri(url).absoluteTo(pageUri);
360
+ uri = uri.absoluteTo(pageUri);
356
361
  uri.normalize();
357
362
  }
358
363