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. 
 
var strKey = object.getId();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.
- 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.
alpha
number
Set the alpha value.
- Return - Returns the opacity of the object. 
 
let instanceObject = Module.createInstanceObject("object");
let alpha = instanceObject.getAlpha();
// ... or ...
let instanceObject = Module.createInstanceObject("object");
instanceObject.setAlpha(0.5);getDescription(), setDescription(desc) → string
Set a description for the object.
desc
string
Object description string.
- Return - string: Successful return of the object's description string. 
- null: If the object is null. 
 
var strDesc = object.getDescription();
// ... or ...
object.setDescription("First Object.");getName(), setName(name) → string
Sets the name of the object.
name
string
The name to set for the object.
- Return - string: Successful return of the object's name. 
- null: If the object is null. 
 
var objName = object.getName();
// ... or ...
object.setName("MyObject");getVisible(), setVisible(visible) → boolean
Sets the visibility state of an object.
visible
boolean
true: Make the object visible. false: Hide the object.
- Return - true: Object visible state. 
- false: Object hidden state. 
 
var objName = object.getName();
// ... or ...
object.setVisible(true);Type Definitions
JSInstanceObject.IntersectObjectsParameter
objectType
string
"line"
Defines the type of the input object.
JSInstanceObject.IntersectObjectsParameter.coordinates
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
