Class: ImageDrapingLayer

ImageDrapingLayer(properties, properties)

new ImageDrapingLayer(properties, properties)

Parameters:
Name Type Description
properties Object
Properties
Name Type Attributes Default Description
location Array.<Number> [x,y]
orientation Object -
gimbalOrientation Object -
cameraModel Object -
Properties
Name Type Description
camProj Matrix3 -
camDistR Cartesian3 -
camDistT Cartesian2 -
icon String -
iconAnchor Array.<Number> <optional>
[16,16] -
imageSrc HTMLElement source canvas
getPlatformLocation function -
getPlatformOrientation function -
getGimbalOrientation function -
getCameraModel function -
getSnapshot function -
properties
Source:
Example
import ImageDrapingLayer from 'core/ui/layer/ImageDrapingLayer.js';

 let imageDrapingLayer = new ImageDrapingLayer({
      getPlatformLocation: {
        dataSourceIds: [platformLocationDataSource.getId()],
        handler: function (rec) {
          return {
            x: rec.loc.lon,
            y: rec.loc.lat,
            z: rec.loc.alt - 184
          };
        }
      },
      getPlatformOrientation: {
        dataSourceIds: [platformOrientationDataSource.getId()],
        handler: function (rec) {
          return {
            heading : rec.attitude.yaw,
            pitch: rec.attitude.pitch,
            roll: rec.attitude.roll
          };
        }
      },
      getGimbalOrientation: {
        dataSourceIds: [gimbalOrientationDataSource.getId()],
        handler: function (rec) {
          return {
            heading : rec.attitude.yaw,
            pitch: rec.attitude.pitch,
            roll: rec.attitude.roll
          };
        }
      },
      cameraModel: {
        camProj: new Matrix3(747.963/1280.,     0.0,       650.66/1280.,
          0.0,        769.576/738.,  373.206/738.,
          0.0,            0.0,          1.0),
        camDistR: new Cartesian3(-2.644e-01, 8.4e-02, 0.0),
        camDistT: new Cartesian2(-8.688e-04, 6.123e-04)
      },
      icon: 'images/car-location.png',
      iconAnchor: [16, 40],
      imageSrc: videoCanvas
    });

Extends

Methods

addFn(dataSourceIds, fn)

Adds a function associated to a list of dataSource ids
Parameters:
Name Type Description
dataSourceIds Array.<String> the list of datasources
fn function the function to add
Overrides:
Source:

clear()

Clear the layer.
Overrides:
Source:

getDataSourcesIds() → {Array.<String>}

Overrides:
Source:
Returns:
The list of dataSource ids
Type
Array.<String>

getId() → {String}

Gets the layer id.
Overrides:
Source:
Returns:
the layer id
Type
String

getProps() → {Object}

Clone current layer properties
Overrides:
Source:
Returns:
a shallow copy of current properties
Type
Object

init()

Inits the layer.
Overrides:
Source:

reset()

Reset to default Layer values
Overrides:
Source:

select(dataSourceIds)

Selects the datasource contained into the list
Parameters:
Name Type Description
dataSourceIds Array the list of datasources
Overrides:
Source:

setData(dataSourceId, records, options)

Parameters:
Name Type Description
dataSourceId
records Array.<Object>
options
Overrides:
Source: