public class Cesium extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Cesium.CreateWorldTerrainOptions |
static class |
Cesium.ExportKmlOptions
Options for
exportKml(ExportKmlOptions) |
static interface |
Cesium.Function |
static interface |
Cesium.RequestAnimationFrameCallback |
Constructor and Description |
---|
Cesium() |
Modifier and Type | Method and Description |
---|---|
static String |
buildModuleUrl(String moduleId)
Given a non-relative moduleID, returns an absolute URL to the file represented by that module ID,
using, in order of preference, require.toUrl, the value of a global CESIUM_BASE_URL, or
the base URL of the Cesium.js script.
|
static void |
cancelAnimationFrame(Number requestID)
A browser-independent function to cancel an animation frame requested using requestAnimationFrame.
|
static Command |
createCommand(Cesium.Function func)
Create a Command from a given function, for use with ViewModels.
|
static Command |
createCommand(Cesium.Function func,
boolean canExecute)
Create a Command from a given function, for use with ViewModels.
|
static UrlTemplateImageryProvider |
createOpenStreetMapImageryProvider()
Creates a UrlTemplateImageryProvider instance that provides tiled imagery hosted by OpenStreetMap or
another provider of Slippy tiles.
|
static UrlTemplateImageryProvider |
createOpenStreetMapImageryProvider(OpenStreetMapImageryProviderOptions options)
Creates a UrlTemplateImageryProvider instance that provides tiled imagery hosted by OpenStreetMap or
another provider of Slippy tiles.
|
static UrlTemplateImageryProvider |
createOpenStreetMapImageryProvider(String url) |
static UrlTemplateImageryProvider |
createTileMapServiceImageryProvider()
Creates a UrlTemplateImageryProvider instance that provides tiled imagery as generated by GDDAL2Tiles etc.
|
static UrlTemplateImageryProvider |
createTileMapServiceImageryProvider(String url) |
static UrlTemplateImageryProvider |
createTileMapServiceImageryProvider(TileMapServiceImageryProviderOptions options)
Creates a UrlTemplateImageryProvider instance that provides tiled imagery as generated by GDDAL2Tiles etc.
|
static CesiumTerrainProvider |
createWorldTerrain()
Creates a
CesiumTerrainProvider instance for the Cesium World Terrain. |
static CesiumTerrainProvider |
createWorldTerrain(Cesium.CreateWorldTerrainOptions options)
Creates a
CesiumTerrainProvider instance for the Cesium World Terrain. |
static boolean |
defined(Object object) |
static void |
destroyObject(Object object)
Destroys an object.
|
static void |
destroyObject(Object object,
String message)
Destroys an object.
|
static Promise<JsObject,Void> |
exportKml(Cesium.ExportKmlOptions options)
Exports an EntityCollection as a KML document.
|
static void |
fixSmartGWT()
Fix for SmartGWT
Thanks for Mark Erikson (https://groups.google.com/forum/#!
|
static boolean |
isInitialized() |
static void |
log(Object object) |
static String |
path() |
static Number |
requestAnimationFrame(Cesium.RequestAnimationFrameCallback callback)
A browser-independent function to request a new animation frame.
|
static Promise<Cartographic[],Void> |
sampleTerrain(TerrainProvider terrainProvider,
int level,
Cartographic[] positions)
Initiates a terrain height query for an array of
Cartographic positions by requesting tiles from a terrain provider,
sampling, and interpolating. |
static Promise<Cartographic[],Void> |
sampleTerrainMostDetailed(TerrainProvider terrainProvider,
Cartographic[] positions)
Initiates a sampleTerrain() request at the maximum available tile level for a terrain dataset.
|
static String |
version() |
@JsProperty(namespace="<global>", name="Cesium") public static boolean isInitialized()
@JsProperty(namespace="Cesium", name="VERSION") public static String version()
@JsProperty(namespace="<global>", name="CesiumPath") public static String path()
public static void log(Object object)
public static void fixSmartGWT()
@JsMethod(namespace="Cesium", name="buildModuleUrl") public static String buildModuleUrl(String moduleId)
@JsMethod(namespace="Cesium") public static boolean defined(Object object)
@JsMethod(namespace="Cesium", name="sampleTerrain") public static Promise<Cartographic[],Void> sampleTerrain(TerrainProvider terrainProvider, int level, Cartographic[] positions)
Cartographic
positions by requesting tiles from a terrain provider,
sampling, and interpolating. The interpolation matches the triangles used to render the terrain at the specified level.
The query happens asynchronously, so this function returns a promise that is resolved when the query completes.
Each point height is modified in place. If a height can not be determined because no terrain data is available
for the specified level at that location, or another error occurs, the height is set to undefined.
As is typical of the Cartographic
type, the supplied height is a height above the reference
ellipsoid (such as Ellipsoid.WGS84()
) rather than an altitude above mean sea level.
In other words, it will not necessarily be 0.0 if sampled in the ocean.terrainProvider
- The terrain provider from which to query heights.level
- The terrain level-of-detail from which to query terrain heights.positions
- The positions to update with terrain heights.@JsMethod(namespace="Cesium", name="createOpenStreetMapImageryProvider") public static UrlTemplateImageryProvider createOpenStreetMapImageryProvider()
@JsMethod(namespace="Cesium", name="createOpenStreetMapImageryProvider") public static UrlTemplateImageryProvider createOpenStreetMapImageryProvider(OpenStreetMapImageryProviderOptions options)
options
- Optionspublic static UrlTemplateImageryProvider createOpenStreetMapImageryProvider(String url)
@JsMethod(namespace="Cesium", name="createTileMapServiceImageryProvider") public static UrlTemplateImageryProvider createTileMapServiceImageryProvider()
@JsMethod(namespace="Cesium", name="createTileMapServiceImageryProvider") public static UrlTemplateImageryProvider createTileMapServiceImageryProvider(TileMapServiceImageryProviderOptions options)
options
- Optionspublic static UrlTemplateImageryProvider createTileMapServiceImageryProvider(String url)
@JsMethod(namespace="Cesium", name="createCommand") public static Command createCommand(Cesium.Function func)
func
- The function to execute.@JsMethod(namespace="Cesium", name="createCommand") public static Command createCommand(Cesium.Function func, boolean canExecute)
func
- The function to execute.canExecute
- A boolean indicating whether the function can currently be executed.@JsMethod(namespace="Cesium", name="requestAnimationFrame") public static Number requestAnimationFrame(Cesium.RequestAnimationFrameCallback callback)
callback
- The function to call when the next frame should be drawn.cancelAnimationFrame(java.lang.Number)
to cancel the request.@JsMethod(namespace="Cesium", name="cancelAnimationFrame") public static void cancelAnimationFrame(Number requestID)
requestID
- The value returned by requestAnimationFrame.@JsMethod(namespace="Cesium", name="sampleTerrainMostDetailed") public static Promise<Cartographic[],Void> sampleTerrainMostDetailed(TerrainProvider terrainProvider, Cartographic[] positions)
terrainProvider
- The terrain provider from which to query heights.positions
- The positions to update with terrain heights.
Example:
CesiumTerrainProviderOptions options = new CesiumTerrainProviderOptions();
options.url = "https://assets.agi.com/stk-terrain/world";
CesiumTerrainProvider terrainProvider = new CesiumTerrainProvider(options);
Cartographic[] positions = new Cartographic[] {Cartographic.fromDegrees(86.925145, 27.988257), Cartographic.fromDegrees(87.0, 28.0)};
Promise<Cartographic[], Void> promise = Cesium.sampleTerrainMostDetailed(terrainProvider, positions);
promise.then(new Fulfill<Cartographic[]>() {
{@literal @}Override
public void onFulfilled(Cartographic[] updatedPositions) {
//
}
});
@JsMethod(namespace="Cesium", name="destroyObject") public static void destroyObject(Object object)
object
- The object to destroy.@JsMethod(namespace="Cesium", name="destroyObject") public static void destroyObject(Object object, String message)
object
- The object to destroy.message
- The message to include in the exception that is thrown if a destroyed object's function is called.@JsMethod(namespace="Cesium", name="createWorldTerrain") public static CesiumTerrainProvider createWorldTerrain()
CesiumTerrainProvider
instance for the Cesium World Terrain.CesiumTerrainProvider
instance for the Cesium World Terrain.@JsMethod(namespace="Cesium", name="createWorldTerrain") public static CesiumTerrainProvider createWorldTerrain(Cesium.CreateWorldTerrainOptions options)
CesiumTerrainProvider
instance for the Cesium World Terrain.options
- Cesium.CreateWorldTerrainOptions
object.CesiumTerrainProvider
instance for the Cesium World Terrain.@JsMethod(namespace="Cesium", name="exportKml") public static Promise<JsObject,Void> exportKml(Cesium.ExportKmlOptions options)
SampledProperty
otherwise we sample the value using the options.sampleDuration. Point, Billboard, Model
and Path geometries with time-dynamic positions will be exported as gx:Track Features.
Not all Materials are representable in KML, so for more advanced Materials just the primary color is used.
Canvas objects are exported as PNG images.options
- object with propertiesCopyright © 2019. All rights reserved.