declare module "@cesium/engine" {
import { ArcType,
AssociativeArray,
AxisAlignedBoundingBox,
BoundingRectangle,
BoundingSphere,
BoxGeometry,
BoxOutlineGeometry,
Cartesian2,
Cartesian3,
Cartesian4,
Cartographic,
CatmullRomSpline,
CircleGeometry,
CircleOutlineGeometry,
Clock,
ClockRange,
ClockStep,
Color,
ColorGeometryInstanceAttribute,
ComponentDatatype,
ConstantSpline,
CoplanarPolygonGeometry,
CoplanarPolygonOutlineGeometry,
CornerType,
CorridorGeometry,
CorridorOutlineGeometry,
CubicRealPolynomial,
CullingVolume,
CylinderGeometry,
CylinderOutlineGeometry,
DeveloperError,
DistanceDisplayCondition,
DistanceDisplayConditionGeometryInstanceAttribute,
EllipseGeometry,
EllipseOutlineGeometry,
Ellipsoid,
EllipsoidGeodesic,
EllipsoidGeometry,
EllipsoidOutlineGeometry,
EllipsoidRhumbLine,
EllipsoidTangentPlane,
Event,
EventHelper,
ExtrapolationType,
FixedFrameTransforms,
Frozen,
GeographicProjection,
Geometry,
GeometryAttribute,
GeometryAttributes,
GeometryFactory,
GeometryInstance,
GeometryInstanceAttribute,
GeometryPipeline,
GregorianDate,
HeadingPitchRange,
HeadingPitchRoll,
HermitePolynomialApproximation,
HermiteSpline,
IndexDatatype,
Intersect,
IntersectionTests,
Intersections2D,
Interval,
Iso8601,
JulianDate,
LagrangePolynomialApproximation,
LeapSecond,
LinearApproximation,
LinearSpline,
MapProjection,
Matrix2,
Matrix3,
Viewport,
Matrix4,
MorphWeightSpline,
NearFarScalar,
Occluder,
OrientedBoundingBox,
OrthographicFrustum,
OrthographicOffCenterFrustum,
Packable,
PackableForInterpolation,
PerspectiveFrustum,
PerspectiveOffCenterFrustum,
PixelDatatype,
PixelFormat,
Plane,
PlaneGeometry,
PlaneOutlineGeometry,
PolygonGeometry,
PolygonHierarchy,
PolygonOutlineGeometry,
PolylineGeometry,
PolylineVolumeGeometry,
PolylineVolumeOutlineGeometry,
PrimitiveType,
QuadraticRealPolynomial,
QuarticRealPolynomial,
Quaternion,
QuaternionSpline,
Queue,
Ray,
Rectangle,
RectangleGeometry,
RectangleOutlineGeometry,
ReferenceFrame,
RuntimeError,
ShowGeometryInstanceAttribute,
SimplePolylineGeometry,
SphereGeometry,
SphereOutlineGeometry,
Spherical,
Spline,
SteppedSpline,
Stereographic,
TimeInterval,
TimeIntervalCollection,
TimeStandard,
TrackingReferenceFrame,
TranslationRotationScale,
TridiagonalSystemSolver,
VertexFormat,
VerticalExaggeration,
Visibility,
WallGeometry,
WallOutlineGeometry,
WebGLConstants,
WebMercatorProjection,
WindingOrder,
barycentricCoordinates,
binarySearch,
clone,
combine,
createGuid,
defined,
destroyObject,
formatError,
getAbsoluteUri,
getBaseUri,
getExtensionFromUri,
getFilenameFromUri,
getTimestamp,
isLeapYear,
mergeSort,
objectToQuery,
pointInsideTriangle,
queryToObject,
srgbToLinear,
subdivideArray,
TypedArray,
Math } from "@cesium/core";
import { ComponentReader } from "@cesium/gltf";
import { ArcType as _ArcType } from "@cesium/core";
/**
* @deprecated ArcType has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _ArcTypeShim: typeof _ArcType;
export { _ArcTypeShim as ArcType };
import { AssociativeArray as _AssociativeArray } from "@cesium/core";
/**
* @deprecated AssociativeArray has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _AssociativeArrayShim: typeof _AssociativeArray;
export { _AssociativeArrayShim as AssociativeArray };
import { AxisAlignedBoundingBox as _AxisAlignedBoundingBox } from "@cesium/core";
/**
* @deprecated AxisAlignedBoundingBox has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _AxisAlignedBoundingBoxShim: typeof _AxisAlignedBoundingBox;
export { _AxisAlignedBoundingBoxShim as AxisAlignedBoundingBox };
import { BoundingRectangle as _BoundingRectangle } from "@cesium/core";
/**
* @deprecated BoundingRectangle has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _BoundingRectangleShim: typeof _BoundingRectangle;
export { _BoundingRectangleShim as BoundingRectangle };
import { BoundingSphere as _BoundingSphere } from "@cesium/core";
/**
* @deprecated BoundingSphere has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _BoundingSphereShim: typeof _BoundingSphere;
export { _BoundingSphereShim as BoundingSphere };
import { BoxGeometry as _BoxGeometry } from "@cesium/core";
/**
* @deprecated BoxGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _BoxGeometryShim: typeof _BoxGeometry;
export { _BoxGeometryShim as BoxGeometry };
import { BoxOutlineGeometry as _BoxOutlineGeometry } from "@cesium/core";
/**
* @deprecated BoxOutlineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _BoxOutlineGeometryShim: typeof _BoxOutlineGeometry;
export { _BoxOutlineGeometryShim as BoxOutlineGeometry };
import { Cartesian2 as _Cartesian2 } from "@cesium/core";
/**
* @deprecated Cartesian2 has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _Cartesian2Shim: typeof _Cartesian2;
export { _Cartesian2Shim as Cartesian2 };
import { Cartesian3 as _Cartesian3 } from "@cesium/core";
/**
* @deprecated Cartesian3 has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _Cartesian3Shim: typeof _Cartesian3;
export { _Cartesian3Shim as Cartesian3 };
import { Cartesian4 as _Cartesian4 } from "@cesium/core";
/**
* @deprecated Cartesian4 has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _Cartesian4Shim: typeof _Cartesian4;
export { _Cartesian4Shim as Cartesian4 };
import { Cartographic as _Cartographic } from "@cesium/core";
/**
* @deprecated Cartographic has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _CartographicShim: typeof _Cartographic;
export { _CartographicShim as Cartographic };
import { CatmullRomSpline as _CatmullRomSpline } from "@cesium/core";
/**
* @deprecated CatmullRomSpline has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _CatmullRomSplineShim: typeof _CatmullRomSpline;
export { _CatmullRomSplineShim as CatmullRomSpline };
import { Check as _Check } from "@cesium/core";
/**
* @deprecated Check has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _CheckShim: typeof _Check;
export { _CheckShim as Check };
import { CircleGeometry as _CircleGeometry } from "@cesium/core";
/**
* @deprecated CircleGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _CircleGeometryShim: typeof _CircleGeometry;
export { _CircleGeometryShim as CircleGeometry };
import { CircleOutlineGeometry as _CircleOutlineGeometry } from "@cesium/core";
/**
* @deprecated CircleOutlineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _CircleOutlineGeometryShim: typeof _CircleOutlineGeometry;
export { _CircleOutlineGeometryShim as CircleOutlineGeometry };
import { Clock as _Clock } from "@cesium/core";
/**
* @deprecated Clock has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _ClockShim: typeof _Clock;
export { _ClockShim as Clock };
import { ClockRange as _ClockRange } from "@cesium/core";
/**
* @deprecated ClockRange has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _ClockRangeShim: typeof _ClockRange;
export { _ClockRangeShim as ClockRange };
import { ClockStep as _ClockStep } from "@cesium/core";
/**
* @deprecated ClockStep has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _ClockStepShim: typeof _ClockStep;
export { _ClockStepShim as ClockStep };
import { Color as _Color } from "@cesium/core";
/**
* @deprecated Color has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _ColorShim: typeof _Color;
export { _ColorShim as Color };
import { ColorGeometryInstanceAttribute as _ColorGeometryInstanceAttribute } from "@cesium/core";
/**
* @deprecated ColorGeometryInstanceAttribute has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _ColorGeometryInstanceAttributeShim: typeof _ColorGeometryInstanceAttribute;
export { _ColorGeometryInstanceAttributeShim as ColorGeometryInstanceAttribute };
import { ComponentDatatype as _ComponentDatatype } from "@cesium/core";
/**
* @deprecated ComponentDatatype has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _ComponentDatatypeShim: typeof _ComponentDatatype;
export { _ComponentDatatypeShim as ComponentDatatype };
import { ConstantSpline as _ConstantSpline } from "@cesium/core";
/**
* @deprecated ConstantSpline has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _ConstantSplineShim: typeof _ConstantSpline;
export { _ConstantSplineShim as ConstantSpline };
import { CoplanarPolygonGeometry as _CoplanarPolygonGeometry } from "@cesium/core";
/**
* @deprecated CoplanarPolygonGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _CoplanarPolygonGeometryShim: typeof _CoplanarPolygonGeometry;
export { _CoplanarPolygonGeometryShim as CoplanarPolygonGeometry };
import { CoplanarPolygonOutlineGeometry as _CoplanarPolygonOutlineGeometry } from "@cesium/core";
/**
* @deprecated CoplanarPolygonOutlineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _CoplanarPolygonOutlineGeometryShim: typeof _CoplanarPolygonOutlineGeometry;
export { _CoplanarPolygonOutlineGeometryShim as CoplanarPolygonOutlineGeometry };
import { CornerType as _CornerType } from "@cesium/core";
/**
* @deprecated CornerType has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _CornerTypeShim: typeof _CornerType;
export { _CornerTypeShim as CornerType };
import { CorridorGeometry as _CorridorGeometry } from "@cesium/core";
/**
* @deprecated CorridorGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _CorridorGeometryShim: typeof _CorridorGeometry;
export { _CorridorGeometryShim as CorridorGeometry };
import { CorridorOutlineGeometry as _CorridorOutlineGeometry } from "@cesium/core";
/**
* @deprecated CorridorOutlineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _CorridorOutlineGeometryShim: typeof _CorridorOutlineGeometry;
export { _CorridorOutlineGeometryShim as CorridorOutlineGeometry };
import { CubicRealPolynomial as _CubicRealPolynomial } from "@cesium/core";
/**
* @deprecated CubicRealPolynomial has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _CubicRealPolynomialShim: typeof _CubicRealPolynomial;
export { _CubicRealPolynomialShim as CubicRealPolynomial };
import { CullingVolume as _CullingVolume } from "@cesium/core";
/**
* @deprecated CullingVolume has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _CullingVolumeShim: typeof _CullingVolume;
export { _CullingVolumeShim as CullingVolume };
import { CylinderGeometry as _CylinderGeometry } from "@cesium/core";
/**
* @deprecated CylinderGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _CylinderGeometryShim: typeof _CylinderGeometry;
export { _CylinderGeometryShim as CylinderGeometry };
import { CylinderOutlineGeometry as _CylinderOutlineGeometry } from "@cesium/core";
/**
* @deprecated CylinderOutlineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _CylinderOutlineGeometryShim: typeof _CylinderOutlineGeometry;
export { _CylinderOutlineGeometryShim as CylinderOutlineGeometry };
import { DeveloperError as _DeveloperError } from "@cesium/core";
/**
* @deprecated DeveloperError has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _DeveloperErrorShim: typeof _DeveloperError;
export { _DeveloperErrorShim as DeveloperError };
import { DistanceDisplayCondition as _DistanceDisplayCondition } from "@cesium/core";
/**
* @deprecated DistanceDisplayCondition has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _DistanceDisplayConditionShim: typeof _DistanceDisplayCondition;
export { _DistanceDisplayConditionShim as DistanceDisplayCondition };
import { DistanceDisplayConditionGeometryInstanceAttribute as _DistanceDisplayConditionGeometryInstanceAttribute } from "@cesium/core";
/**
* @deprecated DistanceDisplayConditionGeometryInstanceAttribute has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _DistanceDisplayConditionGeometryInstanceAttributeShim: typeof _DistanceDisplayConditionGeometryInstanceAttribute;
export { _DistanceDisplayConditionGeometryInstanceAttributeShim as DistanceDisplayConditionGeometryInstanceAttribute };
import { EllipseGeometry as _EllipseGeometry } from "@cesium/core";
/**
* @deprecated EllipseGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _EllipseGeometryShim: typeof _EllipseGeometry;
export { _EllipseGeometryShim as EllipseGeometry };
import { EllipseOutlineGeometry as _EllipseOutlineGeometry } from "@cesium/core";
/**
* @deprecated EllipseOutlineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _EllipseOutlineGeometryShim: typeof _EllipseOutlineGeometry;
export { _EllipseOutlineGeometryShim as EllipseOutlineGeometry };
import { Ellipsoid as _Ellipsoid } from "@cesium/core";
/**
* @deprecated Ellipsoid has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _EllipsoidShim: typeof _Ellipsoid;
export { _EllipsoidShim as Ellipsoid };
import { EllipsoidGeodesic as _EllipsoidGeodesic } from "@cesium/core";
/**
* @deprecated EllipsoidGeodesic has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _EllipsoidGeodesicShim: typeof _EllipsoidGeodesic;
export { _EllipsoidGeodesicShim as EllipsoidGeodesic };
import { EllipsoidGeometry as _EllipsoidGeometry } from "@cesium/core";
/**
* @deprecated EllipsoidGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _EllipsoidGeometryShim: typeof _EllipsoidGeometry;
export { _EllipsoidGeometryShim as EllipsoidGeometry };
import { EllipsoidOutlineGeometry as _EllipsoidOutlineGeometry } from "@cesium/core";
/**
* @deprecated EllipsoidOutlineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _EllipsoidOutlineGeometryShim: typeof _EllipsoidOutlineGeometry;
export { _EllipsoidOutlineGeometryShim as EllipsoidOutlineGeometry };
import { EllipsoidRhumbLine as _EllipsoidRhumbLine } from "@cesium/core";
/**
* @deprecated EllipsoidRhumbLine has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _EllipsoidRhumbLineShim: typeof _EllipsoidRhumbLine;
export { _EllipsoidRhumbLineShim as EllipsoidRhumbLine };
import { EllipsoidTangentPlane as _EllipsoidTangentPlane } from "@cesium/core";
/**
* @deprecated EllipsoidTangentPlane has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _EllipsoidTangentPlaneShim: typeof _EllipsoidTangentPlane;
export { _EllipsoidTangentPlaneShim as EllipsoidTangentPlane };
import { Event as _Event } from "@cesium/core";
/**
* @deprecated Event has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _EventShim: typeof _Event;
export { _EventShim as Event };
import { EventHelper as _EventHelper } from "@cesium/core";
/**
* @deprecated EventHelper has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _EventHelperShim: typeof _EventHelper;
export { _EventHelperShim as EventHelper };
import { ExtrapolationType as _ExtrapolationType } from "@cesium/core";
/**
* @deprecated ExtrapolationType has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _ExtrapolationTypeShim: typeof _ExtrapolationType;
export { _ExtrapolationTypeShim as ExtrapolationType };
import { Frozen as _Frozen } from "@cesium/core";
/**
* @deprecated Frozen has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _FrozenShim: typeof _Frozen;
export { _FrozenShim as Frozen };
import { GeographicProjection as _GeographicProjection } from "@cesium/core";
/**
* @deprecated GeographicProjection has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _GeographicProjectionShim: typeof _GeographicProjection;
export { _GeographicProjectionShim as GeographicProjection };
import { Geometry as _Geometry } from "@cesium/core";
/**
* @deprecated Geometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _GeometryShim: typeof _Geometry;
export { _GeometryShim as Geometry };
import { GeometryAttribute as _GeometryAttribute } from "@cesium/core";
/**
* @deprecated GeometryAttribute has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _GeometryAttributeShim: typeof _GeometryAttribute;
export { _GeometryAttributeShim as GeometryAttribute };
import { GeometryAttributes as _GeometryAttributes } from "@cesium/core";
/**
* @deprecated GeometryAttributes has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _GeometryAttributesShim: typeof _GeometryAttributes;
export { _GeometryAttributesShim as GeometryAttributes };
import { GeometryFactory as _GeometryFactory } from "@cesium/core";
/**
* @deprecated GeometryFactory has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _GeometryFactoryShim: typeof _GeometryFactory;
export { _GeometryFactoryShim as GeometryFactory };
import { GeometryInstance as _GeometryInstance } from "@cesium/core";
/**
* @deprecated GeometryInstance has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _GeometryInstanceShim: typeof _GeometryInstance;
export { _GeometryInstanceShim as GeometryInstance };
import { GeometryInstanceAttribute as _GeometryInstanceAttribute } from "@cesium/core";
/**
* @deprecated GeometryInstanceAttribute has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _GeometryInstanceAttributeShim: typeof _GeometryInstanceAttribute;
export { _GeometryInstanceAttributeShim as GeometryInstanceAttribute };
import { GeometryPipeline as _GeometryPipeline } from "@cesium/core";
/**
* @deprecated GeometryPipeline has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _GeometryPipelineShim: typeof _GeometryPipeline;
export { _GeometryPipelineShim as GeometryPipeline };
import { GregorianDate as _GregorianDate } from "@cesium/core";
/**
* @deprecated GregorianDate has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _GregorianDateShim: typeof _GregorianDate;
export { _GregorianDateShim as GregorianDate };
import { HeadingPitchRange as _HeadingPitchRange } from "@cesium/core";
/**
* @deprecated HeadingPitchRange has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _HeadingPitchRangeShim: typeof _HeadingPitchRange;
export { _HeadingPitchRangeShim as HeadingPitchRange };
import { HeadingPitchRoll as _HeadingPitchRoll } from "@cesium/core";
/**
* @deprecated HeadingPitchRoll has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _HeadingPitchRollShim: typeof _HeadingPitchRoll;
export { _HeadingPitchRollShim as HeadingPitchRoll };
import { HermitePolynomialApproximation as _HermitePolynomialApproximation } from "@cesium/core";
/**
* @deprecated HermitePolynomialApproximation has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _HermitePolynomialApproximationShim: typeof _HermitePolynomialApproximation;
export { _HermitePolynomialApproximationShim as HermitePolynomialApproximation };
import { HermiteSpline as _HermiteSpline } from "@cesium/core";
/**
* @deprecated HermiteSpline has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _HermiteSplineShim: typeof _HermiteSpline;
export { _HermiteSplineShim as HermiteSpline };
import { IndexDatatype as _IndexDatatype } from "@cesium/core";
/**
* @deprecated IndexDatatype has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _IndexDatatypeShim: typeof _IndexDatatype;
export { _IndexDatatypeShim as IndexDatatype };
import { Intersect as _Intersect } from "@cesium/core";
/**
* @deprecated Intersect has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _IntersectShim: typeof _Intersect;
export { _IntersectShim as Intersect };
import { IntersectionTests as _IntersectionTests } from "@cesium/core";
/**
* @deprecated IntersectionTests has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _IntersectionTestsShim: typeof _IntersectionTests;
export { _IntersectionTestsShim as IntersectionTests };
import { Intersections2D as _Intersections2D } from "@cesium/core";
/**
* @deprecated Intersections2D has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _Intersections2DShim: typeof _Intersections2D;
export { _Intersections2DShim as Intersections2D };
import { Interval as _Interval } from "@cesium/core";
/**
* @deprecated Interval has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _IntervalShim: typeof _Interval;
export { _IntervalShim as Interval };
import { Iso8601 as _Iso8601 } from "@cesium/core";
/**
* @deprecated Iso8601 has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _Iso8601Shim: typeof _Iso8601;
export { _Iso8601Shim as Iso8601 };
import { JulianDate as _JulianDate } from "@cesium/core";
/**
* @deprecated JulianDate has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _JulianDateShim: typeof _JulianDate;
export { _JulianDateShim as JulianDate };
import { LagrangePolynomialApproximation as _LagrangePolynomialApproximation } from "@cesium/core";
/**
* @deprecated LagrangePolynomialApproximation has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _LagrangePolynomialApproximationShim: typeof _LagrangePolynomialApproximation;
export { _LagrangePolynomialApproximationShim as LagrangePolynomialApproximation };
import { LeapSecond as _LeapSecond } from "@cesium/core";
/**
* @deprecated LeapSecond has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _LeapSecondShim: typeof _LeapSecond;
export { _LeapSecondShim as LeapSecond };
import { LinearApproximation as _LinearApproximation } from "@cesium/core";
/**
* @deprecated LinearApproximation has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _LinearApproximationShim: typeof _LinearApproximation;
export { _LinearApproximationShim as LinearApproximation };
import { LinearSpline as _LinearSpline } from "@cesium/core";
/**
* @deprecated LinearSpline has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _LinearSplineShim: typeof _LinearSpline;
export { _LinearSplineShim as LinearSpline };
import { MapProjection as _MapProjection } from "@cesium/core";
/**
* @deprecated MapProjection has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
type _MapProjectionShim = _MapProjection;
export { _MapProjectionShim as MapProjection };
import { Math as _Math } from "@cesium/core";
/**
* @deprecated Math has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _MathShim: typeof _Math;
export { _MathShim as Math };
import { Matrix2 as _Matrix2 } from "@cesium/core";
/**
* @deprecated Matrix2 has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _Matrix2Shim: typeof _Matrix2;
export { _Matrix2Shim as Matrix2 };
import { Matrix3 as _Matrix3 } from "@cesium/core";
/**
* @deprecated Matrix3 has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _Matrix3Shim: typeof _Matrix3;
export { _Matrix3Shim as Matrix3 };
import { Matrix4 as _Matrix4 } from "@cesium/core";
/**
* @deprecated Matrix4 has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _Matrix4Shim: typeof _Matrix4;
export { _Matrix4Shim as Matrix4 };
import { MorphWeightSpline as _MorphWeightSpline } from "@cesium/core";
/**
* @deprecated MorphWeightSpline has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _MorphWeightSplineShim: typeof _MorphWeightSpline;
export { _MorphWeightSplineShim as MorphWeightSpline };
import { NearFarScalar as _NearFarScalar } from "@cesium/core";
/**
* @deprecated NearFarScalar has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _NearFarScalarShim: typeof _NearFarScalar;
export { _NearFarScalarShim as NearFarScalar };
import { Occluder as _Occluder } from "@cesium/core";
/**
* @deprecated Occluder has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _OccluderShim: typeof _Occluder;
export { _OccluderShim as Occluder };
import { OrientedBoundingBox as _OrientedBoundingBox } from "@cesium/core";
/**
* @deprecated OrientedBoundingBox has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _OrientedBoundingBoxShim: typeof _OrientedBoundingBox;
export { _OrientedBoundingBoxShim as OrientedBoundingBox };
import { OrthographicFrustum as _OrthographicFrustum } from "@cesium/core";
/**
* @deprecated OrthographicFrustum has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _OrthographicFrustumShim: typeof _OrthographicFrustum;
export { _OrthographicFrustumShim as OrthographicFrustum };
import { OrthographicOffCenterFrustum as _OrthographicOffCenterFrustum } from "@cesium/core";
/**
* @deprecated OrthographicOffCenterFrustum has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _OrthographicOffCenterFrustumShim: typeof _OrthographicOffCenterFrustum;
export { _OrthographicOffCenterFrustumShim as OrthographicOffCenterFrustum };
import { Packable as _Packable } from "@cesium/core";
/**
* @deprecated Packable has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PackableShim: typeof _Packable;
export { _PackableShim as Packable };
import { PackableForInterpolation as _PackableForInterpolation } from "@cesium/core";
/**
* @deprecated PackableForInterpolation has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PackableForInterpolationShim: typeof _PackableForInterpolation;
export { _PackableForInterpolationShim as PackableForInterpolation };
import { PerspectiveFrustum as _PerspectiveFrustum } from "@cesium/core";
/**
* @deprecated PerspectiveFrustum has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PerspectiveFrustumShim: typeof _PerspectiveFrustum;
export { _PerspectiveFrustumShim as PerspectiveFrustum };
import { PerspectiveOffCenterFrustum as _PerspectiveOffCenterFrustum } from "@cesium/core";
/**
* @deprecated PerspectiveOffCenterFrustum has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PerspectiveOffCenterFrustumShim: typeof _PerspectiveOffCenterFrustum;
export { _PerspectiveOffCenterFrustumShim as PerspectiveOffCenterFrustum };
import { PixelDatatype as _PixelDatatype } from "@cesium/core";
/**
* @deprecated PixelDatatype has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PixelDatatypeShim: typeof _PixelDatatype;
export { _PixelDatatypeShim as PixelDatatype };
import { PixelFormat as _PixelFormat } from "@cesium/core";
/**
* @deprecated PixelFormat has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PixelFormatShim: typeof _PixelFormat;
export { _PixelFormatShim as PixelFormat };
import { Plane as _Plane } from "@cesium/core";
/**
* @deprecated Plane has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PlaneShim: typeof _Plane;
export { _PlaneShim as Plane };
import { PlaneGeometry as _PlaneGeometry } from "@cesium/core";
/**
* @deprecated PlaneGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PlaneGeometryShim: typeof _PlaneGeometry;
export { _PlaneGeometryShim as PlaneGeometry };
import { PlaneOutlineGeometry as _PlaneOutlineGeometry } from "@cesium/core";
/**
* @deprecated PlaneOutlineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PlaneOutlineGeometryShim: typeof _PlaneOutlineGeometry;
export { _PlaneOutlineGeometryShim as PlaneOutlineGeometry };
import { PolygonGeometry as _PolygonGeometry } from "@cesium/core";
/**
* @deprecated PolygonGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PolygonGeometryShim: typeof _PolygonGeometry;
export { _PolygonGeometryShim as PolygonGeometry };
import { PolygonHierarchy as _PolygonHierarchy } from "@cesium/core";
/**
* @deprecated PolygonHierarchy has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PolygonHierarchyShim: typeof _PolygonHierarchy;
export { _PolygonHierarchyShim as PolygonHierarchy };
import { PolygonOutlineGeometry as _PolygonOutlineGeometry } from "@cesium/core";
/**
* @deprecated PolygonOutlineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PolygonOutlineGeometryShim: typeof _PolygonOutlineGeometry;
export { _PolygonOutlineGeometryShim as PolygonOutlineGeometry };
import { PolylineGeometry as _PolylineGeometry } from "@cesium/core";
/**
* @deprecated PolylineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PolylineGeometryShim: typeof _PolylineGeometry;
export { _PolylineGeometryShim as PolylineGeometry };
import { PolylineVolumeGeometry as _PolylineVolumeGeometry } from "@cesium/core";
/**
* @deprecated PolylineVolumeGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PolylineVolumeGeometryShim: typeof _PolylineVolumeGeometry;
export { _PolylineVolumeGeometryShim as PolylineVolumeGeometry };
import { PolylineVolumeOutlineGeometry as _PolylineVolumeOutlineGeometry } from "@cesium/core";
/**
* @deprecated PolylineVolumeOutlineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PolylineVolumeOutlineGeometryShim: typeof _PolylineVolumeOutlineGeometry;
export { _PolylineVolumeOutlineGeometryShim as PolylineVolumeOutlineGeometry };
import { PrimitiveType as _PrimitiveType } from "@cesium/core";
/**
* @deprecated PrimitiveType has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _PrimitiveTypeShim: typeof _PrimitiveType;
export { _PrimitiveTypeShim as PrimitiveType };
import { QuadraticRealPolynomial as _QuadraticRealPolynomial } from "@cesium/core";
/**
* @deprecated QuadraticRealPolynomial has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _QuadraticRealPolynomialShim: typeof _QuadraticRealPolynomial;
export { _QuadraticRealPolynomialShim as QuadraticRealPolynomial };
import { QuarticRealPolynomial as _QuarticRealPolynomial } from "@cesium/core";
/**
* @deprecated QuarticRealPolynomial has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _QuarticRealPolynomialShim: typeof _QuarticRealPolynomial;
export { _QuarticRealPolynomialShim as QuarticRealPolynomial };
import { Quaternion as _Quaternion } from "@cesium/core";
/**
* @deprecated Quaternion has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _QuaternionShim: typeof _Quaternion;
export { _QuaternionShim as Quaternion };
import { QuaternionSpline as _QuaternionSpline } from "@cesium/core";
/**
* @deprecated QuaternionSpline has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _QuaternionSplineShim: typeof _QuaternionSpline;
export { _QuaternionSplineShim as QuaternionSpline };
import { Queue as _Queue } from "@cesium/core";
/**
* @deprecated Queue has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _QueueShim: typeof _Queue;
export { _QueueShim as Queue };
import { Ray as _Ray } from "@cesium/core";
/**
* @deprecated Ray has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _RayShim: typeof _Ray;
export { _RayShim as Ray };
import { Rectangle as _Rectangle } from "@cesium/core";
/**
* @deprecated Rectangle has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _RectangleShim: typeof _Rectangle;
export { _RectangleShim as Rectangle };
import { RectangleGeometry as _RectangleGeometry } from "@cesium/core";
/**
* @deprecated RectangleGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _RectangleGeometryShim: typeof _RectangleGeometry;
export { _RectangleGeometryShim as RectangleGeometry };
import { RectangleOutlineGeometry as _RectangleOutlineGeometry } from "@cesium/core";
/**
* @deprecated RectangleOutlineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _RectangleOutlineGeometryShim: typeof _RectangleOutlineGeometry;
export { _RectangleOutlineGeometryShim as RectangleOutlineGeometry };
import { ReferenceFrame as _ReferenceFrame } from "@cesium/core";
/**
* @deprecated ReferenceFrame has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _ReferenceFrameShim: typeof _ReferenceFrame;
export { _ReferenceFrameShim as ReferenceFrame };
import { RuntimeError as _RuntimeError } from "@cesium/core";
/**
* @deprecated RuntimeError has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _RuntimeErrorShim: typeof _RuntimeError;
export { _RuntimeErrorShim as RuntimeError };
import { ShowGeometryInstanceAttribute as _ShowGeometryInstanceAttribute } from "@cesium/core";
/**
* @deprecated ShowGeometryInstanceAttribute has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _ShowGeometryInstanceAttributeShim: typeof _ShowGeometryInstanceAttribute;
export { _ShowGeometryInstanceAttributeShim as ShowGeometryInstanceAttribute };
import { SimplePolylineGeometry as _SimplePolylineGeometry } from "@cesium/core";
/**
* @deprecated SimplePolylineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _SimplePolylineGeometryShim: typeof _SimplePolylineGeometry;
export { _SimplePolylineGeometryShim as SimplePolylineGeometry };
import { SphereGeometry as _SphereGeometry } from "@cesium/core";
/**
* @deprecated SphereGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _SphereGeometryShim: typeof _SphereGeometry;
export { _SphereGeometryShim as SphereGeometry };
import { SphereOutlineGeometry as _SphereOutlineGeometry } from "@cesium/core";
/**
* @deprecated SphereOutlineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _SphereOutlineGeometryShim: typeof _SphereOutlineGeometry;
export { _SphereOutlineGeometryShim as SphereOutlineGeometry };
import { Spherical as _Spherical } from "@cesium/core";
/**
* @deprecated Spherical has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _SphericalShim: typeof _Spherical;
export { _SphericalShim as Spherical };
import { Spline as _Spline } from "@cesium/core";
/**
* @deprecated Spline has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _SplineShim: typeof _Spline;
export { _SplineShim as Spline };
import { SteppedSpline as _SteppedSpline } from "@cesium/core";
/**
* @deprecated SteppedSpline has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _SteppedSplineShim: typeof _SteppedSpline;
export { _SteppedSplineShim as SteppedSpline };
import { Stereographic as _Stereographic } from "@cesium/core";
/**
* @deprecated Stereographic has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _StereographicShim: typeof _Stereographic;
export { _StereographicShim as Stereographic };
import { TimeInterval as _TimeInterval } from "@cesium/core";
/**
* @deprecated TimeInterval has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _TimeIntervalShim: typeof _TimeInterval;
export { _TimeIntervalShim as TimeInterval };
import { TimeIntervalCollection as _TimeIntervalCollection } from "@cesium/core";
/**
* @deprecated TimeIntervalCollection has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _TimeIntervalCollectionShim: typeof _TimeIntervalCollection;
export { _TimeIntervalCollectionShim as TimeIntervalCollection };
import { TimeStandard as _TimeStandard } from "@cesium/core";
/**
* @deprecated TimeStandard has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _TimeStandardShim: typeof _TimeStandard;
export { _TimeStandardShim as TimeStandard };
import { TrackingReferenceFrame as _TrackingReferenceFrame } from "@cesium/core";
/**
* @deprecated TrackingReferenceFrame has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _TrackingReferenceFrameShim: typeof _TrackingReferenceFrame;
export { _TrackingReferenceFrameShim as TrackingReferenceFrame };
import { TranslationRotationScale as _TranslationRotationScale } from "@cesium/core";
/**
* @deprecated TranslationRotationScale has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _TranslationRotationScaleShim: typeof _TranslationRotationScale;
export { _TranslationRotationScaleShim as TranslationRotationScale };
import { TridiagonalSystemSolver as _TridiagonalSystemSolver } from "@cesium/core";
/**
* @deprecated TridiagonalSystemSolver has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _TridiagonalSystemSolverShim: typeof _TridiagonalSystemSolver;
export { _TridiagonalSystemSolverShim as TridiagonalSystemSolver };
import { VertexFormat as _VertexFormat } from "@cesium/core";
/**
* @deprecated VertexFormat has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _VertexFormatShim: typeof _VertexFormat;
export { _VertexFormatShim as VertexFormat };
import { Visibility as _Visibility } from "@cesium/core";
/**
* @deprecated Visibility has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _VisibilityShim: typeof _Visibility;
export { _VisibilityShim as Visibility };
import { WallGeometry as _WallGeometry } from "@cesium/core";
/**
* @deprecated WallGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _WallGeometryShim: typeof _WallGeometry;
export { _WallGeometryShim as WallGeometry };
import { WallOutlineGeometry as _WallOutlineGeometry } from "@cesium/core";
/**
* @deprecated WallOutlineGeometry has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _WallOutlineGeometryShim: typeof _WallOutlineGeometry;
export { _WallOutlineGeometryShim as WallOutlineGeometry };
import { WebGLConstants as _WebGLConstants } from "@cesium/core";
/**
* @deprecated WebGLConstants has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _WebGLConstantsShim: typeof _WebGLConstants;
export { _WebGLConstantsShim as WebGLConstants };
import { WebMercatorProjection as _WebMercatorProjection } from "@cesium/core";
/**
* @deprecated WebMercatorProjection has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _WebMercatorProjectionShim: typeof _WebMercatorProjection;
export { _WebMercatorProjectionShim as WebMercatorProjection };
import { WindingOrder as _WindingOrder } from "@cesium/core";
/**
* @deprecated WindingOrder has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _WindingOrderShim: typeof _WindingOrder;
export { _WindingOrderShim as WindingOrder };
import { barycentricCoordinates as _barycentricCoordinates } from "@cesium/core";
/**
* @deprecated barycentricCoordinates has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _barycentricCoordinatesShim: typeof _barycentricCoordinates;
export { _barycentricCoordinatesShim as barycentricCoordinates };
import { binarySearch as _binarySearch } from "@cesium/core";
/**
* @deprecated binarySearch has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _binarySearchShim: typeof _binarySearch;
export { _binarySearchShim as binarySearch };
import { clone as _clone } from "@cesium/core";
/**
* @deprecated clone has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _cloneShim: typeof _clone;
export { _cloneShim as clone };
import { combine as _combine } from "@cesium/core";
/**
* @deprecated combine has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _combineShim: typeof _combine;
export { _combineShim as combine };
import { createGuid as _createGuid } from "@cesium/core";
/**
* @deprecated createGuid has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _createGuidShim: typeof _createGuid;
export { _createGuidShim as createGuid };
import { defined as _defined } from "@cesium/core";
/**
* @deprecated defined has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _definedShim: typeof _defined;
export { _definedShim as defined };
import { destroyObject as _destroyObject } from "@cesium/core";
/**
* @deprecated destroyObject has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _destroyObjectShim: typeof _destroyObject;
export { _destroyObjectShim as destroyObject };
import { formatError as _formatError } from "@cesium/core";
/**
* @deprecated formatError has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _formatErrorShim: typeof _formatError;
export { _formatErrorShim as formatError };
import { getAbsoluteUri as _getAbsoluteUri } from "@cesium/core";
/**
* @deprecated getAbsoluteUri has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _getAbsoluteUriShim: typeof _getAbsoluteUri;
export { _getAbsoluteUriShim as getAbsoluteUri };
import { getBaseUri as _getBaseUri } from "@cesium/core";
/**
* @deprecated getBaseUri has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _getBaseUriShim: typeof _getBaseUri;
export { _getBaseUriShim as getBaseUri };
import { getExtensionFromUri as _getExtensionFromUri } from "@cesium/core";
/**
* @deprecated getExtensionFromUri has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _getExtensionFromUriShim: typeof _getExtensionFromUri;
export { _getExtensionFromUriShim as getExtensionFromUri };
import { getFilenameFromUri as _getFilenameFromUri } from "@cesium/core";
/**
* @deprecated getFilenameFromUri has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _getFilenameFromUriShim: typeof _getFilenameFromUri;
export { _getFilenameFromUriShim as getFilenameFromUri };
import { getTimestamp as _getTimestamp } from "@cesium/core";
/**
* @deprecated getTimestamp has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _getTimestampShim: typeof _getTimestamp;
export { _getTimestampShim as getTimestamp };
import { isLeapYear as _isLeapYear } from "@cesium/core";
/**
* @deprecated isLeapYear has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _isLeapYearShim: typeof _isLeapYear;
export { _isLeapYearShim as isLeapYear };
import { mergeSort as _mergeSort } from "@cesium/core";
/**
* @deprecated mergeSort has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _mergeSortShim: typeof _mergeSort;
export { _mergeSortShim as mergeSort };
import { objectToQuery as _objectToQuery } from "@cesium/core";
/**
* @deprecated objectToQuery has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _objectToQueryShim: typeof _objectToQuery;
export { _objectToQueryShim as objectToQuery };
import { pointInsideTriangle as _pointInsideTriangle } from "@cesium/core";
/**
* @deprecated pointInsideTriangle has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _pointInsideTriangleShim: typeof _pointInsideTriangle;
export { _pointInsideTriangleShim as pointInsideTriangle };
import { queryToObject as _queryToObject } from "@cesium/core";
/**
* @deprecated queryToObject has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _queryToObjectShim: typeof _queryToObject;
export { _queryToObjectShim as queryToObject };
import { srgbToLinear as _srgbToLinear } from "@cesium/core";
/**
* @deprecated srgbToLinear has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _srgbToLinearShim: typeof _srgbToLinear;
export { _srgbToLinearShim as srgbToLinear };
import { subdivideArray as _subdivideArray } from "@cesium/core";
/**
* @deprecated subdivideArray has been moved from cesium/engine to cesium/core in CesiumJS 1.146, and will be removed from cesium/engine in 1.150. Import from cesium/core instead.
*/
export const _subdivideArrayShim: typeof _subdivideArray;
export { _subdivideArrayShim as subdivideArray };
export namespace ArcGISTiledElevationTerrainProvider {
/**
* Initialization options for the ArcGISTiledElevationTerrainProvider constructor
* @property [token] - The authorization token to use to connect to the service.
* @property [ellipsoid = Ellipsoid.default] - The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead.
* If neither parameter is specified, the default ellipsoid is used.
*/
type ConstructorOptions = {
token?: string;
ellipsoid?: Ellipsoid;
};
}
/**
*
* To construct a CesiumTerrainProvider, call {@link ArcGISTiledElevationTerrainProvider.fromUrl}. Do not call the constructor directly.
*
*
* A {@link TerrainProvider} that produces terrain geometry by tessellating height maps
* retrieved from Elevation Tiles of an an ArcGIS ImageService.
* @example
* const terrainProvider = await Cesium.ArcGISTiledElevationTerrainProvider.fromUrl("https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer", {
* token: "KED1aF_I4UzXOHy3BnhwyBHU4l5oY6rO6walkmHoYqGp4XyIWUd5YZUC1ZrLAzvV40pR6gBXQayh0eFA8m6vPg.."
* });
* viewer.terrainProvider = terrainProvider;
*/
export class ArcGISTiledElevationTerrainProvider {
constructor();
/**
* Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
* are passed an instance of {@link TileProviderError}.
*/
readonly errorEvent: Event;
/**
* Gets the credit to display when this terrain provider is active. Typically this is used to credit
* the source of the terrain.
*/
readonly credit: Credit;
/**
* Gets the tiling scheme used by this provider.
*/
readonly tilingScheme: GeographicTilingScheme;
/**
* Gets a value indicating whether or not the provider includes a water mask. The water mask
* indicates which areas of the globe are water rather than land, so they can be rendered
* as a reflective surface with animated waves.
*/
readonly hasWaterMask: boolean;
/**
* Gets a value indicating whether or not the requested tiles include vertex normals.
*/
readonly hasVertexNormals: boolean;
/**
* Gets an object that can be used to determine availability of terrain from this provider, such as
* at points and in rectangles. This property may be undefined if availability
* information is not available.
*/
readonly availability: TileAvailability | undefined;
/**
* Creates a {@link TerrainProvider} that produces terrain geometry by tessellating height maps
* retrieved from Elevation Tiles of an an ArcGIS ImageService.
* @example
* const terrainProvider = await Cesium.ArcGISTiledElevationTerrainProvider.fromUrl("https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer", {
* token: "KED1aF_I4UzXOHy3BnhwyBHU4l5oY6rO6walkmHoYqGp4XyIWUd5YZUC1ZrLAzvV40pR6gBXQayh0eFA8m6vPg.."
* });
* viewer.terrainProvider = terrainProvider;
* @param url - The URL of the ArcGIS ImageServer service.
* @param [options] - A url or an object describing initialization options.
*/
static fromUrl(url: Resource | string | Promise | Promise, options?: ArcGISTiledElevationTerrainProvider.ConstructorOptions): Promise;
/**
* Requests the geometry for a given tile. The result includes terrain
* data and indicates that all child tiles are available.
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @param [request] - The request object. Intended for internal use only.
* @returns A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
*/
requestTileGeometry(x: number, y: number, level: number, request?: Request): Promise | undefined;
/**
* Gets the maximum geometric error allowed in a tile at a given level.
* @param level - The tile level for which to get the maximum geometric error.
* @returns The maximum geometric error.
*/
getLevelMaximumGeometricError(level: number): number;
/**
* Determines whether data for a tile is available to be loaded.
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @returns Undefined if not supported, otherwise true or false.
*/
getTileDataAvailable(x: number, y: number, level: number): boolean | undefined;
/**
* Makes sure we load availability data for a tile
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @returns This provider does not support loading availability.
*/
loadTileDataAvailability(x: number, y: number, level: number): undefined;
}
/**
* Provides geocoding through Bing Maps.
* @param options - Object with the following properties:
* @param options.key - A key to use with the Bing Maps geocoding service
* @param [options.culture] - A Bing Maps {@link https://docs.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes|Culture Code} to return results in a specific culture and language.
*/
export class BingMapsGeocoderService {
constructor(options: {
key: string;
culture?: string;
});
/**
* The URL endpoint for the Bing geocoder service
*/
readonly url: string;
/**
* The key for the Bing geocoder service
*/
readonly key: string;
/**
* Gets the credit to display after a geocode is performed. Typically this is used to credit
* the geocoder service.
*/
readonly credit: Credit | undefined;
/**
* @param query - The query to be sent to the geocoder service
*/
geocode(query: string): Promise;
}
/**
* Geocodes queries containing longitude and latitude coordinates and an optional height.
* Query format: `longitude latitude (height)` with longitude/latitude in degrees and height in meters.
*/
export class CartographicGeocoderService {
/**
* Gets the credit to display after a geocode is performed. Typically this is used to credit
* the geocoder service.
*/
readonly credit: Credit | undefined;
/**
* @param query - The query to be sent to the geocoder service
*/
geocode(query: string): Promise;
}
/**
* Terrain data for a single tile where the terrain data is represented as a glb (binary glTF).
* @param options - Object with the following properties:
* @param options.gltf - The parsed glTF JSON.
* @param options.minimumHeight - The minimum terrain height within the tile, in meters above the ellipsoid.
* @param options.maximumHeight - The maximum terrain height within the tile, in meters above the ellipsoid.
* @param options.boundingSphere - A sphere bounding all of the vertices in the mesh.
* @param options.orientedBoundingBox - An oriented bounding box containing all of the vertices in the mesh.
* @param options.horizonOcclusionPoint - The horizon occlusion point of the mesh. If this point
* is below the horizon, the entire tile is assumed to be below the horizon as well.
* The point is expressed in ellipsoid-scaled coordinates.
* @param options.skirtHeight - The height of the skirt to add on the edges of the tile.
* @param [options.requestVertexNormals = false] - Indicates whether normals should be loaded.
* @param [options.requestWaterMask = false] - Indicates whether water mask data should be loaded.
* @param [options.credits] - Array of credits for this tile.
* @param [options.childTileMask = 15] - A bit mask indicating which of this tile's four children exist.
* If a child's bit is set, geometry will be requested for that tile as well when it
* is needed. If the bit is cleared, the child tile is not requested and geometry is
* instead upsampled from the parent. The bit values are as follows:
*
*
Bit Position
Bit Value
Child Tile
*
0
1
Southwest
*
1
2
Southeast
*
2
4
Northwest
*
3
8
Northeast
*
* @param [options.waterMask] - The buffer containing the water mask.
*/
export class Cesium3DTilesTerrainData {
constructor(options: {
gltf: {
[key: string]: any;
};
minimumHeight: number;
maximumHeight: number;
boundingSphere: BoundingSphere;
orientedBoundingBox: OrientedBoundingBox;
horizonOcclusionPoint: Cartesian3;
skirtHeight: number;
requestVertexNormals?: boolean;
requestWaterMask?: boolean;
credits?: Credit[];
childTileMask?: number;
waterMask?: Uint8Array;
});
/**
* An array of credits for this tile.
*/
credits: Credit[] | undefined;
/**
* The water mask included in this terrain data, if any. A water mask is a rectangular
* Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
* Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
*/
waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement | ImageBitmap | undefined;
/**
* Returns the terrain height at a specified longitude and latitude, or undefined if the mesh is undefined.
* @param rectangle - The rectangle covered by this terrain data.
* @param longitude - The longitude in radians.
* @param latitude - The latitude in radians.
* @returns The terrain height at the specified position, or undefined if the mesh is undefined.
* If the position is outside the rectangle, this method will extrapolate the height,
* which is likely to be wildly incorrect for positions far outside the rectangle.
*/
interpolateHeight(rectangle: Rectangle, longitude: number, latitude: number): number | undefined;
/**
* Determines if a given child tile is available, based on the
* {@link TerrainData#childTileMask}. The given child tile coordinates are assumed
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
* @param thisX - The tile X coordinate of this (the parent) tile.
* @param thisY - The tile Y coordinate of this (the parent) tile.
* @param childX - The tile X coordinate of the child tile to check for availability.
* @param childY - The tile Y coordinate of the child tile to check for availability.
* @returns True if the child tile is available; otherwise, false.
*/
isChildAvailable(thisX: number, thisY: number, childX: number, childY: number): boolean;
/**
* Upsamples this terrain data for use by a descendant tile.
* @param tilingScheme - The tiling scheme of this terrain data.
* @param thisX - The X coordinate of this tile in the tiling scheme.
* @param thisY - The Y coordinate of this tile in the tiling scheme.
* @param thisLevel - The level of this tile in the tiling scheme.
* @param descendantX - The X coordinate within the tiling scheme of the descendant tile for which we are upsampling.
* @param descendantY - The Y coordinate within the tiling scheme of the descendant tile for which we are upsampling.
* @param descendantLevel - The level within the tiling scheme of the descendant tile for which we are upsampling.
* @returns A promise for upsampled terrain data for the descendant tile, or undefined if createMesh has not been called yet or too many asynchronous upsample operations are in progress and the request has been deferred.
*/
upsample(tilingScheme: TilingScheme, thisX: number, thisY: number, thisLevel: number, descendantX: number, descendantY: number, descendantLevel: number): Promise | undefined;
/**
* Gets a value indicating whether or not this terrain data was created by upsampling lower resolution
* terrain data. If this value is false, the data was obtained from some other source, such
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link Cesium3DTilesTerrainData#upsample}.
* @returns True if this instance was created by upsampling; otherwise, false.
*/
wasCreatedByUpsampling(): boolean;
}
export namespace Cesium3DTilesTerrainProvider {
/**
* Initialization options for the Cesium3DTilesTerrainProvider constructor
* @property [requestVertexNormals = false] - Flag that indicates if the client should request additional lighting information from the server, in the form of per vertex normals if available.
* @property [requestWaterMask = false] - Flag that indicates if the client should request per tile water masks from the server, if available.
* @property [ellipsoid = Ellipsoid.default] - The ellipsoid. If not specified, the WGS84 ellipsoid is used.
* @property [credit] - A credit for the data source, which is displayed on the canvas.
*/
type ConstructorOptions = {
requestVertexNormals?: boolean;
requestWaterMask?: boolean;
ellipsoid?: Ellipsoid;
credit?: Credit | string;
};
}
/**
*
* To construct a Cesium3DTilesTerrainProvider, call {@link Cesium3DTilesTerrainProvider.fromIonAssetId} or {@link Cesium3DTilesTerrainProvider.fromUrl}. Do not call the constructor directly.
*
*
* A {@link TerrainProvider} that accesses terrain data in a 3D Tiles format.
* @param [options] - An object describing initialization options
*/
export class Cesium3DTilesTerrainProvider {
constructor(options?: Cesium3DTilesTerrainProvider.ConstructorOptions);
/**
* Creates a {@link TerrainProvider} that accesses terrain data in a Cesium 3D Tiles format.
* @example
* // Create terrain with normals.
* try {
* const viewer = new Cesium.Viewer("cesiumContainer", {
* terrainProvider: await Cesium.Cesium3DTilesTerrainProvider.fromUrl(
* Cesium.IonResource.fromAssetId(3956), {
* requestVertexNormals: true
* })
* });
* } catch (error) {
* console.log(error);
* }
* @param url - The URL of the Cesium terrain server.
* @param [options] - An object describing initialization options.
* @returns A promise that resolves to the terrain provider.
*/
static fromUrl(url: Resource | string | Promise | Promise, options?: Cesium3DTilesTerrainProvider.ConstructorOptions): Promise;
/**
* Creates a {@link TerrainProvider} from a Cesium ion asset ID that accesses terrain data in a Cesium 3D Tiles format
* @example
* // Create GTOPO30 with vertex normals
* try {
* const viewer = new Cesium.Viewer("cesiumContainer", {
* terrainProvider: await Cesium.Cesium3DTilesTerrainProvider.fromIonAssetId(2732686, {
* requestVertexNormals: true
* })
* });
* } catch (error) {
* console.log(error);
* }
* @param assetId - The Cesium ion asset id.
* @param [options] - An object describing initialization options.
*/
static fromIonAssetId(assetId: number, options?: CesiumTerrainProvider.ConstructorOptions): Promise;
/**
* Requests the geometry for a given tile. This function should not be called before
* {@link Cesium3DTilesTerrainProvider#ready} returns true. The result must include terrain data and
* may optionally include a water mask and an indication of which child tiles are available.
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @param [request] - The request object. Intended for internal use only.
* @returns A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
*/
requestTileGeometry(x: number, y: number, level: number, request?: Request): Promise | undefined;
/**
* Determines whether data for a tile is available to be loaded.
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @returns Undefined if not supported or availability is unknown, otherwise true or false.
*/
getTileDataAvailable(x: number, y: number, level: number): boolean | undefined;
/**
* Make sure we load availability data for a tile
* @param _x - The X coordinate of the tile for which to request geometry.
* @param _y - The Y coordinate of the tile for which to request geometry.
* @param _level - The level of the tile for which to request geometry.
* @returns Undefined if nothing need to be loaded or a Promise that resolves when all required tiles are loaded
*/
loadTileDataAvailability(_x: number, _y: number, _level: number): Promise | undefined;
/**
* Get the maximum geometric error allowed in a tile at a given level.
* @param level - The tile level for which to get the maximum geometric error.
* @returns The maximum geometric error.
*/
getLevelMaximumGeometricError(level: number): number;
/**
* Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
* are passed an instance of {@link TileProviderError}.
*/
errorEvent: Event;
/**
* Gets the credit to display when this terrain provider is active. Typically this is used to credit
* the source of the terrain.
*/
credit: Credit;
/**
* Gets the tiling scheme used by the provider.
*/
tilingScheme: TilingScheme;
/**
* Gets a value indicating whether or not the provider includes a water mask. The water mask
* indicates which areas of the globe are water rather than land, so they can be rendered
* as a reflective surface with animated waves.
*/
hasWaterMask: boolean;
/**
* Gets a value indicating whether or not the requested tiles include vertex normals.
*/
hasVertexNormals: boolean;
/**
* Gets an object that can be used to determine availability of terrain from this provider, such as
* at points and in rectangles.
*/
availability: TileAvailability | undefined;
}
export namespace CesiumTerrainProvider {
/**
* Initialization options for the CesiumTerrainProvider constructor
* @property [requestVertexNormals = false] - Flag that indicates if the client should request additional lighting information from the server, in the form of per vertex normals if available.
* @property [requestWaterMask = false] - Flag that indicates if the client should request per tile water masks from the server, if available.
* @property [requestMetadata = true] - Flag that indicates if the client should request per tile metadata from the server, if available.
* @property [ellipsoid = Ellipsoid.default] - The ellipsoid. If not specified, the default ellipsoid is used.
* @property [credit] - A credit for the data source, which is displayed on the canvas.
*/
type ConstructorOptions = {
requestVertexNormals?: boolean;
requestWaterMask?: boolean;
requestMetadata?: boolean;
ellipsoid?: Ellipsoid;
credit?: Credit | string;
};
}
/**
*
* To construct a CesiumTerrainProvider, call {@link CesiumTerrainProvider.fromIonAssetId} or {@link CesiumTerrainProvider.fromUrl}. Do not call the constructor directly.
*
*
* A {@link TerrainProvider} that accesses terrain data in a Cesium terrain format.
* Terrain formats can be one of the following:
*
* @example
* // Create Arctic DEM terrain with normals.
* try {
* const viewer = new Cesium.Viewer("cesiumContainer", {
* terrainProvider: await Cesium.CesiumTerrainProvider.fromIonAssetId(3956, {
* requestVertexNormals: true
* })
* });
* } catch (error) {
* console.log(error);
* }
* @param [options] - An object describing initialization options
*/
export class CesiumTerrainProvider {
constructor(options?: CesiumTerrainProvider.ConstructorOptions);
/**
* Requests the geometry for a given tile. The result must include terrain data and
* may optionally include a water mask and an indication of which child tiles are available.
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @param [request] - The request object. Intended for internal use only.
* @returns A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
*/
requestTileGeometry(x: number, y: number, level: number, request?: Request): Promise | undefined;
/**
* Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
* are passed an instance of {@link TileProviderError}.
*/
readonly errorEvent: Event;
/**
* Gets the credit to display when this terrain provider is active. Typically this is used to credit
* the source of the terrain.
*/
readonly credit: Credit;
/**
* Gets the tiling scheme used by this provider.
*/
readonly tilingScheme: GeographicTilingScheme;
/**
* Gets a value indicating whether or not the provider includes a water mask. The water mask
* indicates which areas of the globe are water rather than land, so they can be rendered
* as a reflective surface with animated waves.
*/
readonly hasWaterMask: boolean;
/**
* Gets a value indicating whether or not the requested tiles include vertex normals.
*/
readonly hasVertexNormals: boolean;
/**
* Gets a value indicating whether or not the requested tiles include metadata.
*/
readonly hasMetadata: boolean;
/**
* Boolean flag that indicates if the client should request vertex normals from the server.
* Vertex normals data is appended to the standard tile mesh data only if the client requests the vertex normals and
* if the server provides vertex normals.
*/
readonly requestVertexNormals: boolean;
/**
* Boolean flag that indicates if the client should request a watermask from the server.
* Watermask data is appended to the standard tile mesh data only if the client requests the watermask and
* if the server provides a watermask.
*/
readonly requestWaterMask: boolean;
/**
* Boolean flag that indicates if the client should request metadata from the server.
* Metadata is appended to the standard tile mesh data only if the client requests the metadata and
* if the server provides a metadata.
*/
readonly requestMetadata: boolean;
/**
* Gets an object that can be used to determine availability of terrain from this provider, such as
* at points and in rectangles. This property may be undefined if availability
* information is not available. Note that this reflects tiles that are known to be available currently.
* Additional tiles may be discovered to be available in the future, e.g. if availability information
* exists deeper in the tree rather than it all being discoverable at the root. However, a tile that
* is available now will not become unavailable in the future.
*/
readonly availability: TileAvailability | undefined;
/**
* Gets the maximum geometric error allowed in a tile at a given level.
* @param level - The tile level for which to get the maximum geometric error.
* @returns The maximum geometric error.
*/
getLevelMaximumGeometricError(level: number): number;
/**
* Creates a {@link TerrainProvider} from a Cesium ion asset ID that accesses terrain data in a Cesium terrain format
* Terrain formats can be one of the following:
*
* @example
* // Create Arctic DEM terrain with normals.
* try {
* const viewer = new Cesium.Viewer("cesiumContainer", {
* terrainProvider: await Cesium.CesiumTerrainProvider.fromUrl(
* Cesium.IonResource.fromAssetId(3956), {
* requestVertexNormals: true
* })
* });
* } catch (error) {
* console.log(error);
* }
* @param url - The URL of the Cesium terrain server.
* @param [options] - An object describing initialization options.
*/
static fromUrl(url: Resource | string | Promise | Promise, options?: CesiumTerrainProvider.ConstructorOptions): Promise;
/**
* Determines whether data for a tile is available to be loaded.
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @returns Undefined if not supported or availability is unknown, otherwise true or false.
*/
getTileDataAvailable(x: number, y: number, level: number): boolean | undefined;
/**
* Makes sure we load availability data for a tile
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @returns Undefined if nothing need to be loaded or a Promise that resolves when all required tiles are loaded
*/
loadTileDataAvailability(x: number, y: number, level: number): undefined | Promise;
}
/**
* Describes a compressed texture and contains a compressed texture buffer.
* @param internalFormat - The pixel format of the compressed texture.
* @param pixelDatatype - The pixel datatype of the compressed texture.
* @param width - The width of the texture.
* @param height - The height of the texture.
* @param buffer - The compressed texture buffer.
*/
export class CompressedTextureBuffer {
constructor(internalFormat: PixelFormat, pixelDatatype: PixelDatatype, width: number, height: number, buffer: Uint8Array);
/**
* The format of the compressed texture.
*/
readonly internalFormat: PixelFormat;
/**
* The datatype of the compressed texture.
*/
readonly pixelDatatype: PixelDatatype;
/**
* The width of the texture.
*/
readonly width: number;
/**
* The height of the texture.
*/
readonly height: number;
/**
* The compressed texture buffer.
*/
readonly bufferView: Uint8Array;
/**
* The compressed texture buffer. Alias for bufferView.
*/
readonly arrayBufferView: Uint8Array;
/**
* Creates a shallow clone of a compressed texture buffer.
* @param object - The compressed texture buffer to be cloned.
* @returns A shallow clone of the compressed texture buffer.
*/
static clone(object: CompressedTextureBuffer): CompressedTextureBuffer;
/**
* Creates a shallow clone of this compressed texture buffer.
* @returns A shallow clone of the compressed texture buffer.
*/
clone(): CompressedTextureBuffer;
}
/**
* A credit contains data pertaining to how to display attributions/credits for certain content on the screen.
* @example
* // Create a credit with a tooltip, image and link
* const credit = new Cesium.Credit('');
* @param html - An string representing an html code snippet
* @param [showOnScreen = false] - If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover. All credits are displayed `inline`, if you have an image we recommend sizing it correctly to match the text or use css to `vertical-align` it.
*/
export class Credit {
constructor(html: string, showOnScreen?: boolean);
/**
* The credit content
*/
readonly html: string;
/**
* Whether the credit should be displayed on screen or in a lightbox
*/
showOnScreen: boolean;
/**
* Gets the credit element
*/
readonly element: HTMLElement;
/**
* Returns true if the credits are equal
* @param [left] - The first credit
* @param [right] - The second credit
* @returns true if left and right are equal, false otherwise.
*/
static equals(left?: Credit, right?: Credit): boolean;
/**
* Returns true if the credits are equal
* @param [credit] - The credit to compare to.
* @returns true if left and right are equal, false otherwise.
*/
equals(credit?: Credit): boolean;
/**
* Duplicates a Credit instance.
* @param [credit] - The Credit to duplicate.
* @returns A new Credit instance that is a duplicate of the one provided. (Returns undefined if the credit is undefined)
*/
static clone(credit?: Credit): Credit;
}
export namespace CustomHeightmapTerrainProvider {
/**
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
*/
type GeometryCallback = (x: number, y: number, level: number) => Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | number[] | Promise | undefined;
}
/**
* A simple {@link TerrainProvider} that gets height values from a callback function.
* It can be used for procedurally generated terrain or as a way to load custom
* heightmap data without creating a subclass of {@link TerrainProvider}.
*
* There are some limitations such as no water mask, no vertex normals, and no
* availability, so a full-fledged {@link TerrainProvider} subclass is better suited
* for these more sophisticated use cases.
* @example
* const viewer = new Cesium.Viewer("cesiumContainer", {
* terrainProvider: new Cesium.CustomHeightmapTerrainProvider({
* width: 32,
* height: 32,
* callback: function (x, y, level) {
* return new Float32Array(32 * 32); // all zeros
* },
* }),
* });
* @param options - Object with the following properties:
* @param options.callback - The callback function for requesting tile geometry.
* @param options.width - The number of columns per heightmap tile.
* @param options.height - The number of rows per heightmap tile.
* @param [options.tilingScheme] - The tiling scheme specifying how the ellipsoidal
* surface is broken into tiles. If this parameter is not provided, a {@link GeographicTilingScheme}
* is used.
* @param [options.ellipsoid = Ellipsoid.default] - The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
* parameter is specified, the default ellipsoid is used.
* @param [options.credit] - A credit for the data source, which is displayed on the canvas.
*/
export class CustomHeightmapTerrainProvider {
constructor(options: {
callback: CustomHeightmapTerrainProvider.GeometryCallback;
width: number;
height: number;
tilingScheme?: TilingScheme;
ellipsoid?: Ellipsoid;
credit?: Credit | string;
});
/**
* Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
* are passed an instance of {@link TileProviderError}.
*/
readonly errorEvent: Event;
/**
* Gets the credit to display when this terrain provider is active. Typically this is used to credit
* the source of the terrain.
*/
readonly credit: Credit;
/**
* Gets the tiling scheme used by this provider.
*/
readonly tilingScheme: TilingScheme;
/**
* Gets a value indicating whether or not the provider includes a water mask. The water mask
* indicates which areas of the globe are water rather than land, so they can be rendered
* as a reflective surface with animated waves.
* Water mask is not supported by {@link CustomHeightmapTerrainProvider}, so the return
* value will always be false.
*/
readonly hasWaterMask: boolean;
/**
* Gets a value indicating whether or not the requested tiles include vertex normals.
* Vertex normals are not supported by {@link CustomHeightmapTerrainProvider}, so the return
* value will always be false.
*/
readonly hasVertexNormals: boolean;
/**
* Gets an object that can be used to determine availability of terrain from this provider, such as
* at points and in rectangles. This property may be undefined if availability
* information is not available.
*/
readonly availability: TileAvailability;
/**
* Gets the number of columns per heightmap tile.
*/
readonly width: boolean;
/**
* Gets the number of rows per heightmap tile.
*/
readonly height: boolean;
/**
* Requests the geometry for a given tile. The result includes terrain
* data and indicates that all child tiles are available.
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @param [request] - The request object. Intended for internal use only.
* @returns A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
*/
requestTileGeometry(x: number, y: number, level: number, request?: Request): Promise | undefined;
/**
* Gets the maximum geometric error allowed in a tile at a given level.
* @param level - The tile level for which to get the maximum geometric error.
* @returns The maximum geometric error.
*/
getLevelMaximumGeometricError(level: number): number;
/**
* Determines whether data for a tile is available to be loaded.
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @returns Undefined if not supported, otherwise true or false.
*/
getTileDataAvailable(x: number, y: number, level: number): boolean | undefined;
/**
* Makes sure we load availability data for a tile
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @returns Undefined if nothing need to be loaded or a Promise that resolves when all required tiles are loaded
*/
loadTileDataAvailability(x: number, y: number, level: number): undefined | Promise;
}
/**
* A simple proxy that appends the desired resource as the sole query parameter
* to the given proxy URL.
* @param proxy - The proxy URL that will be used to requests all resources.
*/
export class DefaultProxy extends Proxy {
constructor(proxy: string);
/**
* Get the final URL to use to request a given resource.
* @param resource - The resource to request.
* @returns proxied resource
*/
getURL(resource: string): string;
}
/**
* Easing functions for use with TweenCollection. These function are from
* {@link https://github.com/sole/tween.js/|Tween.js} and Robert Penner. See the
* {@link http://sole.github.io/tween.js/examples/03_graphs.html|Tween.js graphs for each function}.
*/
export namespace EasingFunction {
/**
* Linear easing.
*/
const LINEAR_NONE: EasingFunction.Callback;
/**
* Quadratic in.
*/
const QUADRATIC_IN: EasingFunction.Callback;
/**
* Quadratic out.
*/
const QUADRATIC_OUT: EasingFunction.Callback;
/**
* Quadratic in then out.
*/
const QUADRATIC_IN_OUT: EasingFunction.Callback;
/**
* Cubic in.
*/
const CUBIC_IN: EasingFunction.Callback;
/**
* Cubic out.
*/
const CUBIC_OUT: EasingFunction.Callback;
/**
* Cubic in then out.
*/
const CUBIC_IN_OUT: EasingFunction.Callback;
/**
* Quartic in.
*/
const QUARTIC_IN: EasingFunction.Callback;
/**
* Quartic out.
*/
const QUARTIC_OUT: EasingFunction.Callback;
/**
* Quartic in then out.
*/
const QUARTIC_IN_OUT: EasingFunction.Callback;
/**
* Quintic in.
*/
const QUINTIC_IN: EasingFunction.Callback;
/**
* Quintic out.
*/
const QUINTIC_OUT: EasingFunction.Callback;
/**
* Quintic in then out.
*/
const QUINTIC_IN_OUT: EasingFunction.Callback;
/**
* Sinusoidal in.
*/
const SINUSOIDAL_IN: EasingFunction.Callback;
/**
* Sinusoidal out.
*/
const SINUSOIDAL_OUT: EasingFunction.Callback;
/**
* Sinusoidal in then out.
*/
const SINUSOIDAL_IN_OUT: EasingFunction.Callback;
/**
* Exponential in.
*/
const EXPONENTIAL_IN: EasingFunction.Callback;
/**
* Exponential out.
*/
const EXPONENTIAL_OUT: EasingFunction.Callback;
/**
* Exponential in then out.
*/
const EXPONENTIAL_IN_OUT: EasingFunction.Callback;
/**
* Circular in.
*/
const CIRCULAR_IN: EasingFunction.Callback;
/**
* Circular out.
*/
const CIRCULAR_OUT: EasingFunction.Callback;
/**
* Circular in then out.
*/
const CIRCULAR_IN_OUT: EasingFunction.Callback;
/**
* Elastic in.
*/
const ELASTIC_IN: EasingFunction.Callback;
/**
* Elastic out.
*/
const ELASTIC_OUT: EasingFunction.Callback;
/**
* Elastic in then out.
*/
const ELASTIC_IN_OUT: EasingFunction.Callback;
/**
* Back in.
*/
const BACK_IN: EasingFunction.Callback;
/**
* Back out.
*/
const BACK_OUT: EasingFunction.Callback;
/**
* Back in then out.
*/
const BACK_IN_OUT: EasingFunction.Callback;
/**
* Bounce in.
*/
const BOUNCE_IN: EasingFunction.Callback;
/**
* Bounce out.
*/
const BOUNCE_OUT: EasingFunction.Callback;
/**
* Bounce in then out.
*/
const BOUNCE_IN_OUT: EasingFunction.Callback;
/**
* Function interface for implementing a custom easing function.
* @example
* function quadraticIn(time) {
* return time * time;
* }
* @example
* function quadraticOut(time) {
* return time * (2.0 - time);
* }
* @param time - The time in the range [0, 1].
*/
type Callback = (time: number) => number;
}
/**
* A very simple {@link TerrainProvider} that produces geometry by tessellating an ellipsoidal
* surface.
* @param [options] - Object with the following properties:
* @param [options.tilingScheme] - The tiling scheme specifying how the ellipsoidal
* surface is broken into tiles. If this parameter is not provided, a {@link GeographicTilingScheme}
* is used.
* @param [options.ellipsoid = Ellipsoid.default] - The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
* parameter is specified, the default ellipsoid is used.
*/
export class EllipsoidTerrainProvider {
constructor(options?: {
tilingScheme?: TilingScheme;
ellipsoid?: Ellipsoid;
});
/**
* Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
* are passed an instance of {@link TileProviderError}.
*/
readonly errorEvent: Event;
/**
* Gets the credit to display when this terrain provider is active. Typically this is used to credit
* the source of the terrain.
*/
readonly credit: Credit;
/**
* Gets the tiling scheme used by this provider.
*/
readonly tilingScheme: GeographicTilingScheme;
/**
* Gets a value indicating whether or not the provider includes a water mask. The water mask
* indicates which areas of the globe are water rather than land, so they can be rendered
* as a reflective surface with animated waves.
*/
readonly hasWaterMask: boolean;
/**
* Gets a value indicating whether or not the requested tiles include vertex normals.
*/
readonly hasVertexNormals: boolean;
/**
* Gets an object that can be used to determine availability of terrain from this provider, such as
* at points and in rectangles. This property may be undefined if availability
* information is not available.
*/
readonly availability: TileAvailability | undefined;
/**
* Requests the geometry for a given tile. The result includes terrain
* data and indicates that all child tiles are available.
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @param [request] - The request object. Intended for internal use only.
* @returns A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
*/
requestTileGeometry(x: number, y: number, level: number, request?: Request): Promise | undefined;
/**
* Gets the maximum geometric error allowed in a tile at a given level.
* @param level - The tile level for which to get the maximum geometric error.
* @returns The maximum geometric error.
*/
getLevelMaximumGeometricError(level: number): number;
/**
* Determines whether data for a tile is available to be loaded.
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @returns Undefined if not supported, otherwise true or false.
*/
getTileDataAvailable(x: number, y: number, level: number): boolean | undefined;
/**
* Makes sure we load availability data for a tile
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @returns This provider does not support loading availability.
*/
loadTileDataAvailability(x: number, y: number, level: number): undefined;
}
/**
* A set of functions to detect whether the current browser supports
* various features.
*/
export namespace FeatureDetection {
/**
* Detects whether the current browser supports Basis Universal textures and the web assembly modules needed to transcode them.
* @returns true if the browser supports web assembly modules and the scene supports Basis Universal textures, false if not.
*/
function supportsBasis(scene: Scene): boolean;
/**
* Detects whether the current browser supports the full screen standard.
* @returns true if the browser supports the full screen standard, false if not.
*/
function supportsFullscreen(): boolean;
/**
* Detects whether the current browser supports typed arrays.
* @returns true if the browser supports typed arrays, false if not.
*/
function supportsTypedArrays(): boolean;
/**
* Detects whether the current browser supports BigInt64Array typed arrays.
* @returns true if the browser supports BigInt64Array typed arrays, false if not.
*/
function supportsBigInt64Array(): boolean;
/**
* Detects whether the current browser supports BigUint64Array typed arrays.
* @returns true if the browser supports BigUint64Array typed arrays, false if not.
*/
function supportsBigUint64Array(): boolean;
/**
* Detects whether the current browser supports BigInt.
* @returns true if the browser supports BigInt, false if not.
*/
function supportsBigInt(): boolean;
/**
* Detects whether the current browser supports Web Workers.
* @returns true if the browsers supports Web Workers, false if not.
*/
function supportsWebWorkers(): boolean;
/**
* Detects whether the current browser supports Web Assembly.
* @returns true if the browsers supports Web Assembly, false if not.
*/
function supportsWebAssembly(): boolean;
/**
* Detects whether the current browser supports a WebGL2 rendering context for the specified scene.
* @param scene - the Cesium scene specifying the rendering context
* @returns true if the browser supports a WebGL2 rendering context, false if not.
*/
function supportsWebgl2(scene: Scene): boolean;
/**
* Detects whether the current browser supports ECMAScript modules in web workers.
* @returns true if the browser supports ECMAScript modules in web workers.
*/
function supportsEsmWebWorkers(): boolean;
}
/**
* Describes a frustum at the given the origin and orientation.
* @param options - Object with the following properties:
* @param options.frustum - The frustum.
* @param options.origin - The origin of the frustum.
* @param options.orientation - The orientation of the frustum.
* @param [options.vertexFormat = VertexFormat.DEFAULT] - The vertex attributes to be computed.
*/
export class FrustumGeometry {
constructor(options: {
frustum: PerspectiveFrustum | OrthographicFrustum;
origin: Cartesian3;
orientation: Quaternion;
vertexFormat?: VertexFormat;
});
/**
* The number of elements used to pack the object into an array.
*/
packedLength: number;
/**
* Stores the provided instance into the provided array.
* @param value - The value to pack.
* @param array - The array to pack into.
* @param [startingIndex = 0] - The index into the array at which to start packing the elements.
* @returns The array that was packed into
*/
static pack(value: FrustumGeometry, array: number[], startingIndex?: number): number[];
/**
* Retrieves an instance from a packed array.
* @param array - The packed array.
* @param [startingIndex = 0] - The starting index of the element to be unpacked.
* @param [result] - The object into which to store the result.
*/
static unpack(array: number[], startingIndex?: number, result?: FrustumGeometry): void;
/**
* Computes the geometric representation of a frustum, including its vertices, indices, and a bounding sphere.
* @param frustumGeometry - A description of the frustum.
* @returns The computed vertices and indices.
*/
static createGeometry(frustumGeometry: FrustumGeometry): Geometry | undefined;
}
/**
* A description of the outline of a frustum with the given the origin and orientation.
* @param options - Object with the following properties:
* @param options.frustum - The frustum.
* @param options.origin - The origin of the frustum.
* @param options.orientation - The orientation of the frustum.
*/
export class FrustumOutlineGeometry {
constructor(options: {
frustum: PerspectiveFrustum | OrthographicFrustum;
origin: Cartesian3;
orientation: Quaternion;
});
/**
* The number of elements used to pack the object into an array.
*/
packedLength: number;
/**
* Stores the provided instance into the provided array.
* @param value - The value to pack.
* @param array - The array to pack into.
* @param [startingIndex = 0] - The index into the array at which to start packing the elements.
* @returns The array that was packed into
*/
static pack(value: FrustumOutlineGeometry, array: number[], startingIndex?: number): number[];
/**
* Retrieves an instance from a packed array.
* @param array - The packed array.
* @param [startingIndex = 0] - The starting index of the element to be unpacked.
* @param [result] - The object into which to store the result.
*/
static unpack(array: number[], startingIndex?: number, result?: FrustumOutlineGeometry): void;
/**
* Computes the geometric representation of a frustum outline, including its vertices, indices, and a bounding sphere.
* @param frustumGeometry - A description of the frustum.
* @returns The computed vertices and indices.
*/
static createGeometry(frustumGeometry: FrustumOutlineGeometry): Geometry | undefined;
}
/**
* Browser-independent functions for working with the standard fullscreen API.
*/
export namespace Fullscreen {
/**
* The element that is currently fullscreen, if any. To simply check if the
* browser is in fullscreen mode or not, use {@link Fullscreen#fullscreen}.
*/
const element: any;
/**
* The name of the event on the document that is fired when fullscreen is
* entered or exited. This event name is intended for use with addEventListener.
* In your event handler, to determine if the browser is in fullscreen mode or not,
* use {@link Fullscreen#fullscreen}.
*/
const changeEventName: string;
/**
* The name of the event that is fired when a fullscreen error
* occurs. This event name is intended for use with addEventListener.
*/
const errorEventName: string;
/**
* Determine whether the browser will allow an element to be made fullscreen, or not.
* For example, by default, iframes cannot go fullscreen unless the containing page
* adds an "allowfullscreen" attribute (or prefixed equivalent).
*/
const enabled: boolean;
/**
* Determines if the browser is currently in fullscreen mode.
*/
const fullscreen: boolean;
/**
* Detects whether the browser supports the standard fullscreen API.
* @returns true if the browser supports the standard fullscreen API,
* false otherwise.
*/
function supportsFullscreen(): boolean;
/**
* Asynchronously requests the browser to enter fullscreen mode on the given element.
* If fullscreen mode is not supported by the browser, does nothing.
* @example
* // Put the entire page into fullscreen.
* Cesium.Fullscreen.requestFullscreen(document.body)
*
* // Place only the Cesium canvas into fullscreen.
* Cesium.Fullscreen.requestFullscreen(scene.canvas)
* @param element - The HTML element which will be placed into fullscreen mode.
* @param [vrDevice] - The HMDVRDevice device.
*/
function requestFullscreen(element: any, vrDevice?: any): void;
/**
* Asynchronously exits fullscreen mode. If the browser is not currently
* in fullscreen, or if fullscreen mode is not supported by the browser, does nothing.
*/
function exitFullscreen(): void;
}
/**
* The type of geocoding to be performed by a {@link GeocoderService}.
*/
export enum GeocodeType {
/**
* Perform a search where the input is considered complete.
*/
SEARCH = 0,
/**
* Perform an auto-complete using partial input, typically
* reserved for providing possible results as a user is typing.
*/
AUTOCOMPLETE = 1
}
export namespace GeocoderService {
/**
* @property displayName - The display name for a location
* @property destination - The bounding box for a location
*/
type Result = {
displayName: string;
destination: Rectangle | Cartesian3;
attributions?: object[];
};
}
/**
* Provides geocoding through an external service. This type describes an interface and
* is not intended to be used.
*/
export class GeocoderService {
constructor();
/**
* Gets the credit to display after a geocode is performed. Typically this is used to credit
* the geocoder service.
*/
readonly credit: Credit | undefined;
/**
* Parses credits from the geocoder result attributions, if present.
* @param geocoderResult - The geocoder result
* @returns A list of credits if present in the result, otherwise undefined
*/
static getCreditsFromResult(geocoderResult: GeocoderService.Result): Credit[] | undefined;
/**
* @param query - The query to be sent to the geocoder service
* @param [type = GeocodeType.SEARCH] - The type of geocode to perform.
*/
geocode(query: string, type?: GeocodeType): Promise;
}
export interface GeographicTilingScheme extends TilingScheme {
}
/**
* A tiling scheme for geometry referenced to a simple {@link GeographicProjection} where
* longitude and latitude are directly mapped to X and Y. This projection is commonly
* known as geographic, equirectangular, equidistant cylindrical, or plate carrée.
* @param [options] - Object with the following properties:
* @param [options.ellipsoid = Ellipsoid.default] - The ellipsoid whose surface is being tiled. Defaults to
* the default ellipsoid.
* @param [options.rectangle = Rectangle.MAX_VALUE] - The rectangle, in radians, covered by the tiling scheme.
* @param [options.numberOfLevelZeroTilesX = 2] - The number of tiles in the X direction at level zero of
* the tile tree.
* @param [options.numberOfLevelZeroTilesY = 1] - The number of tiles in the Y direction at level zero of
* the tile tree.
*/
export class GeographicTilingScheme implements TilingScheme {
constructor(options?: {
ellipsoid?: Ellipsoid;
rectangle?: Rectangle;
numberOfLevelZeroTilesX?: number;
numberOfLevelZeroTilesY?: number;
});
/**
* Gets the ellipsoid that is tiled by this tiling scheme.
*/
ellipsoid: Ellipsoid;
/**
* Gets the rectangle, in radians, covered by this tiling scheme.
*/
rectangle: Rectangle;
/**
* Gets the map projection used by this tiling scheme.
*/
projection: MapProjection;
/**
* Gets the total number of tiles in the X direction at a specified level-of-detail.
* @param level - The level-of-detail.
* @returns The number of tiles in the X direction at the given level.
*/
getNumberOfXTilesAtLevel(level: number): number;
/**
* Gets the total number of tiles in the Y direction at a specified level-of-detail.
* @param level - The level-of-detail.
* @returns The number of tiles in the Y direction at the given level.
*/
getNumberOfYTilesAtLevel(level: number): number;
/**
* Transforms a rectangle specified in geodetic radians to the native coordinate system
* of this tiling scheme.
* @param rectangle - The rectangle to transform.
* @param [result] - The instance to which to copy the result, or undefined if a new instance
* should be created.
* @returns The specified 'result', or a new object containing the native rectangle if 'result'
* is undefined.
*/
rectangleToNativeRectangle(rectangle: Rectangle, result?: Rectangle): Rectangle;
/**
* Converts tile x, y coordinates and level to a rectangle expressed in the native coordinates
* of the tiling scheme.
* @param x - The integer x coordinate of the tile.
* @param y - The integer y coordinate of the tile.
* @param level - The tile level-of-detail. Zero is the least detailed.
* @param [result] - The instance to which to copy the result, or undefined if a new instance
* should be created.
* @returns The specified 'result', or a new object containing the rectangle
* if 'result' is undefined.
*/
tileXYToNativeRectangle(x: number, y: number, level: number, result?: Rectangle): Rectangle;
/**
* Converts tile x, y coordinates and level to a cartographic rectangle in radians.
* @param x - The integer x coordinate of the tile.
* @param y - The integer y coordinate of the tile.
* @param level - The tile level-of-detail. Zero is the least detailed.
* @param [result] - The instance to which to copy the result, or undefined if a new instance
* should be created.
* @returns The specified 'result', or a new object containing the rectangle
* if 'result' is undefined.
*/
tileXYToRectangle(x: number, y: number, level: number, result?: Rectangle): Rectangle;
/**
* Calculates the tile x, y coordinates of the tile containing
* a given cartographic position.
* @param position - The position.
* @param level - The tile level-of-detail. Zero is the least detailed.
* @param [result] - The instance to which to copy the result, or undefined if a new instance
* should be created.
* @returns The specified 'result', or a new object containing the tile x, y coordinates
* if 'result' is undefined.
*/
positionToTileXY(position: Cartographic, level: number, result?: Cartesian2): Cartesian2;
}
/**
*
* To construct GoogleEarthEnterpriseMetadata, call {@link GoogleEarthEnterpriseMetadata.fromUrl}. Do not call the constructor directly.
*
*
* Provides metadata using the Google Earth Enterprise REST API. This is used by the GoogleEarthEnterpriseImageryProvider
* and GoogleEarthEnterpriseTerrainProvider to share metadata requests.
*/
export class GoogleEarthEnterpriseMetadata {
constructor();
/**
* True if imagery is available.
*/
imageryPresent: boolean;
/**
* True if imagery is sent as a protocol buffer, false if sent as plain images. If undefined we will try both.
*/
protoImagery: boolean | undefined;
/**
* True if terrain is available.
*/
terrainPresent: boolean;
/**
* Exponent used to compute constant to calculate negative height values.
*/
negativeAltitudeExponentBias: number;
/**
* Threshold where any numbers smaller are actually negative values. They are multiplied by -2^negativeAltitudeExponentBias.
*/
negativeAltitudeThreshold: number;
/**
* Dictionary of provider id to copyright strings.
*/
providers: any;
/**
* Key used to decode packets
*/
key: ArrayBuffer;
/**
* Gets the name of the Google Earth Enterprise server.
*/
readonly url: string;
/**
* Gets the proxy used for metadata requests.
*/
readonly proxy: Proxy;
/**
* Gets the resource used for metadata requests.
*/
readonly resource: Resource;
/**
* Creates a metadata object using the Google Earth Enterprise REST API. This is used by the GoogleEarthEnterpriseImageryProvider
* and GoogleEarthEnterpriseTerrainProvider to share metadata requests.
* @param resourceOrUrl - The url of the Google Earth Enterprise server hosting the imagery.
* @returns A promise which resolves to the created GoogleEarthEnterpriseMetadata instance/
*/
static fromUrl(resourceOrUrl: Resource | string): Promise;
/**
* Converts a tiles (x, y, level) position into a quadkey used to request an image
* from a Google Earth Enterprise server.
* @param x - The tile's x coordinate.
* @param y - The tile's y coordinate.
* @param level - The tile's zoom level.
*/
static tileXYToQuadKey(x: number, y: number, level: number): void;
/**
* Converts a tile's quadkey used to request an image from a Google Earth Enterprise server into the
* (x, y, level) position.
* @param quadkey - The tile's quad key
*/
static quadKeyToTileXY(quadkey: string): void;
}
/**
* Terrain data for a single tile from a Google Earth Enterprise server.
* @example
* const buffer = ...
* const childTileMask = ...
* const terrainData = new Cesium.GoogleEarthEnterpriseTerrainData({
* buffer : heightBuffer,
* childTileMask : childTileMask
* });
* @param options - Object with the following properties:
* @param options.buffer - The buffer containing terrain data.
* @param options.negativeAltitudeExponentBias - Multiplier for negative terrain heights that are encoded as very small positive values.
* @param options.negativeElevationThreshold - Threshold for negative values
* @param [options.childTileMask = 15] - A bit mask indicating which of this tile's four children exist.
* If a child's bit is set, geometry will be requested for that tile as well when it
* is needed. If the bit is cleared, the child tile is not requested and geometry is
* instead upsampled from the parent. The bit values are as follows:
*
*
Bit Position
Bit Value
Child Tile
*
0
1
Southwest
*
1
2
Southeast
*
2
4
Northeast
*
3
8
Northwest
*
* @param [options.createdByUpsampling = false] - True if this instance was created by upsampling another instance;
* otherwise, false.
* @param [options.credits] - Array of credits for this tile.
*/
export class GoogleEarthEnterpriseTerrainData {
constructor(options: {
buffer: ArrayBuffer;
negativeAltitudeExponentBias: number;
negativeElevationThreshold: number;
childTileMask?: number;
createdByUpsampling?: boolean;
credits?: Credit[];
});
/**
* An array of credits for this tile
*/
credits: Credit[];
/**
* The water mask included in this terrain data, if any. A water mask is a rectangular
* Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
* Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
*/
waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement | undefined;
/**
* Computes the terrain height at a specified longitude and latitude.
* @param rectangle - The rectangle covered by this terrain data.
* @param longitude - The longitude in radians.
* @param latitude - The latitude in radians.
* @returns The terrain height at the specified position. If the position
* is outside the rectangle, this method will extrapolate the height, which is likely to be wildly
* incorrect for positions far outside the rectangle.
*/
interpolateHeight(rectangle: Rectangle, longitude: number, latitude: number): number;
/**
* Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the
* height samples in this instance, interpolated if necessary.
* @param tilingScheme - The tiling scheme of this terrain data.
* @param thisX - The X coordinate of this tile in the tiling scheme.
* @param thisY - The Y coordinate of this tile in the tiling scheme.
* @param thisLevel - The level of this tile in the tiling scheme.
* @param descendantX - The X coordinate within the tiling scheme of the descendant tile for which we are upsampling.
* @param descendantY - The Y coordinate within the tiling scheme of the descendant tile for which we are upsampling.
* @param descendantLevel - The level within the tiling scheme of the descendant tile for which we are upsampling.
* @returns A promise for upsampled heightmap terrain data for the descendant tile,
* or undefined if too many asynchronous upsample operations are in progress and the request has been
* deferred.
*/
upsample(tilingScheme: TilingScheme, thisX: number, thisY: number, thisLevel: number, descendantX: number, descendantY: number, descendantLevel: number): Promise | undefined;
/**
* Determines if a given child tile is available, based on the
* {@link GoogleEarthEnterpriseTerrainData.childTileMask}. The given child tile coordinates are assumed
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
* @param thisX - The tile X coordinate of this (the parent) tile.
* @param thisY - The tile Y coordinate of this (the parent) tile.
* @param childX - The tile X coordinate of the child tile to check for availability.
* @param childY - The tile Y coordinate of the child tile to check for availability.
* @returns True if the child tile is available; otherwise, false.
*/
isChildAvailable(thisX: number, thisY: number, childX: number, childY: number): boolean;
/**
* Gets a value indicating whether or not this terrain data was created by upsampling lower resolution
* terrain data. If this value is false, the data was obtained from some other source, such
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link HeightmapTerrainData#upsample}.
* @returns True if this instance was created by upsampling; otherwise, false.
*/
wasCreatedByUpsampling(): boolean;
}
export namespace GoogleEarthEnterpriseTerrainProvider {
/**
* Initialization options for GoogleEarthEnterpriseTerrainProvider constructor
* @property [ellipsoid = Ellipsoid.default] - The ellipsoid. If not specified, the default ellipsoid is used.
* @property [credit] - A credit for the data source, which is displayed on the canvas.
*/
type ConstructorOptions = {
ellipsoid?: Ellipsoid;
credit?: Credit | string;
};
}
/**
*
* To construct a GoogleEarthEnterpriseTerrainProvider, call {@link GoogleEarthEnterpriseTerrainProvider.fromMetadata}. Do not call the constructor directly.
*
*
* Provides tiled terrain using the Google Earth Enterprise REST API.
* @example
* const geeMetadata = await GoogleEarthEnterpriseMetadata.fromUrl("http://www.example.com");
* const gee = Cesium.GoogleEarthEnterpriseTerrainProvider.fromMetadata(geeMetadata);
* @param [options] - An object describing initialization options
*/
export class GoogleEarthEnterpriseTerrainProvider {
constructor(options?: GoogleEarthEnterpriseTerrainProvider.ConstructorOptions);
/**
* Gets the name of the Google Earth Enterprise server url hosting the imagery.
*/
readonly url: string;
/**
* Gets the proxy used by this provider.
*/
readonly proxy: Proxy;
/**
* Gets the tiling scheme used by this provider.
*/
readonly tilingScheme: TilingScheme;
/**
* Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
* are passed an instance of {@link TileProviderError}.
*/
readonly errorEvent: Event;
/**
* Gets the credit to display when this terrain provider is active. Typically this is used to credit
* the source of the terrain.
*/
readonly credit: Credit;
/**
* Gets a value indicating whether or not the provider includes a water mask. The water mask
* indicates which areas of the globe are water rather than land, so they can be rendered
* as a reflective surface with animated waves.
*/
readonly hasWaterMask: boolean;
/**
* Gets a value indicating whether or not the requested tiles include vertex normals.
*/
readonly hasVertexNormals: boolean;
/**
* Gets an object that can be used to determine availability of terrain from this provider, such as
* at points and in rectangles. This property may be undefined if availability
* information is not available.
*/
readonly availability: TileAvailability | undefined;
/**
* Creates a GoogleEarthTerrainProvider from GoogleEarthEnterpriseMetadata
* @example
* const geeMetadata = await GoogleEarthEnterpriseMetadata.fromUrl("http://www.example.com");
* const gee = Cesium.GoogleEarthEnterpriseTerrainProvider.fromMetadata(geeMetadata);
* @param metadata - A metadata object that can be used to share metadata requests with a GoogleEarthEnterpriseImageryProvider.
* @param options - An object describing initialization options
*/
static fromMetadata(metadata: GoogleEarthEnterpriseMetadata, options: GoogleEarthEnterpriseTerrainProvider.ConstructorOptions): GoogleEarthEnterpriseTerrainProvider;
/**
* Requests the geometry for a given tile. The result must include terrain data and
* may optionally include a water mask and an indication of which child tiles are available.
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @param [request] - The request object. Intended for internal use only.
* @returns A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
*/
requestTileGeometry(x: number, y: number, level: number, request?: Request): Promise | undefined;
/**
* Gets the maximum geometric error allowed in a tile at a given level.
* @param level - The tile level for which to get the maximum geometric error.
* @returns The maximum geometric error.
*/
getLevelMaximumGeometricError(level: number): number;
/**
* Determines whether data for a tile is available to be loaded.
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
* @returns Undefined if not supported, otherwise true or false.
*/
getTileDataAvailable(x: number, y: number, level: number): boolean | undefined;
/**
* Makes sure we load availability data for a tile
* @param x - The X coordinate of the tile for which to request geometry.
* @param y - The Y coordinate of the tile for which to request geometry.
* @param level - The level of the tile for which to request geometry.
*/
loadTileDataAvailability(x: number, y: number, level: number): undefined;
}
/**
* Provides geocoding through Google.
* @param options - Object with the following properties:
* @param options.key - An API key to use with the Google geocoding service
*/
export class GoogleGeocoderService {
constructor(options: {
key: string;
});
/**
* Gets the credit to display after a geocode is performed. Typically this is used to credit
* the geocoder service.
*/
readonly credit: Credit | undefined;
/**
* Get a list of possible locations that match a search string.
* @param query - The query to be sent to the geocoder service
*/
geocode(query: string): Promise;
}
/**
* Default settings for accessing the Google Maps API.
*
* An API key is only required if you are directly using any Google Maps APIs, such as through {@link createGooglePhotorealistic3DTileset}.
* Follow instructions for managing API keys for the Google Maps Platform at {@link https://developers.google.com/maps/documentation/embed/get-api-key}.
*
* You can enable multiple Google Maps Platform APIs on a single API key.
* However, a separate {@link GoogleMaps.defaultStreetViewStaticApiKey}
* is available if you prefer to use a dedicated key for the Street View Static API.
*/
export namespace GoogleMaps {
/**
* Gets or sets the default Google Maps API key.
*/
var defaultApiKey: undefined | string;
/**
* Gets or sets the default Google Map Tiles API endpoint.
*/
var mapTilesApiEndpoint: string | Resource;
/**
* Gets or sets the default Google Maps Street View Static API key.
*/
var defaultStreetViewStaticApiKey: undefined | string;
/**
* Gets or sets the default Google Street View Static API endpoint.
*/
var streetViewStaticApiEndpoint: string | Resource;
}
/**
* A description of a polyline on terrain or 3D Tiles. Only to be used with {@link GroundPolylinePrimitive}.
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -112.1340164450331, 36.05494287836128,
* -112.08821010582645, 36.097804071380715,
* -112.13296079730024, 36.168769146801104
* ]);
*
* const geometry = new Cesium.GroundPolylineGeometry({
* positions : positions
* });
* @param options - Options with the following properties:
* @param options.positions - An array of {@link Cartesian3} defining the polyline's points. Heights above the ellipsoid will be ignored.
* @param [options.width = 1.0] - The screen space width in pixels.
* @param [options.granularity = 9999.0] - The distance interval in meters used for interpolating options.points. Defaults to 9999.0 meters. Zero indicates no interpolation.
* @param [options.loop = false] - Whether during geometry creation a line segment will be added between the last and first line positions to make this Polyline a loop.
* @param [options.arcType = ArcType.GEODESIC] - The type of line the polyline segments must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
*/
export class GroundPolylineGeometry {
constructor(options: {
positions: Cartesian3[];
width?: number;
granularity?: number;
loop?: boolean;
arcType?: ArcType;
});
/**
* The screen space width in pixels.
*/
width: number;
/**
* The distance interval used for interpolating options.points. Zero indicates no interpolation.
* Default of 9999.0 allows centimeter accuracy with 32 bit floating point.
*/
granularity: boolean;
/**
* Whether during geometry creation a line segment will be added between the last and first line positions to make this Polyline a loop.
* If the geometry has two positions this parameter will be ignored.
*/
loop: boolean;
/**
* The type of path the polyline must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
*/
arcType: ArcType;
/**
* Stores the provided instance into the provided array.
* @param value - The value to pack.
* @param array - The array to pack into.
* @param [startingIndex = 0] - The index into the array at which to start packing the elements.
* @returns The array that was packed into
*/
static pack(value: PolygonGeometry, array: number[], startingIndex?: number): number[];
/**
* Retrieves an instance from a packed array.
* @param array - The packed array.
* @param [startingIndex = 0] - The starting index of the element to be unpacked.
* @param [result] - The object into which to store the result.
*/
static unpack(array: number[], startingIndex?: number, result?: PolygonGeometry): void;
}
/**
* The encoding that is used for a heightmap
*/
export enum HeightmapEncoding {
/**
* No encoding
*/
NONE = 0,
/**
* LERC encoding
*/
LERC = 1
}
/**
* Terrain data for a single tile where the terrain data is represented as a heightmap. A heightmap
* is a rectangular array of heights in row-major order from north to south and west to east.
* @example
* const buffer = ...
* const heightBuffer = new Uint16Array(buffer, 0, that._heightmapWidth * that._heightmapWidth);
* const childTileMask = new Uint8Array(buffer, heightBuffer.byteLength, 1)[0];
* const waterMask = new Uint8Array(buffer, heightBuffer.byteLength + 1, buffer.byteLength - heightBuffer.byteLength - 1);
* const terrainData = new Cesium.HeightmapTerrainData({
* buffer : heightBuffer,
* width : 65,
* height : 65,
* childTileMask : childTileMask,
* waterMask : waterMask
* });
* @param options - Object with the following properties:
* @param options.buffer - The buffer containing height data.
* @param options.width - The width (longitude direction) of the heightmap, in samples.
* @param options.height - The height (latitude direction) of the heightmap, in samples.
* @param [options.childTileMask = 15] - A bit mask indicating which of this tile's four children exist.
* If a child's bit is set, geometry will be requested for that tile as well when it
* is needed. If the bit is cleared, the child tile is not requested and geometry is
* instead upsampled from the parent. The bit values are as follows:
*
*
Bit Position
Bit Value
Child Tile
*
0
1
Southwest
*
1
2
Southeast
*
2
4
Northwest
*
3
8
Northeast
*
* @param [options.waterMask] - The water mask included in this terrain data, if any. A water mask is a square
* Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
* Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
* @param [options.structure] - An object describing the structure of the height data.
* @param [options.structure.heightScale = 1.0] - The factor by which to multiply height samples in order to obtain
* the height above the heightOffset, in meters. The heightOffset is added to the resulting
* height after multiplying by the scale.
* @param [options.structure.heightOffset = 0.0] - The offset to add to the scaled height to obtain the final
* height in meters. The offset is added after the height sample is multiplied by the
* heightScale.
* @param [options.structure.elementsPerHeight = 1] - The number of elements in the buffer that make up a single height
* sample. This is usually 1, indicating that each element is a separate height sample. If
* it is greater than 1, that number of elements together form the height sample, which is
* computed according to the structure.elementMultiplier and structure.isBigEndian properties.
* @param [options.structure.stride = 1] - The number of elements to skip to get from the first element of
* one height to the first element of the next height.
* @param [options.structure.elementMultiplier = 256.0] - The multiplier used to compute the height value when the
* stride property is greater than 1. For example, if the stride is 4 and the strideMultiplier
* is 256, the height is computed as follows:
* `height = buffer[index] + buffer[index + 1] * 256 + buffer[index + 2] * 256 * 256 + buffer[index + 3] * 256 * 256 * 256`
* This is assuming that the isBigEndian property is false. If it is true, the order of the
* elements is reversed.
* @param [options.structure.isBigEndian = false] - Indicates endianness of the elements in the buffer when the
* stride property is greater than 1. If this property is false, the first element is the
* low-order element. If it is true, the first element is the high-order element.
* @param [options.structure.lowestEncodedHeight] - The lowest value that can be stored in the height buffer. Any heights that are lower
* than this value after encoding with the `heightScale` and `heightOffset` are clamped to this value. For example, if the height
* buffer is a `Uint16Array`, this value should be 0 because a `Uint16Array` cannot store negative numbers. If this parameter is
* not specified, no minimum value is enforced.
* @param [options.structure.highestEncodedHeight] - The highest value that can be stored in the height buffer. Any heights that are higher
* than this value after encoding with the `heightScale` and `heightOffset` are clamped to this value. For example, if the height
* buffer is a `Uint16Array`, this value should be `256 * 256 - 1` or 65535 because a `Uint16Array` cannot store numbers larger
* than 65535. If this parameter is not specified, no maximum value is enforced.
* @param [options.encoding = HeightmapEncoding.NONE] - The encoding that is used on the buffer.
* @param [options.createdByUpsampling = false] - True if this instance was created by upsampling another instance;
* otherwise, false.
*/
export class HeightmapTerrainData {
constructor(options: {
buffer: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
width: number;
height: number;
childTileMask?: number;
waterMask?: Uint8Array;
structure?: {
heightScale?: number;
heightOffset?: number;
elementsPerHeight?: number;
stride?: number;
elementMultiplier?: number;
isBigEndian?: boolean;
lowestEncodedHeight?: number;
highestEncodedHeight?: number;
};
encoding?: HeightmapEncoding;
createdByUpsampling?: boolean;
});
/**
* An array of credits for this tile.
*/
credits: Credit[];
/**
* The water mask included in this terrain data, if any. A water mask is a square
* Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
* Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
*/
waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement | ImageBitmap | undefined;
/**
* Computes the terrain height at a specified longitude and latitude.
* @param rectangle - The rectangle covered by this terrain data.
* @param longitude - The longitude in radians.
* @param latitude - The latitude in radians.
* @returns The terrain height at the specified position. If the position
* is outside the rectangle, this method will extrapolate the height, which is likely to be wildly
* incorrect for positions far outside the rectangle.
*/
interpolateHeight(rectangle: Rectangle, longitude: number, latitude: number): number;
/**
* Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the
* height samples in this instance, interpolated if necessary.
* @param tilingScheme - The tiling scheme of this terrain data.
* @param thisX - The X coordinate of this tile in the tiling scheme.
* @param thisY - The Y coordinate of this tile in the tiling scheme.
* @param thisLevel - The level of this tile in the tiling scheme.
* @param descendantX - The X coordinate within the tiling scheme of the descendant tile for which we are upsampling.
* @param descendantY - The Y coordinate within the tiling scheme of the descendant tile for which we are upsampling.
* @param descendantLevel - The level within the tiling scheme of the descendant tile for which we are upsampling.
* @returns A promise for upsampled heightmap terrain data for the descendant tile,
* or undefined if the mesh is unavailable.
*/
upsample(tilingScheme: TilingScheme, thisX: number, thisY: number, thisLevel: number, descendantX: number, descendantY: number, descendantLevel: number): Promise | undefined;
/**
* Determines if a given child tile is available, based on the
* {@link HeightmapTerrainData.childTileMask}. The given child tile coordinates are assumed
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
* @param thisX - The tile X coordinate of this (the parent) tile.
* @param thisY - The tile Y coordinate of this (the parent) tile.
* @param childX - The tile X coordinate of the child tile to check for availability.
* @param childY - The tile Y coordinate of the child tile to check for availability.
* @returns True if the child tile is available; otherwise, false.
*/
isChildAvailable(thisX: number, thisY: number, childX: number, childY: number): boolean;
/**
* Gets a value indicating whether or not this terrain data was created by upsampling lower resolution
* terrain data. If this value is false, the data was obtained from some other source, such
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link HeightmapTerrainData#upsample}.
* @returns True if this instance was created by upsampling; otherwise, false.
*/
wasCreatedByUpsampling(): boolean;
}
/**
* Default settings for accessing the iTwin platform.
*/
export namespace ITwinPlatform {
/**
* Status states for a mesh-export export.
* Valid values are: NotStarted, InProgress, Complete, Invalid
*/
enum ExportStatus {
NotStarted = "NotStarted",
InProgress = "InProgress",
Complete = "Complete",
Invalid = "Invalid"
}
/**
* Types of mesh-export exports. CesiumJS only supports loading 3DTILES type exports.
* Valid values are: IMODEL, CESIUM, 3DTILES
*/
enum ExportType {
IMODEL = "IMODEL",
CESIUM = "CESIUM",
"3DTILES" = "3DTILES"
}
/**
* Types of Reality data. This is a partial list of types we know we can support
*/
enum RealityDataType {
Cesium3DTiles = "Cesium3DTiles",
PNTS = "PNTS",
RealityMesh3DTiles = "RealityMesh3DTiles",
Terrain3DTiles = "Terrain3DTiles",
GaussianSplat3DTiles = "GS_3DT",
KML = "KML",
GeoJSON = "GeoJSON",
Unstructured = "Unstructured"
}
/**
* Gets or sets the default iTwin access token. This token should have the itwin-platform scope.
*
* This value will be ignored if {@link ITwinPlatform.defaultShareKey} is defined.
*/
var defaultAccessToken: string | undefined;
/**
* Gets or sets the default iTwin share key. If this value is provided it will override {@link ITwinPlatform.defaultAccessToken} in all requests.
*
* Share keys can be generated using the iTwin Shares api
* https://developer.bentley.com/apis/access-control-v2/operations/create-itwin-share/
*/
var defaultShareKey: string | undefined;
/**
* Gets or sets the default iTwin API endpoint.
*/
var apiEndpoint: string | Resource;
}
/**
* The interface for interpolation algorithms.
*/
export interface InterpolationAlgorithm {
/**
* Gets the name of this interpolation algorithm.
*/
type: string;
/**
* Given the desired degree, returns the number of data points required for interpolation.
* @param degree - The desired degree of interpolation.
* @returns The number of required data points needed for the desired degree of interpolation.
*/
getRequiredDataPoints(degree: number): number;
/**
* Performs zero order interpolation.
* @param x - The independent variable for which the dependent variables will be interpolated.
* @param xTable - The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
* @param yTable - The array of dependent variables to use to interpolate. For a set of three
* dependent values (p,q,w) at time 1 and time 2 this should be as follows: {p1, q1, w1, p2, q2, w2}.
* @param yStride - The number of dependent variable values in yTable corresponding to
* each independent variable value in xTable.
* @param [result] - An existing array into which to store the result.
* @returns The array of interpolated values, or the result parameter if one was provided.
*/
interpolateOrderZero(x: number, xTable: number[], yTable: number[], yStride: number, result?: number[]): number[];
/**
* Performs higher order interpolation. Not all interpolators need to support high-order interpolation,
* if this function remains undefined on implementing objects, interpolateOrderZero will be used instead.
* @param x - The independent variable for which the dependent variables will be interpolated.
* @param xTable - The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
* @param yTable - The array of dependent variables to use to interpolate. For a set of three
* dependent values (p,q,w) at time 1 and time 2 this should be as follows: {p1, q1, w1, p2, q2, w2}.
* @param yStride - The number of dependent variable values in yTable corresponding to
* each independent variable value in xTable.
* @param inputOrder - The number of derivatives supplied for input.
* @param outputOrder - The number of derivatives desired for output.
* @param [result] - An existing array into which to store the result.
* @returns The array of interpolated values, or the result parameter if one was provided.
*/
interpolate?(x: number, xTable: number[], yTable: number[], yStride: number, inputOrder: number, outputOrder: number, result?: number[]): number[];
}
/**
* Default settings for accessing the Cesium ion API.
*
* An ion access token is only required if you are using any ion related APIs.
* A default access token is provided for evaluation purposes only.
* Sign up for a free ion account and get your own access token at {@link https://cesium.com}
*/
export namespace Ion {
/**
* Gets or sets the default Cesium ion access token.
*/
var defaultAccessToken: string;
/**
* Gets or sets the default Cesium ion server.
*/
var defaultServer: string | Resource;
}
/**
* Underlying geocoding services that can be used via Cesium ion.
*/
export enum IonGeocodeProviderType {
/**
* Google geocoder, for use with Google data.
*/
GOOGLE = "GOOGLE",
/**
* Bing geocoder, for use with Bing data.
*/
BING = "BING",
/**
* Use the default geocoder as set on the server. Used when neither Bing or
* Google data is used.
*/
DEFAULT = "DEFAULT"
}
/**
* Provides geocoding through Cesium ion.
* @param options - Object with the following properties:
* @param options.scene - The scene
* @param [options.accessToken = Ion.defaultAccessToken] - The access token to use.
* @param [options.server = Ion.defaultServer] - The resource to the Cesium ion API server.
* @param [options.geocodeProviderType = IonGeocodeProviderType.DEFAULT] - The geocoder the Cesium ion API server should use to fulfill this request.
*/
export class IonGeocoderService {
constructor(options: {
scene: Scene;
accessToken?: string;
server?: string | Resource;
geocodeProviderType?: IonGeocodeProviderType;
});
/**
* Gets the credit to display after a geocode is performed. Typically this is used to credit
* the geocoder service.
*/
readonly credit: Credit | undefined;
/**
* The geocoding service that Cesium ion API server should use to fulfill geocding requests.
*/
geocodeProviderType: IonGeocodeProviderType;
/**
* @param query - The query to be sent to the geocoder service
* @param [type = GeocodeType.SEARCH] - The type of geocode to perform.
*/
geocode(query: string, type?: GeocodeType): Promise;
}
/**
* A {@link Resource} instance that encapsulates Cesium ion asset access.
* This object is normally not instantiated directly, use {@link IonResource.fromAssetId}.
* @param endpoint - The result of the Cesium ion asset endpoint service.
* @param endpointResource - The original resource used to retrieve the endpoint.
*/
export class IonResource extends Resource {
constructor(endpoint: any, endpointResource: Resource);
/**
* Asynchronously creates an instance.
* @example
* // Load a Cesium3DTileset with asset ID of 124624234
* try {
* const resource = await Cesium.IonResource.fromAssetId(124624234);
* const tileset = await Cesium.Cesium3DTileset.fromUrl(resource);
* scene.primitives.add(tileset);
* } catch (error) {
* console.error(`Error creating tileset: ${error}`);
* }
* @example
* //Load a CZML file with asset ID of 10890
* Cesium.IonResource.fromAssetId(10890)
* .then(function (resource) {
* viewer.dataSources.add(Cesium.CzmlDataSource.load(resource));
* });
* @param assetId - The Cesium ion asset id.
* @param [options] - An object with the following properties:
* @param [options.accessToken = Ion.defaultAccessToken] - The access token to use.
* @param [options.server = Ion.defaultServer] - The resource to the Cesium ion API server.
* @returns A Promise to an instance representing the Cesium ion Asset.
*/
static fromAssetId(assetId: number, options?: {
accessToken?: string;
server?: string | Resource;
}): Promise;
/**
* Gets the credits required for attribution of the asset.
*/
readonly credits: Credit[];
/**
* Duplicates a Resource instance.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new Resource instance if one was not provided.
*/
clone(result?: Resource): Resource;
/**
* Asynchronously loads the given image resource. Returns a promise that will resolve to
* an {@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap|ImageBitmap} if preferImageBitmap is true and the browser supports createImageBitmap or otherwise an
* {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement|Image} once loaded, or reject if the image failed to load.
* @example
* // load a single image asynchronously
* resource.fetchImage().then(function(image) {
* // use the loaded image
* }).catch(function(error) {
* // an error occurred
* });
*
* // load several images in parallel
* Promise.all([resource1.fetchImage(), resource2.fetchImage()]).then(function(images) {
* // images is an array containing all the loaded images
* });
* @param [options] - An object with the following properties.
* @param [options.preferBlob = false] - If true, we will load the image via a blob.
* @param [options.preferImageBitmap = false] - If true, image will be decoded during fetch and an ImageBitmap is returned.
* @param [options.flipY = false] - If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap.
* @param [options.skipColorSpaceConversion = false] - If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
fetchImage(options?: {
preferBlob?: boolean;
preferImageBitmap?: boolean;
flipY?: boolean;
skipColorSpaceConversion?: boolean;
}): Promise | undefined;
}
/**
* The type of geometry a snap resolved to, reported by {@link IonSnapService#snap}
* as {@link IonSnapService.Result} geometryType. Values match the iTwin.js
* {@link https://www.itwinjs.org/reference/core-frontend/locatingelements/hitgeomtype/|HitGeomType} enum.
*/
export enum IonSnapGeometryType {
/**
* No geometry type.
*/
NONE = 0,
/**
* A point.
*/
POINT = 1,
/**
* A line segment.
*/
SEGMENT = 2,
/**
* A curve.
*/
CURVE = 3,
/**
* An arc.
*/
ARC = 4,
/**
* A surface.
*
* With {@link IonSnapMode} NEAREST, this value indicates
* the snap tracked the surface under the cursor because no edge was within
* the snap aperture. This means the snap point was not pulled to an edge.
* Edge snaps report one of the other types along with the edge geometry in
* {@link IonSnapService.Result} curve, which is absent when
* tracking a surface.
*
*/
SURFACE = 5
}
/**
* How close a snap result is to the cursor, reported by {@link IonSnapService#snap}
* as {@link IonSnapService.Result} heat. Values match the iTwin.js
* {@link https://www.itwinjs.org/reference/core-frontend/locatingelements/snapheat/|SnapHeat} enum.
*/
export enum IonSnapHeat {
/**
* The snap is not close to the cursor.
*/
NONE = 0,
/**
* The snap is of interest, but outside the snap aperture.
*/
NOT_IN_RANGE = 1,
/**
* The snap point is within the snap aperture of the close point in view space.
*/
IN_RANGE = 2
}
/**
* The snap modes supported by {@link IonSnapService#snap}. These follow the
* MicroStation snap mode semantics; see the
* {@link https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v27/en/GUID-77D54C0B-D6FF-13DA-5EC8-3196330F5244.html|MicroStation documentation}
* for reference.
*/
export enum IonSnapMode {
/**
* Snaps to the point on the element nearest to the cursor. When the cursor
* is farther than the snap aperture from an edge, tracks the surface under
* the cursor instead.
*/
NEAREST = 1,
/**
* Snaps to the nearest of the element's keypoints. Keypoints are defined by
* the element's geometry type and the snap divisor.
*
* On linear elements, keypoints are regularly spaced along each segment:
* the number of keypoints on a segment is one greater than the snap
* divisor, and a segment's midpoint is a keypoint only when the divisor is
* even. The ion API does not currently accept a snap divisor, so the
* server's default divisor applies.
*
*/
NEAREST_KEYPOINT = 2,
/**
* Snaps to the center of elements that have centers (such as circles and
* arcs). For other elements, may snap to the centroid.
*/
CENTER = 8
}
/**
* The type of the parent geometry a snap resolved to, reported by
* {@link IonSnapService#snap} as {@link IonSnapService.Result} parentGeometryType.
* Values match the iTwin.js
* {@link https://www.itwinjs.org/reference/core-frontend/locatingelements/hitparentgeomtype/|HitParentGeomType} enum.
*/
export enum IonSnapParentGeometryType {
/**
* No parent geometry type.
*/
NONE = 0,
/**
* A wire body.
*/
WIRE = 1,
/**
* A sheet body.
*/
SHEET = 2,
/**
* A solid body.
*/
SOLID = 3,
/**
* A mesh.
*/
MESH = 4,
/**
* Text.
*/
TEXT = 5
}
export namespace IonSnapService {
/**
* The result of a successful {@link IonSnapService#snap}. Extends
* {@link SnapService.Result} with ion-specific fields.
* @property [snapPoint] - The snapped point. This is the point to consume.
* @property [hitPoint] - The point where the cursor hit the geometry: the nearest edge point when within the snap aperture, otherwise the surface point under the cursor.
* @property [heat] - How close the snap point is to the close point in view space.
* @property [geometryType] - The type of geometry snapped to.
* @property [parentGeometryType] - The type of the parent geometry snapped to.
* @property [normal] - The surface normal at the snap point, in the model's local cartesian frame.
* @property [curve] - The curve geometry near the snap point, with points as WGS84 degrees objects.
*/
type Result = {
snapPoint?: Cartesian3;
hitPoint?: Cartesian3;
heat?: IonSnapHeat;
geometryType?: IonSnapGeometryType;
parentGeometryType?: IonSnapParentGeometryType;
normal?: any;
curve?: any;
};
}
/**
* Provides interactive snap-to-geometry against a Cesium ion 3D Tiles asset
* backed by a BIM/CAD Database model, using the ion REST API's element snap
* endpoint.
*
* This class handles conversions between the reference frame of a
* source BIM/CAD Database and the view-dependent screen space pixel
* coordinates. Each snap, it transforms using the ion asset's source
* reference frame, the camera's transform, and the canvas
* dimensions so that view-dependent features— such as the pixel aperture,
* nearest position, or surface tracking— behave correctly.
*
* This object is normally not instantiated directly, use {@link IonSnapService.fromAssetId}.
* @example
* const snapper = await Cesium.IonSnapService.fromAssetId(123456);
* const canvas = viewer.scene.canvas;
* const result = await snapper.snap({
* elementId: "0x30000000df2",
* testPoint: pickedPosition,
* camera: viewer.camera,
* canvasWidth: canvas.clientWidth,
* canvasHeight: canvas.clientHeight,
* });
* if (Cesium.defined(result)) {
* console.log("snapped to", result.snapPoint);
* }
* @param options - Object with the following properties:
* @param options.assetId - The ion asset id.
* @param options.resource - The asset's ion API resource.
* @param options.ecefTransform - A 4x4 transformation matrix from the source BIM/CAD Database reference frame local to the world's fixed reference frame.
*/
export class IonSnapService {
constructor(options: {
assetId: number;
resource: Resource;
ecefTransform: Matrix4;
});
/**
* A 4x4 transformation matrix from the source BIM/CAD Database reference frame local to the world's fixed reference frame.
*/
readonly ecefTransform: Matrix4;
/**
* The ion asset id this snapper operates on.
*/
readonly assetId: number;
/**
* Creates an {@link IonSnapService} for the given ion asset, fetching
* the asset's ECEF transform from the ion REST API.
* @param assetId - The ion ID of a 3D Tiles asset backed by a BIM/CAD Database model.
* @param [options] - Object with the following properties:
* @param [options.accessToken = Ion.defaultAccessToken] - The ion access token to use.
* @param [options.server = Ion.defaultServer] - The ion API server to use.
* @returns A snapper bound to the asset.
*/
static fromAssetId(assetId: number, options?: {
accessToken?: string;
server?: string | Resource;
}): Promise;
/**
* Requests a snap against an element of this asset.
*
* A view-correct world-to-view matrix is composed from
* options.camera, options.canvasWidth, and
* options.canvasHeight so view-dependent snapping (nearest
* ordering, pixel apertures, surface tracking) matches the current view.
*
* Only 3D views are supported: the camera must be viewing in
* {@link SceneMode.SCENE3D}.
* @param options - Object with the following properties:
* @param options.elementId - The element id to snap to, as a hex string, e.g. "0x30000000df2".
* @param options.testPoint - The point to snap from, typically the picked cursor position.
* @param options.camera - The camera defining the current view. Must be viewing in {@link SceneMode.SCENE3D}.
* @param options.canvasWidth - The canvas width in CSS pixels.
* @param options.canvasHeight - The canvas height in CSS pixels.
* @param [options.closePoint = options.testPoint] - A reference point near the target geometry that seeds the snap search.
* @param [options.snapAperture = IonSnapService.DEFAULT_SNAP_APERTURE] - The snap tolerance in CSS pixels of the world-to-view output space.
* @param [options.snapMode = IonSnapMode.NEAREST] - The type of snap to perform.
* @returns The snap result, or undefined if the element was not found or no snap was possible for it.
*/
snap(options: {
elementId: string;
testPoint: Cartesian3;
camera: Camera;
canvasWidth: number;
canvasHeight: number;
closePoint?: Cartesian3;
snapAperture?: number;
snapMode?: IonSnapMode;
}): Promise;
/**
* The default snap tolerance used by {@link IonSnapService#snap} when
* options.snapAperture is not provided, in CSS pixels of the
* world-to-view output space. This is {@link SnapService}'s
* DEFAULT_SNAP_APERTURE for this implementation.
*/
static readonly DEFAULT_SNAP_APERTURE: number;
}
/**
* This enumerated type is for representing keyboard modifiers. These are keys
* that are held down in addition to other event types.
*/
export enum KeyboardEventModifier {
/**
* Represents the shift key being held down.
*/
SHIFT = 0,
/**
* Represents the control key being held down.
*/
CTRL = 1,
/**
* Represents the alt key being held down.
*/
ALT = 2
}
/**
* Provides geocoding via a {@link https://opencagedata.com/|OpenCage} server.
* @example
* // Configure a Viewer to use the OpenCage Geocoder
* const viewer = new Cesium.Viewer('cesiumContainer', {
* geocoder: new Cesium.OpenCageGeocoderService('https://api.opencagedata.com/geocode/v1/', '')
* });
* @param url - The endpoint to the OpenCage server.
* @param apiKey - The OpenCage API Key.
* @param [params] - An object with the following properties (See https://opencagedata.com/api#forward-opt):
* @param [params.abbrv] - When set to 1 we attempt to abbreviate and shorten the formatted string we return.
* @param [options.add_request] - When set to 1 the various request parameters are added to the response for ease of debugging.
* @param [options.bounds] - Provides the geocoder with a hint to the region that the query resides in.
* @param [options.countrycode] - Restricts the results to the specified country or countries (as defined by the ISO 3166-1 Alpha 2 standard).
* @param [options.jsonp] - Wraps the returned JSON with a function name.
* @param [options.language] - An IETF format language code.
* @param [options.limit] - The maximum number of results we should return.
* @param [options.min_confidence] - An integer from 1-10. Only results with at least this confidence will be returned.
* @param [options.no_annotations] - When set to 1 results will not contain annotations.
* @param [options.no_dedupe] - When set to 1 results will not be deduplicated.
* @param [options.no_record] - When set to 1 the query contents are not logged.
* @param [options.pretty] - When set to 1 results are 'pretty' printed for easier reading. Useful for debugging.
* @param [options.proximity] - Provides the geocoder with a hint to bias results in favour of those closer to the specified location (For example: 41.40139,2.12870).
*/
export class OpenCageGeocoderService {
constructor(url: Resource | string, apiKey: string, params?: {
abbrv?: number;
});
/**
* The Resource used to access the OpenCage endpoint.
*/
readonly url: Resource;
/**
* Optional params passed to OpenCage in order to customize geocoding
*/
readonly params: any;
/**
* Gets the credit to display after a geocode is performed. Typically this is used to credit
* the geocoder service.
*/
readonly credit: Credit | undefined;
/**
* @param query - The query to be sent to the geocoder service
*/
geocode(query: string): Promise;
}
/**
* Provides geocoding via a {@link https://pelias.io/|Pelias} server.
* @example
* // Configure a Viewer to use the Pelias server hosted by https://geocode.earth/
* const viewer = new Cesium.Viewer('cesiumContainer', {
* geocoder: new Cesium.PeliasGeocoderService(new Cesium.Resource({
* url: 'https://api.geocode.earth/v1/',
* queryParameters: {
* api_key: ''
* }
* }))
* });
* @param url - The endpoint to the Pelias server.
*/
export class PeliasGeocoderService {
constructor(url: Resource | string);
/**
* The Resource used to access the Pelias endpoint.
*/
readonly url: Resource;
/**
* Gets the credit to display after a geocode is performed. Typically this is used to credit
* the geocoder service.
*/
readonly credit: Credit | undefined;
/**
* @param query - The query to be sent to the geocoder service
* @param [type = GeocodeType.SEARCH] - The type of geocode to perform.
*/
geocode(query: string, type?: GeocodeType): Promise;
}
/**
* A utility class for generating custom map pins as canvas elements.
*
*
*
* Example pins generated using both the maki icon set, which ships with Cesium, and single character text.
*
*/
export class PinBuilder {
constructor();
/**
* Creates an empty pin of the specified color and size.
* @param color - The color of the pin.
* @param size - The size of the pin, in pixels.
* @returns The canvas element that represents the generated pin.
*/
fromColor(color: Color, size: number): HTMLCanvasElement;
/**
* Creates a pin with the specified icon, color, and size.
* @param url - The url of the image to be stamped onto the pin.
* @param color - The color of the pin.
* @param size - The size of the pin, in pixels.
* @returns The canvas element or a Promise to the canvas element that represents the generated pin.
*/
fromUrl(url: Resource | string, color: Color, size: number): HTMLCanvasElement | Promise;
/**
* Creates a pin with the specified {@link https://www.mapbox.com/maki/|maki} icon identifier, color, and size.
* @param id - The id of the maki icon to be stamped onto the pin.
* @param color - The color of the pin.
* @param size - The size of the pin, in pixels.
* @returns The canvas element or a Promise to the canvas element that represents the generated pin.
*/
fromMakiIconId(id: string, color: Color, size: number): HTMLCanvasElement | Promise;
/**
* Creates a pin with the specified text, color, and size. The text will be sized to be as large as possible
* while still being contained completely within the pin.
* @param text - The text to be stamped onto the pin.
* @param color - The color of the pin.
* @param size - The size of the pin, in pixels.
* @returns The canvas element that represents the generated pin.
*/
fromText(text: string, color: Color, size: number): HTMLCanvasElement;
}
/**
* Base class for proxying requested made by {@link Resource}.
*/
export class Proxy {
constructor();
/**
* Get the final URL to use to request a given resource.
* @param resource - The resource to request.
* @returns proxied resource
*/
getURL(resource: string): string;
}
/**
* Terrain data for a single tile where the terrain data is represented as a quantized mesh. A quantized
* mesh consists of three vertex attributes, longitude, latitude, and height. All attributes are expressed
* as 16-bit values in the range 0 to 32767. Longitude and latitude are zero at the southwest corner
* of the tile and 32767 at the northeast corner. Height is zero at the minimum height in the tile
* and 32767 at the maximum height in the tile.
* @example
* const data = new Cesium.QuantizedMeshTerrainData({
* minimumHeight : -100,
* maximumHeight : 2101,
* quantizedVertices : new Uint16Array([// order is SW NW SE NE
* // longitude
* 0, 0, 32767, 32767,
* // latitude
* 0, 32767, 0, 32767,
* // heights
* 16384, 0, 32767, 16384]),
* indices : new Uint16Array([0, 3, 1,
* 0, 2, 3]),
* boundingSphere : new Cesium.BoundingSphere(new Cesium.Cartesian3(1.0, 2.0, 3.0), 10000),
* orientedBoundingBox : new Cesium.OrientedBoundingBox(new Cesium.Cartesian3(1.0, 2.0, 3.0), Cesium.Matrix3.fromRotationX(Cesium.Math.PI, new Cesium.Matrix3())),
* horizonOcclusionPoint : new Cesium.Cartesian3(3.0, 2.0, 1.0),
* westIndices : [0, 1],
* southIndices : [0, 1],
* eastIndices : [2, 3],
* northIndices : [1, 3],
* westSkirtHeight : 1.0,
* southSkirtHeight : 1.0,
* eastSkirtHeight : 1.0,
* northSkirtHeight : 1.0
* });
* @param options - Object with the following properties:
* @param options.quantizedVertices - The buffer containing the quantized mesh.
* @param options.indices - The indices specifying how the quantized vertices are linked
* together into triangles. Each three indices specifies one triangle.
* @param options.minimumHeight - The minimum terrain height within the tile, in meters above the ellipsoid.
* @param options.maximumHeight - The maximum terrain height within the tile, in meters above the ellipsoid.
* @param options.boundingSphere - A sphere bounding all of the vertices in the mesh.
* @param [options.orientedBoundingBox] - An OrientedBoundingBox bounding all of the vertices in the mesh.
* @param options.horizonOcclusionPoint - The horizon occlusion point of the mesh. If this point
* is below the horizon, the entire tile is assumed to be below the horizon as well.
* The point is expressed in ellipsoid-scaled coordinates.
* @param options.westIndices - The indices of the vertices on the western edge of the tile.
* @param options.southIndices - The indices of the vertices on the southern edge of the tile.
* @param options.eastIndices - The indices of the vertices on the eastern edge of the tile.
* @param options.northIndices - The indices of the vertices on the northern edge of the tile.
* @param options.westSkirtHeight - The height of the skirt to add on the western edge of the tile.
* @param options.southSkirtHeight - The height of the skirt to add on the southern edge of the tile.
* @param options.eastSkirtHeight - The height of the skirt to add on the eastern edge of the tile.
* @param options.northSkirtHeight - The height of the skirt to add on the northern edge of the tile.
* @param [options.childTileMask = 15] - A bit mask indicating which of this tile's four children exist.
* If a child's bit is set, geometry will be requested for that tile as well when it
* is needed. If the bit is cleared, the child tile is not requested and geometry is
* instead upsampled from the parent. The bit values are as follows:
*
*
Bit Position
Bit Value
Child Tile
*
0
1
Southwest
*
1
2
Southeast
*
2
4
Northwest
*
3
8
Northeast
*
* @param [options.createdByUpsampling = false] - True if this instance was created by upsampling another instance;
* otherwise, false.
* @param [options.encodedNormals] - The buffer containing per vertex normals, encoded using 'oct' encoding
* @param [options.waterMask] - The buffer containing the watermask.
* @param [options.credits] - Array of credits for this tile.
*/
export class QuantizedMeshTerrainData {
constructor(options: {
quantizedVertices: Uint16Array;
indices: Uint16Array | Uint32Array;
minimumHeight: number;
maximumHeight: number;
boundingSphere: BoundingSphere;
orientedBoundingBox?: OrientedBoundingBox;
horizonOcclusionPoint: Cartesian3;
westIndices: number[];
southIndices: number[];
eastIndices: number[];
northIndices: number[];
westSkirtHeight: number;
southSkirtHeight: number;
eastSkirtHeight: number;
northSkirtHeight: number;
childTileMask?: number;
createdByUpsampling?: boolean;
encodedNormals?: Uint8Array;
waterMask?: Uint8Array;
credits?: Credit[];
});
/**
* An array of credits for this tile.
*/
credits: Credit[];
/**
* The water mask included in this terrain data, if any. A water mask is a rectangular
* Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
* Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
*/
waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement | undefined;
/**
* Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the
* vertices in this instance, interpolated if necessary.
* @param tilingScheme - The tiling scheme of this terrain data.
* @param thisX - The X coordinate of this tile in the tiling scheme.
* @param thisY - The Y coordinate of this tile in the tiling scheme.
* @param thisLevel - The level of this tile in the tiling scheme.
* @param descendantX - The X coordinate within the tiling scheme of the descendant tile for which we are upsampling.
* @param descendantY - The Y coordinate within the tiling scheme of the descendant tile for which we are upsampling.
* @param descendantLevel - The level within the tiling scheme of the descendant tile for which we are upsampling.
* @returns A promise for upsampled heightmap terrain data for the descendant tile,
* or undefined if too many asynchronous upsample operations are in progress and the request has been
* deferred.
*/
upsample(tilingScheme: TilingScheme, thisX: number, thisY: number, thisLevel: number, descendantX: number, descendantY: number, descendantLevel: number): Promise | undefined;
/**
* Computes the terrain height at a specified longitude and latitude.
* @param rectangle - The rectangle covered by this terrain data.
* @param longitude - The longitude in radians.
* @param latitude - The latitude in radians.
* @returns The terrain height at the specified position. The position is clamped to
* the rectangle, so expect incorrect results for positions far outside the rectangle.
*/
interpolateHeight(rectangle: Rectangle, longitude: number, latitude: number): number;
/**
* Determines if a given child tile is available, based on the
* {@link QuantizedMeshTerrainData.childTileMask}. The given child tile coordinates are assumed
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
* @param thisX - The tile X coordinate of this (the parent) tile.
* @param thisY - The tile Y coordinate of this (the parent) tile.
* @param childX - The tile X coordinate of the child tile to check for availability.
* @param childY - The tile Y coordinate of the child tile to check for availability.
* @returns True if the child tile is available; otherwise, false.
*/
isChildAvailable(thisX: number, thisY: number, childX: number, childY: number): boolean;
/**
* Gets a value indicating whether or not this terrain data was created by upsampling lower resolution
* terrain data. If this value is false, the data was obtained from some other source, such
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link HeightmapTerrainData#upsample}.
* @returns True if this instance was created by upsampling; otherwise, false.
*/
wasCreatedByUpsampling(): boolean;
}
/**
* Stores information for making a request. In general this does not need to be constructed directly.
* @param [options] - An object with the following properties:
* @param [options.url] - The url to request.
* @param [options.requestFunction] - The function that makes the actual data request.
* @param [options.cancelFunction] - The function that is called when the request is cancelled.
* @param [options.priorityFunction] - The function that is called to update the request's priority, which occurs once per frame.
* @param [options.priority = 0.0] - The initial priority of the request.
* @param [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.
* @param [options.throttleByServer = false] - Whether to throttle the request by server.
* @param [options.type = RequestType.OTHER] - The type of request.
* @param [options.serverKey] - A key used to identify the server that a request is going to.
*/
export class Request {
constructor(options?: {
url?: string;
requestFunction?: Request.RequestCallback;
cancelFunction?: Request.CancelCallback;
priorityFunction?: Request.PriorityCallback;
priority?: number;
throttle?: boolean;
throttleByServer?: boolean;
type?: RequestType;
serverKey?: string;
});
/**
* The URL to request.
*/
url: string;
/**
* The function that makes the actual data request.
*/
requestFunction: Request.RequestCallback;
/**
* The function that is called when the request is cancelled.
*/
cancelFunction: Request.CancelCallback;
/**
* The function that is called to update the request's priority, which occurs once per frame.
*/
priorityFunction: Request.PriorityCallback;
/**
* Priority is a unit-less value where lower values represent higher priority.
* For world-based objects, this is usually the distance from the camera.
* A request that does not have a priority function defaults to a priority of 0.
*
* If priorityFunction is defined, this value is updated every frame with the result of that call.
*/
priority: number;
/**
* 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.
*/
readonly throttle: boolean;
/**
* Whether to throttle the request by server. Browsers typically support about 6-8 parallel connections
* for HTTP/1 servers, and an unlimited amount of connections for HTTP/2 servers. Setting this value
* to true is preferable for requests going through HTTP/1 servers.
*/
readonly throttleByServer: boolean;
/**
* Type of request.
*/
readonly type: RequestType;
/**
* The current state of the request.
*/
readonly state: RequestState;
/**
* Duplicates a Request instance.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new Resource instance if one was not provided.
*/
clone(result?: Request): Request;
}
export namespace Request {
/**
* The function that makes the actual data request.
*/
type RequestCallback = () => Promise;
/**
* The function that is called when the request is cancelled.
*/
type CancelCallback = () => void;
/**
* The function that is called to update the request's priority, which occurs once per frame.
*/
type PriorityCallback = () => number;
}
/**
* An event that is raised when a request encounters an error.
* @param [statusCode] - The HTTP error status code, such as 404.
* @param [response] - The response included along with the error.
* @param [responseHeaders] - The response headers, represented either as an object literal or as a
* string in the format returned by XMLHttpRequest's getAllResponseHeaders() function.
*/
export class RequestErrorEvent {
constructor(statusCode?: number, response?: any, responseHeaders?: string | any);
/**
* The HTTP error status code, such as 404. If the error does not have a particular
* HTTP code, this property will be undefined.
*/
statusCode: number;
/**
* The response included along with the error. If the error does not include a response,
* this property will be undefined.
*/
response: any;
/**
* The headers included in the response, represented as an object literal of key/value pairs.
* If the error does not include any headers, this property will be undefined.
*/
responseHeaders: any | undefined;
/**
* Creates a string representing this RequestErrorEvent.
* @returns A string representing the provided RequestErrorEvent.
*/
toString(): string;
}
/**
* The request scheduler is used to track and constrain the number of active requests in order to prioritize incoming requests. The ability
* to retain control over the number of requests in CesiumJS is important because due to events such as changes in the camera position,
* a lot of new requests may be generated and a lot of in-flight requests may become redundant. The request scheduler manually constrains the
* number of requests so that newer requests wait in a shorter queue and don't have to compete for bandwidth with requests that have expired.
*/
export namespace RequestScheduler {
/**
* The maximum number of simultaneous active requests. Un-throttled requests do not observe this limit.
*/
var maximumRequests: number;
/**
* The maximum number of simultaneous active requests per server. Un-throttled requests or servers specifically
* listed in {@link requestsByServer} do not observe this limit.
*/
var maximumRequestsPerServer: number;
/**
* A per server key list of overrides to use for throttling instead of maximumRequestsPerServer.
* Useful when streaming data from a known HTTP/2 or HTTP/3 server.
* @example
* RequestScheduler.requestsByServer["myserver.com:443"] = 18;
* @example
* RequestScheduler.requestsByServer = {
* "api.cesium.com:443": 18,
* "assets.cesium.com:443": 18,
* };
*/
var requestsByServer: any;
/**
* Specifies if the request scheduler should throttle incoming requests, or let the browser queue requests under its control.
*/
var throttleRequests: boolean;
}
/**
* State of the request.
*/
export enum RequestState {
/**
* Initial unissued state.
*/
UNISSUED = 0,
/**
* Issued but not yet active. Will become active when open slots are available.
*/
ISSUED = 1,
/**
* Actual http request has been sent.
*/
ACTIVE = 2,
/**
* Request completed successfully.
*/
RECEIVED = 3,
/**
* Request was cancelled, either explicitly or automatically because of low priority.
*/
CANCELLED = 4,
/**
* Request failed.
*/
FAILED = 5
}
/**
* An enum identifying the type of request. Used for finer grained logging and priority sorting.
*/
export enum RequestType {
/**
* Terrain request.
*/
TERRAIN = 0,
/**
* Imagery request.
*/
IMAGERY = 1,
/**
* 3D Tiles request.
*/
TILES3D = 2,
/**
* Other request.
*/
OTHER = 3
}
export namespace Resource {
/**
* Initialization options for the Resource constructor
* @property url - The url of the resource.
* @property [queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @property [templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @property [headers = {}] - Additional HTTP headers that will be sent.
* @property [proxy] - A proxy to be used when loading the resource.
* @property [retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @property [retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @property [request] - A Request object that will be used. Intended for internal use only.
* @property [parseUrl = true] - If true, parse the url for query parameters; otherwise store the url without change
*/
type ConstructorOptions = {
url: string;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
parseUrl?: boolean;
};
/**
* A function that returns the value of the property.
* @param [resource] - The resource that failed to load.
* @param [error] - The error that occurred during the loading of the resource.
*/
type RetryCallback = (resource?: Resource, error?: RequestErrorEvent) => boolean | Promise;
}
/**
* A resource that includes the location and any other parameters we need to retrieve it or create derived resources. It also provides the ability to retry requests.
* @example
* function refreshTokenRetryCallback(resource, error) {
* if (error.statusCode === 403) {
* // 403 status code means a new token should be generated
* return getNewAccessToken()
* .then(function(token) {
* resource.queryParameters.access_token = token;
* return true;
* })
* .catch(function() {
* return false;
* });
* }
*
* return false;
* }
*
* const resource = new Resource({
* url: 'http://server.com/path/to/resource.json',
* proxy: new DefaultProxy('/proxy/'),
* headers: {
* 'X-My-Header': 'valueOfHeader'
* },
* queryParameters: {
* 'access_token': '123-435-456-000'
* },
* retryCallback: refreshTokenRetryCallback,
* retryAttempts: 1
* });
* @param options - A url or an object describing initialization options
*/
export class Resource {
constructor(options: string | Resource.ConstructorOptions);
/**
* Additional HTTP headers that will be sent with the request.
*/
headers: any;
/**
* A Request object that will be used. Intended for internal use only.
*/
request: Request;
/**
* A proxy to be used when loading the resource.
*/
proxy: Proxy;
/**
* Function to call when a request for this resource fails. If it returns true or a Promise that resolves to true, the request will be retried.
*/
retryCallback: (...params: any[]) => any;
/**
* The number of times the retryCallback should be called before giving up.
*/
retryAttempts: number;
/**
* Returns true if blobs are supported.
*/
static readonly isBlobSupported: boolean;
/**
* Query parameters appended to the url.
*/
readonly queryParameters: any;
/**
* The key/value pairs used to replace template parameters in the url.
*/
readonly templateValues: any;
/**
* The url to the resource with template values replaced, query string appended and encoded by proxy if one was set.
*/
url: string;
/**
* The file extension of the resource.
*/
readonly extension: string;
/**
* True if the Resource refers to a data URI.
*/
isDataUri: boolean;
/**
* True if the Resource refers to a blob URI.
*/
isBlobUri: boolean;
/**
* True if the Resource refers to a cross origin URL.
*/
isCrossOriginUrl: boolean;
/**
* True if the Resource has request headers. This is equivalent to checking if the headers property has any keys.
*/
hasHeaders: boolean;
/**
* Override Object#toString so that implicit string conversion gives the
* complete URL represented by this Resource.
* @returns The URL represented by this Resource
*/
toString(): string;
/**
* Returns the url, optional with the query string and processed by a proxy.
* @param [query = false] - If true, the query string is included.
* @param [proxy = false] - If true, the url is processed by the proxy object, if defined.
* @returns The url with all the requested components.
*/
getUrlComponent(query?: boolean, proxy?: boolean): string;
/**
* Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
* as opposed to adding them one at a time to the queryParameters property. If a value is already set, it will be replaced with the new value.
* @param params - The query parameters
* @param [useAsDefault = false] - If true the params will be used as the default values, so they will only be set if they are undefined.
*/
setQueryParameters(params: any, useAsDefault?: boolean): void;
/**
* Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
* as opposed to adding them one at a time to the queryParameters property.
* @param params - The query parameters
*/
appendQueryParameters(params: any): void;
/**
* Combines the specified object and the existing template values. This allows you to add many values at once,
* as opposed to adding them one at a time to the templateValues property. If a value is already set, it will become an array and the new value will be appended.
* @param template - The template values
* @param [useAsDefault = false] - If true the values will be used as the default values, so they will only be set if they are undefined.
*/
setTemplateValues(template: any, useAsDefault?: boolean): void;
/**
* Returns a resource relative to the current instance. All properties remain the same as the current instance unless overridden in options.
* @param options - An object with the following properties
* @param [options.url] - The url that will be resolved relative to the url of the current instance.
* @param [options.queryParameters] - An object containing query parameters that will be combined with those of the current instance.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}). These will be combined with those of the current instance.
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.retryCallback] - The function to call when loading the resource fails.
* @param [options.retryAttempts] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @param [options.preserveQueryParameters = false] - If true, this will keep all query parameters from the current resource and derived resource. If false, derived parameters will replace those of the current resource.
* @returns The resource derived from the current one.
*/
getDerivedResource(options: {
url?: string;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
preserveQueryParameters?: boolean;
}): Resource;
/**
* Duplicates a Resource instance.
* @param [result] - The object onto which to store the result.
* @returns The modified result parameter or a new Resource instance if one was not provided.
*/
clone(result?: Resource): Resource;
/**
* Returns the base path of the Resource.
* @param [includeQuery = false] - Whether or not to include the query string and fragment form the uri
* @returns The base URI of the resource
*/
getBaseUri(includeQuery?: boolean): string;
/**
* Appends a forward slash to the URL.
*/
appendForwardSlash(): void;
/**
* Asynchronously loads the resource as raw binary data. Returns a promise that will resolve to
* an ArrayBuffer once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
* @example
* // load a single URL asynchronously
* resource.fetchArrayBuffer().then(function(arrayBuffer) {
* // use the data
* }).catch(function(error) {
* // an error occurred
* });
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
fetchArrayBuffer(): Promise | undefined;
/**
* Creates a Resource and calls fetchArrayBuffer() on it.
* @param options - A url or an object with the following properties
* @param options.url - The url of the resource.
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @param [options.retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
static fetchArrayBuffer(options: {
url: string;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
}): Promise | undefined;
/**
* Asynchronously loads the given resource as a blob. Returns a promise that will resolve to
* a Blob once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
* @example
* // load a single URL asynchronously
* resource.fetchBlob().then(function(blob) {
* // use the data
* }).catch(function(error) {
* // an error occurred
* });
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
fetchBlob(): Promise | undefined;
/**
* Creates a Resource and calls fetchBlob() on it.
* @param options - A url or an object with the following properties
* @param options.url - The url of the resource.
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @param [options.retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
static fetchBlob(options: {
url: string;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
}): Promise | undefined;
/**
* Asynchronously loads the given image resource. Returns a promise that will resolve to
* an {@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap|ImageBitmap} if preferImageBitmap is true and the browser supports createImageBitmap or otherwise an
* {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement|Image} once loaded, or reject if the image failed to load.
* @example
* // load a single image asynchronously
* resource.fetchImage().then(function(image) {
* // use the loaded image
* }).catch(function(error) {
* // an error occurred
* });
*
* // load several images in parallel
* Promise.all([resource1.fetchImage(), resource2.fetchImage()]).then(function(images) {
* // images is an array containing all the loaded images
* });
* @param [options] - An object with the following properties.
* @param [options.preferBlob = false] - If true, we will load the image via a blob.
* @param [options.preferImageBitmap = false] - If true, image will be decoded during fetch and an ImageBitmap is returned.
* @param [options.flipY = false] - If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap.
* @param [options.skipColorSpaceConversion = false] - If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
fetchImage(options?: {
preferBlob?: boolean;
preferImageBitmap?: boolean;
flipY?: boolean;
skipColorSpaceConversion?: boolean;
}): Promise | undefined;
/**
* Creates a Resource and calls fetchImage() on it.
* @param options - A url or an object with the following properties
* @param options.url - The url of the resource.
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.flipY = false] - Whether to vertically flip the image during fetch and decode. Only applies when requesting an image and the browser supports createImageBitmap.
* @param [options.retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @param [options.retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @param [options.preferBlob = false] - If true, we will load the image via a blob.
* @param [options.preferImageBitmap = false] - If true, image will be decoded during fetch and an ImageBitmap is returned.
* @param [options.skipColorSpaceConversion = false] - If true, any custom gamma or color profiles in the image will be ignored. Only applies when requesting an image and the browser supports createImageBitmap.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
static fetchImage(options: {
url: string;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
flipY?: boolean;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
preferBlob?: boolean;
preferImageBitmap?: boolean;
skipColorSpaceConversion?: boolean;
}): Promise | undefined;
/**
* Asynchronously loads the given resource as text. Returns a promise that will resolve to
* a String once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
* @example
* // load text from a URL, setting a custom header
* const resource = new Resource({
* url: 'http://someUrl.com/someJson.txt',
* headers: {
* 'X-Custom-Header' : 'some value'
* }
* });
* resource.fetchText().then(function(text) {
* // Do something with the text
* }).catch(function(error) {
* // an error occurred
* });
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
fetchText(): Promise | undefined;
/**
* Creates a Resource and calls fetchText() on it.
* @param options - A url or an object with the following properties
* @param options.url - The url of the resource.
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @param [options.retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
static fetchText(options: {
url: string;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
}): Promise | undefined;
/**
* Asynchronously loads the given resource as JSON. Returns a promise that will resolve to
* a JSON object once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled. This function
* adds 'Accept: application/json,*/*;q=0.01' to the request headers, if not
* already specified.
* @example
* resource.fetchJson().then(function(jsonData) {
* // Do something with the JSON object
* }).catch(function(error) {
* // an error occurred
* });
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
fetchJson(): Promise | undefined;
/**
* Creates a Resource and calls fetchJson() on it.
* @param options - A url or an object with the following properties
* @param options.url - The url of the resource.
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @param [options.retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
static fetchJson(options: {
url: string;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
}): Promise | undefined;
/**
* Asynchronously loads the given resource as XML. Returns a promise that will resolve to
* an XML Document once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
* @example
* // load XML from a URL, setting a custom header
* Cesium.loadXML('http://someUrl.com/someXML.xml', {
* 'X-Custom-Header' : 'some value'
* }).then(function(document) {
* // Do something with the document
* }).catch(function(error) {
* // an error occurred
* });
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
fetchXML(): Promise | undefined;
/**
* Creates a Resource and calls fetchXML() on it.
* @param options - A url or an object with the following properties
* @param options.url - The url of the resource.
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @param [options.retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
static fetchXML(options: {
url: string;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
}): Promise | undefined;
/**
* Requests a resource using JSONP.
* @example
* // load a data asynchronously
* resource.fetchJsonp().then(function(data) {
* // use the loaded data
* }).catch(function(error) {
* // an error occurred
* });
* @param [callbackParameterName = 'callback'] - The callback parameter name that the server expects.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
fetchJsonp(callbackParameterName?: string): Promise | undefined;
/**
* Creates a Resource from a URL and calls fetchJsonp() on it.
* @param options - A url or an object with the following properties
* @param options.url - The url of the resource.
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @param [options.retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @param [options.callbackParameterName = 'callback'] - The callback parameter name that the server expects.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
static fetchJsonp(options: {
url: string;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
callbackParameterName?: string;
}): Promise | undefined;
/**
* Asynchronously loads the given resource. Returns a promise that will resolve to
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled. It's recommended that you use
* the more specific functions eg. fetchJson, fetchBlob, etc.
* @example
* resource.fetch()
* .then(function(body) {
* // use the data
* }).catch(function(error) {
* // an error occurred
* });
* @param [options] - Object with the following properties:
* @param [options.responseType] - The type of response. This controls the type of item returned.
* @param [options.headers] - Additional HTTP headers to send with the request, if any.
* @param [options.overrideMimeType] - Overrides the MIME type returned by the server.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
fetch(options?: {
responseType?: string;
headers?: any;
overrideMimeType?: string;
}): Promise | undefined;
/**
* Creates a Resource from a URL and calls fetch() on it.
* @param options - A url or an object with the following properties
* @param options.url - The url of the resource.
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @param [options.retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @param [options.responseType] - The type of response. This controls the type of item returned.
* @param [options.overrideMimeType] - Overrides the MIME type returned by the server.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
static fetch(options: {
url: string;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
responseType?: string;
overrideMimeType?: string;
}): Promise | undefined;
/**
* Asynchronously deletes the given resource. Returns a promise that will resolve to
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
* @example
* resource.delete()
* .then(function(body) {
* // use the data
* }).catch(function(error) {
* // an error occurred
* });
* @param [options] - Object with the following properties:
* @param [options.responseType] - The type of response. This controls the type of item returned.
* @param [options.headers] - Additional HTTP headers to send with the request, if any.
* @param [options.overrideMimeType] - Overrides the MIME type returned by the server.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
delete(options?: {
responseType?: string;
headers?: any;
overrideMimeType?: string;
}): Promise | undefined;
/**
* Creates a Resource from a URL and calls delete() on it.
* @param options - A url or an object with the following properties
* @param options.url - The url of the resource.
* @param [options.data] - Data that is posted with the resource.
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @param [options.retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @param [options.responseType] - The type of response. This controls the type of item returned.
* @param [options.overrideMimeType] - Overrides the MIME type returned by the server.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
static delete(options: {
url: string;
data?: any;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
responseType?: string;
overrideMimeType?: string;
}): Promise | undefined;
/**
* Asynchronously gets headers the given resource. Returns a promise that will resolve to
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
* @example
* resource.head()
* .then(function(headers) {
* // use the data
* }).catch(function(error) {
* // an error occurred
* });
* @param [options] - Object with the following properties:
* @param [options.responseType] - The type of response. This controls the type of item returned.
* @param [options.headers] - Additional HTTP headers to send with the request, if any.
* @param [options.overrideMimeType] - Overrides the MIME type returned by the server.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
head(options?: {
responseType?: string;
headers?: any;
overrideMimeType?: string;
}): Promise | undefined;
/**
* Creates a Resource from a URL and calls head() on it.
* @param options - A url or an object with the following properties
* @param options.url - The url of the resource.
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @param [options.retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @param [options.responseType] - The type of response. This controls the type of item returned.
* @param [options.overrideMimeType] - Overrides the MIME type returned by the server.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
static head(options: {
url: string;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
responseType?: string;
overrideMimeType?: string;
}): Promise | undefined;
/**
* Asynchronously gets options the given resource. Returns a promise that will resolve to
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
* @example
* resource.options()
* .then(function(headers) {
* // use the data
* }).catch(function(error) {
* // an error occurred
* });
* @param [options] - Object with the following properties:
* @param [options.responseType] - The type of response. This controls the type of item returned.
* @param [options.headers] - Additional HTTP headers to send with the request, if any.
* @param [options.overrideMimeType] - Overrides the MIME type returned by the server.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
options(options?: {
responseType?: string;
headers?: any;
overrideMimeType?: string;
}): Promise | undefined;
/**
* Creates a Resource from a URL and calls options() on it.
* @param options - A url or an object with the following properties
* @param options.url - The url of the resource.
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @param [options.retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @param [options.responseType] - The type of response. This controls the type of item returned.
* @param [options.overrideMimeType] - Overrides the MIME type returned by the server.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
static options(options: {
url: string;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
responseType?: string;
overrideMimeType?: string;
}): Promise | undefined;
/**
* Asynchronously posts data to the given resource. Returns a promise that will resolve to
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
* @example
* resource.post(data)
* .then(function(result) {
* // use the result
* }).catch(function(error) {
* // an error occurred
* });
* @param data - Data that is posted with the resource.
* @param [options] - Object with the following properties:
* @param [options.data] - Data that is posted with the resource.
* @param [options.responseType] - The type of response. This controls the type of item returned.
* @param [options.headers] - Additional HTTP headers to send with the request, if any.
* @param [options.overrideMimeType] - Overrides the MIME type returned by the server.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
post(data: any, options?: {
data?: any;
responseType?: string;
headers?: any;
overrideMimeType?: string;
}): Promise | undefined;
/**
* Creates a Resource from a URL and calls post() on it.
* @param options - A url or an object with the following properties
* @param options.url - The url of the resource.
* @param options.data - Data that is posted with the resource.
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @param [options.retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @param [options.responseType] - The type of response. This controls the type of item returned.
* @param [options.overrideMimeType] - Overrides the MIME type returned by the server.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
static post(options: {
url: string;
data: any;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
responseType?: string;
overrideMimeType?: string;
}): Promise | undefined;
/**
* Asynchronously puts data to the given resource. Returns a promise that will resolve to
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
* @example
* resource.put(data)
* .then(function(result) {
* // use the result
* }).catch(function(error) {
* // an error occurred
* });
* @param data - Data that is posted with the resource.
* @param [options] - Object with the following properties:
* @param [options.responseType] - The type of response. This controls the type of item returned.
* @param [options.headers] - Additional HTTP headers to send with the request, if any.
* @param [options.overrideMimeType] - Overrides the MIME type returned by the server.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
put(data: any, options?: {
responseType?: string;
headers?: any;
overrideMimeType?: string;
}): Promise | undefined;
/**
* Creates a Resource from a URL and calls put() on it.
* @param options - A url or an object with the following properties
* @param options.url - The url of the resource.
* @param options.data - Data that is posted with the resource.
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @param [options.retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @param [options.responseType] - The type of response. This controls the type of item returned.
* @param [options.overrideMimeType] - Overrides the MIME type returned by the server.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
static put(options: {
url: string;
data: any;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
responseType?: string;
overrideMimeType?: string;
}): Promise | undefined;
/**
* Asynchronously patches data to the given resource. Returns a promise that will resolve to
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
* @example
* resource.patch(data)
* .then(function(result) {
* // use the result
* }).catch(function(error) {
* // an error occurred
* });
* @param data - Data that is posted with the resource.
* @param [options] - Object with the following properties:
* @param [options.responseType] - The type of response. This controls the type of item returned.
* @param [options.headers] - Additional HTTP headers to send with the request, if any.
* @param [options.overrideMimeType] - Overrides the MIME type returned by the server.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
patch(data: any, options?: {
responseType?: string;
headers?: any;
overrideMimeType?: string;
}): Promise | undefined;
/**
* Creates a Resource from a URL and calls patch() on it.
* @param options - A url or an object with the following properties
* @param options.url - The url of the resource.
* @param options.data - Data that is posted with the resource.
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
* @param [options.templateValues] - Key/Value pairs that are used to replace template values (eg. {x}).
* @param [options.headers = {}] - Additional HTTP headers that will be sent.
* @param [options.proxy] - A proxy to be used when loading the resource.
* @param [options.retryCallback] - The Function to call when a request for this resource fails. If it returns true, the request will be retried.
* @param [options.retryAttempts = 0] - The number of times the retryCallback should be called before giving up.
* @param [options.request] - A Request object that will be used. Intended for internal use only.
* @param [options.responseType] - The type of response. This controls the type of item returned.
* @param [options.overrideMimeType] - Overrides the MIME type returned by the server.
* @returns a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
*/
static patch(options: {
url: string;
data: any;
queryParameters?: any;
templateValues?: any;
headers?: any;
proxy?: Proxy;
retryCallback?: Resource.RetryCallback;
retryAttempts?: number;
request?: Request;
responseType?: string;
overrideMimeType?: string;
}): Promise | undefined;
/**
* A resource instance initialized to the current browser location
*/
static readonly DEFAULT: Resource;
}
export namespace ScreenSpaceEventHandler {
/**
* An Event that occurs at a single position on screen.
*/
type PositionedEvent = {
position: Cartesian2;
};
/**
* @param event - The event which triggered the listener
*/
type PositionedEventCallback = (event: ScreenSpaceEventHandler.PositionedEvent) => void;
/**
* An Event that starts at one position and ends at another.
*/
type MotionEvent = {
startPosition: Cartesian2;
endPosition: Cartesian2;
};
/**
* @param event - The event which triggered the listener
*/
type MotionEventCallback = (event: ScreenSpaceEventHandler.MotionEvent) => void;
/**
* An Event that occurs at a two positions on screen.
*/
type TwoPointEvent = {
position1: Cartesian2;
position2: Cartesian2;
};
/**
* @param event - The event which triggered the listener
*/
type TwoPointEventCallback = (event: ScreenSpaceEventHandler.TwoPointEvent) => void;
/**
* An Event that starts at a two positions on screen and moves to two other positions.
*/
type TwoPointMotionEvent = {
position1: Cartesian2;
position2: Cartesian2;
previousPosition1: Cartesian2;
previousPosition2: Cartesian2;
};
/**
* @param event - The event which triggered the listener
*/
type TwoPointMotionEventCallback = (event: ScreenSpaceEventHandler.TwoPointMotionEvent) => void;
/**
* @param delta - The amount that the mouse wheel moved
*/
type WheelEventCallback = (delta: number) => void;
}
/**
* Handles user input events. Custom functions can be added to be executed on
* when the user enters input.
* @param [element = document] - The element to add events to.
*/
export class ScreenSpaceEventHandler {
constructor(element?: HTMLElement);
/**
* Set a function to be executed on an input event.
* @param action - Function to be executed when the input event occurs.
* @param type - The ScreenSpaceEventType of input event.
* @param [modifiers] - The KeyboardEventModifier keys that are held when a type
* event occurs.
*/
setInputAction(action: ScreenSpaceEventHandler.PositionedEventCallback | ScreenSpaceEventHandler.MotionEventCallback | ScreenSpaceEventHandler.WheelEventCallback | ScreenSpaceEventHandler.TwoPointEventCallback | ScreenSpaceEventHandler.TwoPointMotionEventCallback, type: ScreenSpaceEventType, modifiers?: KeyboardEventModifier[] | KeyboardEventModifier): void;
/**
* Returns the function to be executed on an input event.
* @param type - The ScreenSpaceEventType of input event.
* @param [modifiers] - The KeyboardEventModifier keys that are held when a type
* event occurs.
* @returns The function to be executed on an input event.
*/
getInputAction(type: ScreenSpaceEventType, modifiers?: KeyboardEventModifier[] | KeyboardEventModifier): ScreenSpaceEventHandler.PositionedEventCallback | ScreenSpaceEventHandler.MotionEventCallback | ScreenSpaceEventHandler.WheelEventCallback | ScreenSpaceEventHandler.TwoPointEventCallback | ScreenSpaceEventHandler.TwoPointMotionEventCallback;
/**
* Removes the function to be executed on an input event.
* @param type - The ScreenSpaceEventType of input event.
* @param [modifiers] - The KeyboardEventModifier keys that are held when a type
* event occurs.
*/
removeInputAction(type: ScreenSpaceEventType, modifiers?: KeyboardEventModifier[] | KeyboardEventModifier): void;
/**
* Returns true if this object was destroyed; otherwise, false.
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed will result in a {@link DeveloperError} exception.
* @returns true if this object was destroyed; otherwise, false.
*/
isDestroyed(): boolean;
/**
* Removes listeners held by this object.
*
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined) to the object as done in the example.
* @example
* handler = handler && handler.destroy();
*/
destroy(): void;
/**
* The amount of time, in milliseconds, that mouse events will be disabled after
* receiving any touch events, such that any emulated mouse events will be ignored.
*/
static mouseEmulationIgnoreMilliseconds: number;
/**
* The amount of time, in milliseconds, before a touch on the screen becomes a
* touch and hold.
*/
static touchHoldDelayMilliseconds: number;
}
/**
* This enumerated type is for classifying mouse events: down, up, click, double click, move and move while a button is held down.
*/
export enum ScreenSpaceEventType {
/**
* Represents a mouse left button down event.
*/
LEFT_DOWN = 0,
/**
* Represents a mouse left button up event.
*/
LEFT_UP = 1,
/**
* Represents a mouse left click event.
*/
LEFT_CLICK = 2,
/**
* Represents a mouse left double click event.
*/
LEFT_DOUBLE_CLICK = 3,
/**
* Represents a mouse left button down event.
*/
RIGHT_DOWN = 5,
/**
* Represents a mouse right button up event.
*/
RIGHT_UP = 6,
/**
* Represents a mouse right click event.
*/
RIGHT_CLICK = 7,
/**
* Represents a mouse middle button down event.
*/
MIDDLE_DOWN = 10,
/**
* Represents a mouse middle button up event.
*/
MIDDLE_UP = 11,
/**
* Represents a mouse middle click event.
*/
MIDDLE_CLICK = 12,
/**
* Represents a mouse move event.
*/
MOUSE_MOVE = 15,
/**
* Represents a mouse wheel event.
*/
WHEEL = 16,
/**
* Represents the start of a two-finger event on a touch surface.
*/
PINCH_START = 17,
/**
* Represents the end of a two-finger event on a touch surface.
*/
PINCH_END = 18,
/**
* Represents a change of a two-finger event on a touch surface.
*/
PINCH_MOVE = 19
}
/**
* Contains functions for finding the Cartesian coordinates of the sun and the moon in the
* Earth-centered inertial frame.
*/
export namespace Simon1994PlanetaryPositions {
/**
* Computes the position of the Sun in the Earth-centered inertial frame
* @param [julianDate] - The time at which to compute the Sun's position, if not provided the current system time is used.
* @param [result] - The object onto which to store the result.
* @returns Calculated sun position
*/
function computeSunPositionInEarthInertialFrame(julianDate?: JulianDate, result?: Cartesian3): Cartesian3;
/**
* Computes the position of the Moon in the Earth-centered inertial frame
* @param [julianDate] - The time at which to compute the Moon's position, if not provided the current system time is used.
* @param [result] - The object onto which to store the result.
* @returns Calculated moon position
*/
function computeMoonPositionInEarthInertialFrame(julianDate?: JulianDate, result?: Cartesian3): Cartesian3;
}
export namespace SnapService {
/**
* The result of a successful {@link SnapService#snap}.
*
* Implementations may return additional properties beyond those listed here.
* @property [snapPoint] - The snapped point. This is the point to consume.
* @property [hitPoint] - The point where the cursor hit the geometry: the nearest edge point when within the snap aperture, otherwise the surface point under the cursor.
*/
type Result = {
snapPoint?: Cartesian3;
hitPoint?: Cartesian3;
};
}
/**
* Provides snap-to-geometry through an external service, which snaps against
* source geometry hosted remotely rather than geometry loaded in the scene.
* This type describes an interface and is not intended to be used.
*/
export class SnapService {
/**
* Requests a snap against geometry known to the service.
*
* The camera and canvas dimensions describe the current view so the
* implementation can perform view-dependent snapping (nearest ordering,
* pixel apertures, surface tracking) correctly.
*
* Implementations may accept additional options beyond those listed here.
* @param options - Object with the following properties:
* @param options.elementId - An implementation-defined identifier of the geometry to snap to.
* @param options.testPoint - The point to snap from, typically the picked cursor position.
* @param options.camera - The camera defining the current view.
* @param options.canvasWidth - The canvas width in CSS pixels.
* @param options.canvasHeight - The canvas height in CSS pixels.
* @param [options.closePoint = options.testPoint] - A reference point near the target geometry that seeds the snap search.
* @param [options.snapAperture = SnapService.DEFAULT_SNAP_APERTURE] - The snap tolerance in CSS pixels.
* @returns The snap result, or undefined if no snap was possible.
*/
snap(options: {
elementId: string;
testPoint: Cartesian3;
camera: Camera;
canvasWidth: number;
canvasHeight: number;
closePoint?: Cartesian3;
snapAperture?: number;
}): Promise;
/**
* The default snap tolerance used by {@link SnapService#snap} when
* options.snapAperture is not provided, in CSS pixels.
* The value is implementation-defined.
*/
static readonly DEFAULT_SNAP_APERTURE: number;
}
/**
* A wrapper around a web worker that allows scheduling tasks for a given worker,
* returning results asynchronously via a promise.
*
* The Worker is not constructed until a task is scheduled.
* @param workerPath - The Url to the worker. This can either be an absolute path or relative to the Cesium Workers folder.
* @param [maximumActiveTasks = Number.POSITIVE_INFINITY] - The maximum number of active tasks. Once exceeded,
* scheduleTask will not queue any more tasks, allowing
* work to be rescheduled in future frames.
*/
export class TaskProcessor {
constructor(workerPath: string, maximumActiveTasks?: number);
/**
* Schedule a task to be processed by the web worker asynchronously. If there are currently more
* tasks active than the maximum set by the constructor, will immediately return undefined.
* Otherwise, returns a promise that will resolve to the result posted back by the worker when
* finished.
* @example
* const taskProcessor = new Cesium.TaskProcessor('myWorkerPath');
* const promise = taskProcessor.scheduleTask({
* someParameter : true,
* another : 'hello'
* });
* if (!Cesium.defined(promise)) {
* // too many active tasks - try again later
* } else {
* promise.then(function(result) {
* // use the result of the task
* });
* }
* @param parameters - Any input data that will be posted to the worker.
* @param [transferableObjects] - An array of objects contained in parameters that should be
* transferred to the worker instead of copied.
* @returns Either a promise that will resolve to the result when available, or undefined
* if there are too many active tasks,
*/
scheduleTask(parameters: any, transferableObjects?: object[]): Promise