📋
XDWorld_WebGL_Manual
  • 소개
    • XDWorld API
    • 시작하기
    • About EGIS
    • Release Note
      • 2.1x 버전 업데이트
      • 2.x 버전 업데이트
      • 1.6x 버전 업데이트
      • 1.5x 버전 업데이트
      • 1.4x 버전 업데이트
      • 1.3x 버전 업데이트
      • 이전 버전 업데이트
    • Tutorial
      • 카메라 설정
      • POI 생성하기
      • 폴리곤 생성하기
      • 라인 생성하기
      • 모델 추가하기
      • 레이어 설정
      • 배경 지도 설정
      • 거리 측정
      • 면적 측정
      • 높이 측정
      • 반경 측정
  • API
    • Module
    • Core
      • Collection
      • JSAABBox3D
      • JSColor
      • JSLine3D
      • JSSize2D
      • JSSize3D
      • JSVector2D
      • JSVector3D
      • JSVec2Array
      • JSVec3Array
      • JSDateTime
    • Analysis
      • JSAnalysis
      • JSAnalysisGridShadow
      • JSEarthquake
      • JSEditTerrain
      • JSFlood
      • JSGridAnal
      • JSSightAnalysis
      • JSSlope
      • JSTransparency
      • JSSolarManager
    • Camera
      • JSCamera
    • Layer
      • JSLayer
      • JSLayerList
      • JSImageryProvider
    • Map
      • JSMap
      • JSTerrain
      • JSIndexMap
    • Object
      • JSObject
      • JSAntenna
      • JSArrow
      • JSBarGraph
      • JSBarGraph3D
      • JSBillboard
      • JSColorGrid
      • JSColorGrid3D
      • JSColorPolygon
      • JSFigure
      • JSFlow
      • JSFlowPolygon
      • JSGhostSymbol
      • JSGhostSymbolMap
      • JSHTMLObject
      • JSIcon
      • JSInstanceObject
      • JSLineString
      • JSMultiCube
      • JSMultiPoint
      • JSPipe
      • JSPoint
      • JSPointGraph
      • JSPolygon
      • JSPolygonStyle
      • JSPolyLineStyle
      • JSReal3D
      • JSSurfaceGraph
      • JSSymbol
      • JSTimeSeriesObject
      • JSTraceTarget
      • JSTyphoon
      • JSVideoObject
      • JSViewFrustum
    • Option
      • JSControl
      • JSNavigationControl
      • JSOption
    • ETC
      • JSMath
      • JSProj
      • ~~JSProjection~~
      • SOPObject
      • EVENT
      • Type List
      • Tag List
Powered by GitBook
On this page
  • Properties
  • Funtion
  • callBackAddPoint(event) → string
  • callBackCompletePoint(event) → string
  • SetAreaMeasurePolygonDepthBuffer(type) → boolean
  • SetDistanceMeasureLineDepthBuffer(type) → boolean
  • setSlideScreenCount(value) → boolean
  • setTwoSlideScreenDivideRate(value) → boolean
  • setTwoSlideScreenLayerList(leftName, rightName) → number
  • setTextureCapacityLimit(limit)
  • setPickingCalculateType(type) → boolean
  • setMaxRequestTileMeshSize(size)
  • setAtmosphericSunriseTime(hour, minute)
  • setAtmosphericSunsetTime(hour, minute)
  • setAtmosphericTime(hour, minute)

Was this helpful?

  1. API
  2. Option

JSOption

지도 내 환경 옵션을 설정하기 위한 API 입니다.

PreviousJSNavigationControlNextETC

Last updated 1 month ago

Was this helpful?

Module.getOption() API를 생성합니다

var math = Module.getOption();

Properties

Name
Type
Description

object_ahead

number

reflect

number

오브젝트 반사 효과 맵 생성 여부

backgroundColor

JSColor

지도 기본 배경 색상

Funtion

callBackAddPoint(event) → string

측정 기능(거리, 면적 등) 동작 시 마우스 클릭 이벤트에 발생하는 콜백 함수를 추가합니다.

입력 변수값(event)에서 선언된 매개 변수를 통해 입력된 위치, 이전 위치와의 거리, 총길이를 제공합니다.

Name
Type
Description

event

function

콜백 함수.

  • Return

    • "success" : 추가 성공.

    • "error map load" : 정상적으로 지도가 생성되지 못한 경우.

    • "error { callback } Undefined" : 콜백 함수가 Undefined으로 입력된 경우.

    • "error { callback } null" : 콜백 함수가 없는 경우.

    • "error { callback } Type Mismatch" : 입력된 event가 function 타입이 아닌경우.

  • Sample

    • the function init 참조.

function addPoint(e) {
    console.log(e);
}

Module.getOption().callBackAddPoint(addPoint);

callBackCompletePoint(event) → string

측정 기능(거리, 면적 등) 종료 시 발생하는 콜백 함수를 추가합니다.

입력 변수값(event)에서 선언된 매개 변수를 통해 측정 객체의 고유 명칭을 제공합니다.

Name
Type
Description

event

function

콜백 함수.

  • Return

    • "success" : 추가 성공.

    • "error map load" : 정상적으로 지도가 생성되지 못한 경우.

    • "error { callback } Undefined" : 콜백 함수가 Undefined으로 입력된 경우.

    • "error { callback } null" : 콜백 함수가 없는 경우.

    • "error { callback } Type Mismatch" : 입력된 event가 function 타입이 아닌경우.

  • Sample

    • the function init 참조.

function endPoint(e) {
    console.log(e);
}

Module.getOption().callBackCompletePoint(endPoint);

SetAreaMeasurePolygonDepthBuffer(type) → boolean

면적 측정 동작 시 생성된 객체의 depth 설정합니다.

depth 미 설정 시 객체 겹침 시 z-fighting 현상 발생합니다.

Name
Type
Description

type

boolean

true: depth 미설정. false: depth 설정.

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

  • Sample

    • the function init 참조.

Module.getOption().SetAreaMeasurePolygonDepthBuffer(false);
// ... or ...
Module.getOption().SetAreaMeasurePolygonDepthBuffer(true);

SetDistanceMeasureLineDepthBuffer(type) → boolean

거리 측정 동작 시 생성된 객체의 depth 설정합니다.

depth 미 설정 시 객체 겹침 시 z-fighting 현상 발생합니다.

Name
Type
Description

type

boolean

true: depth 미설정. false: depth 설정.

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

  • Sample

    • the function init 참조.

Module.getOption().SetDistanceMeasureLineDepthBuffer(false);
or;
Module.getOption().SetDistanceMeasureLineDepthBuffer(ture);

setSlideScreenCount(value) → boolean

화면 분할을 설정합니다.

입력 변수값(value)은 1(단일화면), 2(분할화면) 필수 설정.

Name
Type
Description

value

number

화면 분활 갯수.

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

  • Sample

    • the function setSplitScreen 참조.

Module.getOption().setSlideScreenCount(1);
or;
Module.getOption().setSlideScreenCount(2);

setTwoSlideScreenDivideRate(value) → boolean

화면 분활 비율을 설정합니다.

입력 변수값(value)은 0~1 사이 값으로 설정합니다..

Name
Type
Description

value

number

화면 비율 설정.

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

  • Sample

    • the function setSplitScreen 참조.

Module.getOption().setTwoSlideScreenDivideRate(0~1);

setTwoSlideScreenLayerList(leftName, rightName) → number

분활된 화면에 대해 출력할 레이어를 설정합니다.

입력 변수값(leftName) 다중 레이어 설정 시 "레이어명칭(1st),레이어명칭(2st)"으로 설정합니다.

입력 변수값(rightName) 다중 레이어 설정 시 "레이어명칭(1st),레이어명칭(2st)"으로 설정합니다.

Name
Type
Description

leftName

number

왼쪽 화면 가시화 레이어 명칭 목록.

rightName

number

오른쪽 화면 가시화 레이어 명칭 목록.

  • Return

    • result>0 : 설정된 레이어 총 갯수 반환.

    • result==0 : 등록된 레이어 없음.

  • Sample

    • the function setSplitScreen 참조.

Module.getOption().setTwoSlideScreenLayerList("Left_Layer_1,Left_Layer_2", "Right_Layer_1");

setTextureCapacityLimit(limit)

텍스처 용량 제한 사용 여부를 설정합니다.

Name
Type
Description

limit

boolean

true: 제한 사용 false: 제한 미사용

  • Return

    • 없음.

Module.getOption().setTextureCapacityLimit(true);
// 또는
Module.getOption().setTextureCapacityLimit(false);

setPickingCalculateType(type) → boolean

오브젝트 선택(Picking) 처리 시 계산 방식을 설정합니다.

선택 가능한 방식은 다음과 같습니다:

  • 0: Ray 방식 (기본값)

  • 1: Color Map 방식

Name
Type
Description

type

number

0: Ray 방식 1: Color Map 방식

  • Return

    • true: 설정 성공

    • false: 지도 로드 실패 또는 설정 실패

// Ray 기반 Picking 사용
Module.getOption().setPickingCalculateType(0);

// Color Map 기반 Picking 사용
Module.getOption().setPickingCalculateType(1);

setMaxRequestTileMeshSize(size)

타일 메시 요청 시 동시에 처리할 최대 요청 개수를 설정합니다.

값이 0보다 작으면 0으로, 50보다 크면 50으로 자동 조정됩니다.

Name
Type
Description

size

number

동시에 처리할 타일 메시 요청 최대 개수.

  • 설정 가능한 범위: 0 ~ 50

// 최대 20개까지 타일 메시 요청 처리
Module.getOption().setMaxRequestTileMeshSize(20);

setAtmosphericSunriseTime(hour, minute)

대기 효과 적용 시 일출 시간을 설정합니다.

태양 위치 연산에 사용되며, 시각은 24시간제로 입력합니다.

Name
Type
Description

hour

number

일출 시(hour). 0~23

minute

number

일출 분(minute). 0~59

  • 유효하지 않은 시간 값은 무시됩니다.

  • 대기광 효과가 활성화된 상태에서 적용됩니다.

// 일출 시간을 오전 6시 30분으로 설정
Module.getOption().setAtmosphericSunriseTime(6, 30);

setAtmosphericSunsetTime(hour, minute)

대기 효과 적용 시 일몰 시간을 설정합니다.

태양 위치 연산에 사용되며, 시각은 24시간제로 입력합니다.

Name
Type
Description

hour

number

일몰 시(hour). 0~23

minute

number

일몰 분(minute). 0~59

  • 유효하지 않은 시간 값은 무시됩니다.

  • 대기광 효과가 활성화된 상태에서 적용됩니다.

// 일몰 시간을 오후 7시 15분으로 설정
Module.getOption().setAtmosphericSunsetTime(19, 15);

setAtmosphericTime(hour, minute)

대기 효과 적용 시 현재 시간을 설정하여 하늘 색상 변화를 조정합니다.

설정된 시간은 일출/일몰 및 하늘 색상 변화에 영향을 줍니다.

Name
Type
Description

hour

number

현재 시각(hour), 0~23

minute

number

현재 분(minute), 0~59

  • 유효하지 않은 시간 값은 무시됩니다.

  • 대기광 효과가 활성화된 상태에서 적용됩니다.

  • 일출(setAtmosphericSunriseTime) / 일몰(setAtmosphericSunsetTime) 시간과 함께 사용하면 하늘 색상 전환 효과를 더 자연스럽게 조절할 수 있습니다.

// 현재 시각을 오후 4시 30분으로 설정
Module.getOption().setAtmosphericTime(16, 30);

화면 시야 기준 , HTMLObject 객체 앞 장해물(지형, 시설물) 존재 시 가시화 유무 설정. 0: 기본 가시화. 1: 장해물 판별.

Sandbox_Distance Measurement
Sandbox_Distance Measurement
Sandbox_Area Measurement
Sandbox_Distance Measurement
Sandbox_Screen Split
Sandbox_Screen Split
Sandbox_Screen Split
JSPoint