@JsType(isNative=true,
namespace="Cesium",
name="IonResource")
public class IonResource
extends Resource
Resource instance that encapsulates Cesium ion asset access. This object is normally not instantiated directly,
use IonResource.fromAssetId.Ion,
IonImageryProvider,
https://cesium.comResource.RetryCallback| Modifier and Type | Field and Description |
|---|---|
Credit[] |
credits
Gets the credits required for attribution of the asset.
|
hasHeaders, headers, isBlobUri, isCrossOriginUrl, isDataUri, proxy, request, retryAttempts, retryCallback, templateValues, url| Modifier and Type | Method and Description |
|---|---|
static Promise<IonResource,Void> |
fromAssetId(int assetId)
Asynchronously creates an instance.
|
static Promise<IonResource,Void> |
fromAssetId(int assetId,
FromAssetIdOptions options)
Asynchronously creates an instance.
|
appendForwardSlash, appendQueryParameters, clone, clone, DEFAULT, delete, delete, extension, fetch, fetch, fetchArrayBuffer, fetchArrayBuffer, fetchArrayBuffer, fetchBlob, fetchBlob, fetchImage, fetchImage, fetchImage, fetchImage, fetchJson, fetchJson, fetchJson, fetchJsonp, fetchJsonp, fetchJsonp, fetchJsonpCallback, fetchText, fetchText, fetchText, fetchXML, fetchXML, getBaseUri, getBaseUri, getDerivedResource, getDerivedResource, getUrlComponent, getUrlComponent, getUrlComponent, head, head, isBlobSupported, options, options, patch, patch, post, post, post, post, put, put, queryParameters, retryOnError, retryOnError, setQueryParameters, setQueryParameters@JsProperty public Credit[] credits
@JsMethod public static Promise<IonResource,Void> fromAssetId(int assetId)
assetId - The Cesium ion asset id.
Examples:
IonResource.fromAssetId(3883).then(new Fulfill() {
@Override
public void onFulfilled(IonResource value) {
viewer.scene().primitives().add(value);
}
}, new Reject() {
@Override
public void onRejected(Void value) {
Cesium.log("Request rejected");
}
});
@JsMethod public static Promise<IonResource,Void> fromAssetId(int assetId, FromAssetIdOptions options)
assetId - The Cesium ion asset id.options - FromAssetIdOptions object.
Examples:
IonResource.fromAssetId(3883).then(new Fulfill() {
@Override
public void onFulfilled(IonResource value) {
viewer.scene().primitives().add(value);
}
}, new Reject() {
@Override
public void onRejected(Void value) {
Cesium.log("Request rejected");
}
});
Copyright © 2019. All rights reserved.