Request

new Cesium.Request(options)

Stores information for making a request. In general this does not need to be constructed directly.
Name Type Description
options Object optional An object with the following properties:
Name Type Default Description
url Boolean optional The url to request.
requestFunction Request~RequestCallback optional The function that makes the actual data request.
cancelFunction Request~CancelCallback optional The function that is called when the request is cancelled.
priorityFunction Request~PriorityCallback optional The function that is called to update the request's priority, which occurs once per frame.
priority Number 0.0 optional The initial priority of the request.
throttle Boolean false optional 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.
throttleByServer Boolean false optional Whether to throttle the request by server.
type RequestType RequestType.OTHER optional The type of request.

Members

cancelFunction : Request~CancelCallback

The function that is called when the request is cancelled.

priority : Number

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.
Default Value: 0.0

priorityFunction : Request~PriorityCallback

The function that is called to update the request's priority, which occurs once per frame.

requestFunction : Request~RequestCallback

The function that makes the actual data request.

readonlystate : RequestState

The current state of the request.

readonlythrottle : Boolean

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.
Default Value: false

readonlythrottleByServer : 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.
Default Value: false

readonlytype : RequestType

Type of request.
Default Value: RequestType.OTHER

url : String

The URL to request.

Type Definitions

CancelCallback()

The function that is called when the request is cancelled.

PriorityCallback()Number

The function that is called to update the request's priority, which occurs once per frame.
Returns:
The updated priority value.

RequestCallback()Promise

The function that makes the actual data request.
Returns:
A promise for the requested data.