new Cesium.Request(options)

存储用于提出请求的信息。 一般来说,这不需要直接建造.
Name Type Description
options object optional 具有下列属性的天体:
Name Type Default Description
url string optional 请求者.
requestFunction Request.RequestCallback optional 实际数据请求的函数 .
cancelFunction Request.CancelCallback optional 请求取消时调用的函数 .
priorityFunction Request.PriorityCallback optional 用于更新请求优先级的调用功能,每帧一次出现.
priority number 0.0 optional 请求的初始优先权.
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.
serverKey string optional 用于识别一个请求将要使用的服务器的密钥 .

Members

cancelFunction : Request.CancelCallback

请求取消时调用的函数 .

priority : number

优先级是低值代表较高优先级的无单位值. 对于基于世界的物体,这通常是与相机的距离. 不具有优先权函数的请求默认为0. 如果优先功能被定义,此值会随该调用的结果而更新每个帧.
Default Value: 0.0

priorityFunction : Request.PriorityCallback

用于更新请求优先级的调用功能,每帧一次出现.

requestFunction : Request.RequestCallback

实际数据请求的函数 .

readonly state : RequestState

请求现状.

readonly throttle : boolean

是否暂停并优先处理请求 。 假的,请立即发出. 如果真是这样的话 请求将按优先顺序节奏并发送.
Default Value: false

readonly throttleByServer : boolean

是否通过服务器节制请求 。 浏览器一般支持大约 6-8 个平行连接 用于 NT++0 1服务器,并无限量连接 NT++1 2服务器. 设置此值 至 NT##0 真 NT###1 ,对于通过 NT###2 1服务器的请求来说更可取.
Default Value: false

readonly type : RequestType

请求类型.
Default Value: RequestType.OTHER

url : string

The URL to request.

Methods

clone(result)Request

重复请求实例.
Name Type Description
result Request optional 存储结果的对象 .
Returns:
未提供修改的结果参数或新资源实例 .

Type Definitions

Cesium.Request.CancelCallback()

请求取消时调用的函数 .

Cesium.Request.PriorityCallback()number

用于更新请求优先级的调用功能,每帧一次出现.
Returns:
更新的优先级值 .

Cesium.Request.RequestCallback()Promise.<void>

实际数据请求的函数 .
Returns:
承诺提供所要求的数据.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.