Skyline

new SuperMap3D.Skyline(scene)

Skyline Analysis. The position of the observer and the direction of observation can be set, and the analysis results can be obtained in the scene.
Name Type Description
scene Object optional
Throws:
Example:
//create skyline analysis
var skyline= new SuperMap3D.Skyline(scene);
Demo:

Members

color : Color

Get or Set the color
Example:
var skyline= new SuperMap3D.Skyline(scene);
var color = new SuperMap3D.Color(0, 1, 0);
 //Set color
 skyline.color = color;
 //Get color
 var value= skyline.color ;

direction : Number

Get or set the angle between the camera and true north. Unit: degree, value range 0-360.
Example:
var skyline= new SuperMap3D.Skyline(scene);
            // set direction
            skyline.direction = 1.0;
            //get direction
var value= skyline.direction ;

displayMode : Number

Get or set the display mode of lines and areas. When the value is 0, it is displayed as a line; when the value is 1, it is displayed as a surface. The default is line.
Default Value: 0

displayStyle : Number

Gets or sets the display mode of the skyline. DisplayMode.LINE indicates the line mode of the skyline, and DisplayMode.FACE indicates the face mode of the skyline.
Example:
var skyline= new SuperMap3D.Skyline(scene);
        //Set the display mode
        skyline.displayStyle = SuperMap3D.Skyline.displayMode.LINE;
        // get display mode
var value= skyline.displayStyle ;

ignoreGlobe : Boolean

Whether the earth's surface participates in the skyline analysis, the default value is false, which means participating, and when set to true, it means not participating.

lineWidth : Number

Set the width of the skyline, the default is 1 pixel.
Default Value: 1

pitch : Number

Get or set the pitch angle of the camera, which is the angle between the camera direction and the water surface direction. Unit: degree, the value range is 0-90.
Example:
var skyline= new SuperMap3D.Skyline(scene);
        //Set pitch angle
        skyline. pitch = 1.0;
        //Get pitch angle
var value= skyline.pitch;

radius : Number

Get or set the skyline analysis radius, unit: meter. The default is -1.0, which means infinity.
Default Value: -1.0

viewPosition : Array

Get or Set the viewPosition
Example:
var skyline= new SuperMap3D.Skyline(scene);
        //Set the position of the observer
        skyline. viewPosition = [120, 40, 100];
        // Get the position of the observer
var value= skyline.viewPosition;

Methods

addLimitbody(options)Boolean

Add height limit volume objects for skyline analysis, simulating the height range of new buildings without affecting the skyline.
Name Type Description
options Object Objects have the following properties:
Name Type Description
position Array Specify the location information of the height limit body, represented by an array of longitude and latitude
name String Specifies the height limit body name.
Returns:
Returns true if the addition is successful, and returns false if it fails.

build()

Perform skyline analysis.
Example:
var skyline= new SuperMap3D.Skyline(scene);
skyline.bulid();

clear()

Clear the skyline and height limit objects in the current scene.

getObjectIds()Object

Get the IDS collection of obstacle objects.
Returns:
Returns a k-v object, the key is the S3M layer ID, and the value is the object IDS array.

getSkyline2D()Object

Output the 2D skyline analysis results.
Returns:
A 2D line, represented by an x/y array.

getSkyline3D()Object

Output 3D skyline analysis results.
Returns:
A 3D line, represented by an x/y/z array.

getSkylineSectorParameter()Object

Obtain the construction parameters of the skyline closure, including the 3D skyline and the position of the observation point.
Returns:

getVisibleInViewport(index)Boolean

Gets the visibility of skyline analysis results in the specified viewport.
Name Type Description
index Number The specified viewport index.
Returns:
visibility
Throws:

removeAllLimitBody()

Removes all height bound objects.

removeLimitbody(name)Boolean

Remove the height limit object with the specified name.
Name Type Description
name String The name of the height limit body to be removed.
Returns:
If the removal is successful, return true, and if it fails, return false.

setVisibleInViewport(index)

Sets the visibility of skyline analysis results in the specified viewport.
Name Type Description
index Number Sets the visibility of skyline analysis results in the specified viewport.
Throws: