Interface: IDataProvider
api.IDataProvider
interface
IDataProvider
Interface describing data provider members.
This is a specification for implementers to model: it is not an exported method or class.
fires
datacreate
#
Hierarchy↳
IDataProvider
#
Implemented by#
Events#
on• on(type
, handler
): void
Fired when data has been created in the data provider after initial load.
example
// Initialize the data providerclass MyDataProvider extends DataProviderBase { // implementation}var provider = new MyDataProvider();// Set an event listenerprovider.on("datacreate", function() { console.log("A datacreate event has occurred.");});
#
ParametersName | Type |
---|---|
type | "datacreate" |
handler | (event : ProviderCellEvent ) => void |
#
Returnsvoid
#
Overrides#
Defined inapi/interfaces/IDataProvider.ts:215
#
Properties#
geometry• geometry: IGeometryProvider
Get geometry property.
returns
Geometry provider instance.
#
Defined inapi/interfaces/IDataProvider.ts:33
#
Methods#
fireâ–¸ fire(type
, event
): void
Fire when data has been created in the data provider after initial load.
example
// Initialize the data providerclass MyDataProvider extends DataProviderBase { // Class implementation}var provider = new MyDataProvider();// Create the eventvar cellIds = [ // Determine updated cells ];var target = provider;var type = "datacreate";var event = { cellIds, target, type,};// Fire the eventprovider.fire(type, event);
#
ParametersName | Type | Description |
---|---|---|
type | "datacreate" | datacreate |
event | ProviderCellEvent | Provider cell event |
#
Returnsvoid
#
OverridesEventEmitter.fire
#
Defined in../doc/api/interfaces/IDataProvider.ts:62
â–¸ fire<T
>(type
, event
): void
#
Type parametersName |
---|
T |
#
ParametersName | Type |
---|---|
type | "datacreate" |
event | T |
#
Returnsvoid
#
OverridesEventEmitter.fire
#
Defined in../doc/api/interfaces/IDataProvider.ts:71
#
getClusterâ–¸ getCluster(url
, abort?
): Promise
<ClusterContract
>
Get a cluster reconstruction.
throws
Rejects the promise on errors.
#
ParametersName | Type | Description |
---|---|---|
url | string | URL for the cluster reconstruction to retrieve. |
abort? | Promise <void > | - |
#
ReturnsPromise
<ClusterContract
>
Promise to the cluster reconstruction.
#
Defined inapi/interfaces/IDataProvider.ts:98
#
getCoreImagesâ–¸ getCoreImages(cellId
): Promise
<CoreImagesContract
>
Get core images in a geometry cell.
throws
Rejects the promise on errors.
#
ParametersName | Type | Description |
---|---|---|
cellId | string | The id of the geometry cell. |
#
ReturnsPromise
<CoreImagesContract
>
Promise to the core images of the requested geometry cell id.
#
Defined inapi/interfaces/IDataProvider.ts:84
#
getImageBufferâ–¸ getImageBuffer(url
, abort?
): Promise
<ArrayBuffer
>
Get an image as an array buffer.
throws
Rejects the promise on errors.
#
ParametersName | Type | Description |
---|---|---|
url | string | URL for image to retrieve. |
abort? | Promise <void > | - |
#
ReturnsPromise
<ArrayBuffer
>
Promise to the array buffer containing the image.
#
Defined inapi/interfaces/IDataProvider.ts:136
#
getImageTilesâ–¸ getImageTiles(tiles
): Promise
<ImageTilesContract
>
Get image tiles urls for a tile level.
throws
Rejects the promise on errors.
example
var tileRequest = { imageId: 'image-id', z: 12 };provider.getImageTiles(tileRequest) .then((response) => console.log(response));
#
ParametersName | Type | Description |
---|---|---|
tiles | ImageTilesRequestContract | Tiles to request |
#
ReturnsPromise
<ImageTilesContract
>
Promise to the image tiles response contract
#
Defined inapi/interfaces/IDataProvider.ts:155
#
getImagesâ–¸ getImages(imageIds
): Promise
<ImagesContract
>
Get complete images.
throws
Rejects the promise on errors.
#
ParametersName | Type | Description |
---|---|---|
imageIds | string [] | The ids for the images to retrieve. |
#
ReturnsPromise
<ImagesContract
>
Promise to the images of the requested image ids.
#
Defined inapi/interfaces/IDataProvider.ts:123
#
getMeshâ–¸ getMesh(url
, abort?
): Promise
<MeshContract
>
Get a mesh.
throws
Rejects the promise on errors.
#
ParametersName | Type | Description |
---|---|---|
url | string | URL for mesh to retrieve. |
abort? | Promise <void > | - |
#
ReturnsPromise
<MeshContract
>
Promise to the mesh.
#
Defined inapi/interfaces/IDataProvider.ts:167
#
getSequenceâ–¸ getSequence(sequenceId
): Promise
<SequenceEnt
>
Get sequence.
throws
Rejects the promise on errors.
#
ParametersName | Type | Description |
---|---|---|
sequenceId | string | The id for the sequence to retrieve. |
#
ReturnsPromise
<SequenceEnt
>
Promise to the sequences of the requested image ids.
#
Defined inapi/interfaces/IDataProvider.ts:180
#
getSpatialImagesâ–¸ getSpatialImages(imageIds
): Promise
<SpatialImagesContract
>
Get spatial images.
throws
Rejects the promise on errors.
#
ParametersName | Type | Description |
---|---|---|
imageIds | string [] | The ids for the images to retrieve. |
#
ReturnsPromise
<SpatialImagesContract
>
Promise to the spatial images of the requested image ids.
#
Defined inapi/interfaces/IDataProvider.ts:111
#
offâ–¸ off(type
, handler
): void
Unsubscribe from an event by its name.
#
ParametersName | Type |
---|---|
type | "datacreate" |
handler | (event : ProviderCellEvent ) => void |
#
Returnsvoid
#
Overrides#
Defined in../doc/api/interfaces/IDataProvider.ts:182
#
setAccessTokenâ–¸ setAccessToken(accessToken?
): void
Set an access token for authenticated API requests of protected resources.
#
ParametersName | Type |
---|---|
accessToken? | string |
#
Returnsvoid