Video delivery class. Putting pictures or videos into the scene can simulate the effect of advertising curtains on buildings or large-screen TVs.
| Name | Type | Description |
|---|---|---|
scene |
Object | optional Specifies the scene object for analysis. |
Throws:
-
DeveloperError : The scene scene must be specified.
Example:
//Create a video cast
var projectionImagee= new SuperMap3D.ProjectionImage(scene);.
Members
-
Get or set the azimuth of the projector when the video is delivered, that is, the angle between the clockwise direction and the true north direction, the value range: 0°~360°.
-
Gets or sets the distance from the observer to the projector.
-
hintLineColor : Color
-
Get or set the color of the prompt line when the video is running.
-
hintLineVisible : Color
-
Gets or sets the visibility of the prompt line when the video is served.
-
Get or set the horizontal viewing angle range of the projector during video delivery, unit: degree.
-
Get or set the pitch angle of the projector when the video is cast. The angle refers to the angle between the camera direction and the water surface direction. It is positive in orientation, and the unit is degree.
-
Get or set the vertical viewing angle range of the projector during video delivery, unit: degree.
-
Gets or sets the position of the video delivery observer. A location is represented by an array of longitude, latitude, and elevation.
-
Get or set whether the video delivery is visible, the default is true.
-
Default Value:
true -
Get or set the maximum visible distance for video delivery. (The maximum visible distance between the camera and the video placement location)
-
Default Value:
500
Methods
-
Read multiple videos from the file, that is, add multiple videos at the same time through the file for serving.
Name Type Description sceneScene The scene where the delivery is made infoUrlString The address or path of the attribute information file of the video baseUrlString optional base path. If added, It will be concatenated with the name of the video in the file to form a path. If not added, the parent path in the infoUrl file will be used as the baseUrl. Returns:
promise returns a promise containing the created ProjectionImage object.Example:
SuperMap3D.ProjectionImage.fromInfo(scene, './data/allprojectionInfo.xml', './media/') -
Add clipping polygons.
Name Type Description optionsObject The parameter object contains the following properties: Name Type Description nameString the name of the polygon positionCartesian3 position of the polygon Returns:
Whether the polygon is added successfully -
Perform video delivery analysis.
-
Gets the visibility of the video delivery analysis in the specified viewport.
Name Type Description indexNumber The specified viewport index. Returns:
visibleThrows:
-
DeveloperError : Index values range from 0-3。
-
-
pixelToWorldCoordinates(x, y) → Cartesian3
-
Image pixel coordinates to world coordinates.
Name Type Description xCartesian3 optional yCartesian3 optional Returns:
The world coordinates corresponding to the image pixel position -
Delete all polygons.
Returns:
Is it deleted successfully -
Deletes the polygon with the specified name.
Name Type Description nameString optional polygon name Returns:
Is it deleted successfully -
Set cropping mode.
Name Type Description modeModifyRegionMode optional cropping mode Returns:
Is it added successfully? -
Set direction by point's [longitude, latitude, altitude].
Name Type Description positionArray optional location Throws:
-
DeveloperError : Position is [longitude, latitude, altitude] and is not equal to viewPosition.
-
-
Set the S3M layer for image fusion
Name Type Description layersArray S3M layer -
Sets the image or video object used for serving.
Name Type Description optionsObject Objects have the following properties: Name Type Description urlArray Specifies the address of the image resource. videoObject Specify the address of the video, currently only supports *.webm format video, currently only supports .webm. Throws:
-
DeveloperError : options.url or options.video must be specified.
-
-
Set the location information of video delivery, which is stored in an .xml file, and set by reading the content of the file.
Name Type Description urlString The address of the file where location information is stored. Returns:
-
Sets the visibility of video delivery analytics in the specified viewport.
Name Type Description indexNumber The specified viewport index. Throws:
-
DeveloperError : index value range from 0-3。
-
