📋
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
  • Function
  • getId() → string
  • SetVerticalPlane(coordinates, parts, height, startColor, endColor) → boolean
  • SetCullMode(type) → boolean
  • Getter / Setter
  • getDescription(), setDescription(desc) → string
  • getName(), setName(name) → string
  • getVisible(), setVisible(visible) → boolean

Was this helpful?

  1. API
  2. Object

JSColorPolygon

지도 내 그라데이션 폴리곤 객체를 생성 및 설정하기 위한 API 입니다.

PreviousJSColorGrid3DNextJSFigure

Last updated 12 months ago

Was this helpful?

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

var colorPolygon = Module.createColorPolygon("ID");

Function

getId() → string

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

  • Return

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

    • null: 객체가 null인 경우.

let parameter = object.getId();

SetVerticalPlane(coordinates, parts, height, startColor, endColor) → boolean

수직 벽 폴리곤 객체를 생성합니다.

Name
Type
Description

coordinates

폴리곤 경위도 좌표 목록.

parts

폴리곤 구성 점정 개수 목록.

height

number

폴리곤 높이.

startColor

그라데이션 시작 색상.

endColor

그라데이션 끝 색상.

  • Return

    • true : 생성 성공.

    • false : 생성 실패.

    • 실패 조건

      • 입력된 coordinates 구성요소가 없거나 정점 개수가 2개 이하인 경우.

      • 입력된 parts 구성요소가 없거나 1개 이하인 경우.

  • Sample

    • function createVerticalPlane 참조.

var colorPolygon = Module.createColorPolygon("TEST_VERTICAL_POLYGON");

var basePositions = [
    [129.12599597147187, 35.17339329004985, 50.0],
    [129.1264736891435, 35.172432534300555, 50.0],
    [129.12705822860582, 35.172119138064076, 50.0],
    [129.12837813524428, 35.17198042514761, 50.0],
    [129.12925806742587, 35.171677294599604, 50.0],
    [129.13014427905534, 35.1712405752301, 50.0],
    [129.13067851056573, 35.170639446735436, 50.0],
];

var coordinates = new Module.JSVec3Array();
var parts = new Module.Collection();

for (var i = 0; i < basePositions.length; i++) {
    coordinates.push(new Module.JSVector3D(basePositions[i][0], basePositions[i][1], basePositions[i][2]));
}
parts.add(basePositions.length);

colorPolygon.SetVerticalPlane(coordinates, parts, -50.0, new Module.JSColor(0, 255, 255, 0), new Module.JSColor(255, 255, 0, 0));

SetCullMode(type) → boolean

수직 벽면 폴리곤 컬링 옵션 설정.

type 입력 값에 따른 컬링 옵션은 0(양면), 1(양면), 2(CW) 3(CCW).

컬링 옵션 초기 설정 3.

Name
Type
Description

type

number

폴리곤 컬링모드

  • Return

    • true : 설정 성공.

    • false : 설정 실패.

  • Sample

    • function createVerticalPlane 참조.

Getter / Setter

getDescription(), setDescription(desc) → string

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

Name
Type
Description

desc

string

설명 문자열.

  • Return

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

    • null: 객체가 null인 경우.

var strDesc = object.getDescription();
// ... or ...
object.setDescription("First Object.");

getName(), setName(name) → string

객체 이름을 설정합니다.

Name
Type
Description

name

string

객체 이름.

  • Return

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

    • null: 객체가 null인 경우.

var objName = object.getName();
// ... or ...
object.setName("MyObject");

getVisible(), setVisible(visible) → boolean

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

Name
Type
Description

visible

boolean

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

  • Return

    • true: 객체 가시화 상태.

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

var objName = object.getName();
// ... or ...
object.setVisible(true);

Sandbox_Polygon Gradient
Sandbox_Polygon Gradient
JSVec3Array
Collection
JSColor
JSColor