JSInstanceObject

Creating and modifying instance draw objects.

Create the Module.createInstanceObject API.

let instanceObject = Module.createInstanceObject("object");

Function

getId() → string

Returns the Key of the object.

  • Return

    • string: Successful return of the object's Key string.

    • null: If the object is null.

getIntersectObjects(parameter) → error

Returns an array of items that intersect with the instance object and the line input.

Define the line to check as a list of coordinates and pass it in the parameter variable.

Name
Type
Description

parameter

Information to check for intersections.

  • Return

    • .result: API success status (1: Success, 0: Failure).

    • .name: Operating API name.

    • .return: API return information (object: normal return value, string: failure error code).

Getter / Setter

getAlpha(), setAlpha(alpha) → number

Sets the opacity of the instance object.

Name
Type
Description

alpha

number

Set the alpha value.

  • Return

    • Returns the opacity of the object.

getDescription(), setDescription(desc) → string

Set a description for the object.

Name
Type
Description

desc

string

Object description string.

  • Return

    • string: Successful return of the object's description string.

    • null: If the object is null.

getName(), setName(name) → string

Sets the name of the object.

Name
Type
Description

name

string

The name to set for the object.

  • Return

    • string: Successful return of the object's name.

    • null: If the object is null.

getVisible(), setVisible(visible) → boolean

Sets the visibility state of an object.

Name
Type
Description

visible

boolean

true: Make the object visible. false: Hide the object.

  • Return

    • true: Object visible state.

    • false: Object hidden state.

Type Definitions

JSInstanceObject.IntersectObjectsParameter

Name
Type
Default
Description

objectType

string

"line"

Defines the type of the input object.

JSInstanceObject.IntersectObjectsParameter.coordinates

Name
Type
Description

style

string

Coordinate transformation type. An error occurs if it does not correspond to one of the four types below. XY: Latitude and longitude array values [x, y], [x, y] XYZ: Latitude, longitude, and altitude array values [x, y, z], [x, y, z] XYZARRAY: Latitude, longitude, and altitude array values [x, y, z, x, y, z] JSVector3D: Latitude, longitude, and altitude JSVec3Array array values

coordinates

number

List of coordinates.

Last updated