ProjectionImage

new SuperMap3D.ProjectionImage(scene)

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:
Example:
//Create a video cast
var projectionImagee= new SuperMap3D.ProjectionImage(scene);.

Members

direction : Number

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°.

distance : Number

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.

horizontalFov : Number

Get or set the horizontal viewing angle range of the projector during video delivery, unit: degree.

pitch : Number

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.

verticalFov : Number

Get or set the vertical viewing angle range of the projector during video delivery, unit: degree.

viewPosition : Array

Gets or sets the position of the video delivery observer. A location is represented by an array of longitude, latitude, and elevation.

visible : Boolean

Get or set whether the video delivery is visible, the default is true.
Default Value: true

visibleDistanceMax : Number

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

staticSuperMap3D.ProjectionImage.fromInfo(scene, infoUrl, baseUrl)*

Read multiple videos from the file, that is, add multiple videos at the same time through the file for serving.
Name Type Description
scene Scene The scene where the delivery is made
infoUrl String The address or path of the attribute information file of the video
baseUrl String 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/')

addClipRegion(options)Boolean

Add clipping polygons.
Name Type Description
options Object The parameter object contains the following properties:
Name Type Description
name String the name of the polygon
position Cartesian3 position of the polygon
Returns:
Whether the polygon is added successfully

build()

Perform video delivery analysis.

getVisibleInViewport(index)Boolean

Gets the visibility of the video delivery analysis in the specified viewport.
Name Type Description
index Number The specified viewport index.
Returns:
visible
Throws:

pixelToWorldCoordinates(x, y)Cartesian3

Image pixel coordinates to world coordinates.
Name Type Description
x Cartesian3 optional
y Cartesian3 optional
Returns:
The world coordinates corresponding to the image pixel position

removeAllClipRegion()Boolean

Delete all polygons.
Returns:
Is it deleted successfully

removeClipRegion(name)Boolean

Deletes the polygon with the specified name.
Name Type Description
name String optional polygon name
Returns:
Is it deleted successfully

setClipMode(mode)Boolean

Set cropping mode.
Name Type Description
mode ModifyRegionMode optional cropping mode
Returns:
Is it added successfully?

setDistDirByPoint(position)

Set direction by point's [longitude, latitude, altitude].
Name Type Description
position Array optional location
Throws:
  • DeveloperError : Position is [longitude, latitude, altitude] and is not equal to viewPosition.

setFusionLayers(layers)

Set the S3M layer for image fusion
Name Type Description
layers Array S3M layer

setImage(options)

Sets the image or video object used for serving.
Name Type Description
options Object Objects have the following properties:
Name Type Description
url Array Specifies the address of the image resource.
video Object Specify the address of the video, currently only supports *.webm format video, currently only supports .webm.
Throws:

setInfo(url)*

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
url String The address of the file where location information is stored.
Returns:

setVisibleInViewport(index)

Sets the visibility of video delivery analytics in the specified viewport.
Name Type Description
index Number The specified viewport index.
Throws: