JSObject

지도 내 형태에 따라 다양한 객체가 존재하고 JSObject는 이런 다양한 객체를 포괄적으로 관리하기 위한 API 입니다.

객체 프로토 타입 API.

properties

Name
Type
Description

position

객체 중심 좌표

layer

string

객체 부모 레이어 이름

object_ahead

boolean

지형 또는 시설물이 앞에 존재할 경우 비가시화 옵션

Function

getId() → string

객체의 고유 명칭을 반환 합니다.

  • Return

    • string: 객체 설명 문자열이 성공적으로 반환.

    • null: 객체가 null인 경우.

getLayerName() → string

객체 부모 레이어의 이름을 반환 합니다.

  • Return

    • string: 객체 부모 레이어의 이름이 성공적으로 반환.

    • null: 객체가 null인 경우.

getObjectType() → number

객체의 타입을 반환 합니다.

  • Return

    • number: 객체의 타입이 성공적으로 반환.

    • -1: 객체가 null인 경우.

getCenter() → JSVector3D

객체의 중심 좌표를 반환합니다.

  • Return

    • JSVector3D: 객체의 중심 반환.

    • null: 객체가 null인 경우.

Getter / Setter

getDescription(), setDescription(desc) → string

객체에 대한 설명을 설정합니다.

Name
Type
Description

desc

string

설명 문자열.

  • Return

    • string: 객체 설명 문자열이 성공적으로 반환.

    • null: 객체가 null인 경우.

getName(), setName(name) → string

객체 이름을 설정합니다.

Name
Type
Description

name

string

객체 이름.

  • Return

    • string: 객체 이름을 성공적을 반환

    • null: 객체가 null인 경우.

getSelectable(), setSelectable(select) → boolean

객체의 선택(Selecting) 가능 여부를 설정합니다.

Name
Type
Description

select

boolean

true: 객체 선택 가능. false: 객체 선택 불가.

  • Return

    • true : 설정 성공

    • false : 설정 실패 (객체가 null인 경우 등)

getVisible(), setVisible(visible) → boolean

객체의 가시화 유무를 설정합니다.

Name
Type
Description

visible

boolean

true: 객체 가시화. false: 객체 비가시화.

  • Return

    • true: 객체 가시화 상태.

    • false: 객체 비가시화 상태.

getPickable(), setPickable(value) → boolean

객체의 피킹(Picking) 가능 여부를 설정합니다. 피킹 기능이 활성화된 경우, 마우스 이벤트 또는 선택 연산 시 해당 객체를 대상으로 인식할 수 있습니다.

Name
Type
Description

value

boolean

true: 피킹 가능, false: 피킹 불가

  • Return

    • true : 설정 성공

    • false : 설정 실패 (객체가 null인 경우 등)

getUnderground(underground), setUnderground(value) → void

객체가 지형 높이와의 관계를 설정 및 반환합니다.

Name
Type
Description

underground

number

0: 미정의. 1: 지형 위. 2: 지형 아래. 3: 지형 가운데.

Last updated

Was this helpful?