GeoVideoLayer
method
addVideoCameras
Add a virtual camera corresponding to the video according to the camera parameters.
parameter
| name | type | describe | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| camerasData | Object/Array[Object] | RequiredThe camera parameter object or object group that needs to be added.
|
getViewPoint
Get the viewpoint of the current window, the return value can be usedsetViewPointinterface.
setVideoCameraActiveByIndex
Set the camera to start based on the index.
parameter
| name | type | describe |
|---|---|---|
| active | Bollean | RequiredSet the opening and hiding of the camera screen, true Indicates open. |
| index | Number | RequiredCamera index sequence. |
Case
let models_geo = ["ATModelNew.glb"].map(item => ({
type: 'glb',
url: "../example_data/aoti_models/" + item
}));
let options = {
id: 'model_id1',
type: 'geoVideo',
models: models_geo,
exposure: 1.2,
center: [120.744471002000068, 31.306768408000039, 3.617],
project: "3857",
cameraData: cameraData,
callback: function (geoVideo) {
GeoVideo = geoVideo;
}
}
map.addLayer(options);
map.on('click', function (e) {
GeoVideo.setVideoCameraActiveByIndex(0, true);
GeoVideo.setViewPoint(viewData)
})
refer to Example。
setViewPoint
Set the map viewshed based on viewpoint information.
parameter
| name | type | describe | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| viewData | Object | RequiredViewpoint information object.
|