GeOnDT GeOnDT for JS

Class: U2dVectorLayer

GeOnDT.vector. U2dVectorLayer

화면에 2D Vector를 생성하는 클래스

new U2dVectorLayer(opt)

화면에 2D Vector를 생성하는 클래스

Name Type Description
opt object

생성자 옵션

Name Type Default Description
fillColor Color #FFFFFF optional

도형내부 채움 색상

fillOpacity number 1.0 optional

도형내부 채움 투명도

strokeColor Color #000000 optional

도형 테두리(외곽선) 색상

strokeOpacity number 1.0 optional

도형 테두리(외곽선) 투명도

strokeWidth number 1.0 optional

도형 테두리(외곽선) 너비

minlevel number 15 optional

레이어 출력 최저 레벨

minlevel string 'EPSG:3857' optional

출력 도형 좌표계

proxyurl string './proxy.jsp?url=' optional

레이어 데이터 로드시 사용 proxy url

useproxy boolean true optional

프록시 사용 여부

ext string 'application/json' optional

WFS 이용시 데이터 타입

cql string optional

WFS 이용시 cql 필터 구문

key string optional

WFS 이용시 api key

styleFunction function optional

사용자 스타일 함수

Tutorials:

Methods

addGeometry(geom)

파라미터롤 받은 Geometry 객체를 추가하는 함수

Name Type Description
geom U2dGeometry

추가할 2D Geometry 객체

addGeometryAsGeojson(json, sourceCRS, callback)Promise

Geojson을 읽어 Geometry 객체를 추가하는 함수

Name Type Description
json Object

읽어올 Geojson Object

sourceCRS String optional

Geojson source의 CRS(Projection)

callback function optional

피쳐생성후 호출될 콜백, 생성된 피쳐가 파라메터로 넘겨집니다.

Returns:
Type Description
Promise promise

addGeometryAsWKT(wkt, sourceCRS, callback)Promise

WKT를 읽어 Geometry 객체를 추가하는 함수

Name Type Description
wkt String | Array

WKT 문자열

sourceCRS String optional

WKT source의 CRS(Projection)

callback function optional

피쳐생성후 호출될 콜백, 생성된 피쳐가 파라메터로 넘겨집니다.

Returns:
Type Description
Promise promise

clear()

전체 2D Geometry 객체를 제거하고 레이어를 비우는 함수

clearLabel()

전체 라벨을 제거하는 함수

createTexture(tile)

타일에 Texture를 생성하는 함수

Name Type Description
tile

타일

dispose()

getBoundingBox()Box3

레이어의 바운딩박스(Box3)를 반환하는 함수

Returns:
Type Description
Box3

getFeatures()Array

U2dVectorLayer의 Feature 목록을 반환하는 함수

Returns:
Type Description
Array Feature 목록

getGeometries()Array

생성된 전체 2D Geometry 객체 목록을 반환하는 함수

Returns:
Type Description
Array 2D Geometry 객체 목록

getIntersects(u2dGeometry)

파라미터로 입력받은 U2dGeometry와 교차되는 2D Geometry 객체를 반환하는 함수

Name Type Description
u2dGeometry U2dGeometry

교차 검색할 대상 U2dGeometry

Example
vectorLayer.getIntersects(new Union3D.geom.U2dPoint().setPosition([126.94215165535197, 37.519650370480015]));

hide()

U2dVectorLayer hide 함수

hideLabel()

U2dVectorLayer 전체 라벨을 hide하는 함수

isDataExist()

U2dVectorLayer의 Geometry 객체 데이터가 존재하는지 반환하는 함수

removeGeometry(geom)

파라미터로 입력받은 Geometry 객체를 제거하는 함수

Name Type Description
geom U2dGeometry

추가할 2D Geometry 객체

removeLabel(targetGeom)

지정한 2D 객체의 라벨을 제거하는 함수

Name Type Description
targetGeom Object | *

라벨을 제거할 2D 객체 (ex: U2dPoint, U2dLine, U2dPolygon...)

setLabel(targetGeom, label, zOffset)

지정한 2D 객체에 라벨을 붙이는 함수

Name Type Description
targetGeom Object | *

라벨을 붙일 2D 객체 (ex: U2dPoint, U2dLine, U2dPolygon...)

label String

라벨

zOffset Number

라벨 z축 offset

setStyle(opt)Promise

U2dVectorLayer 전체 2D 객체들의 스타일을 설정하는 함수

Name Type Description
opt

스타일 옵션

Name Type Description
fillColor

2D 객체 채우기 색

strokeColor

2D 객체 외곽선 색

strokeWidth

2D 객체 외관선 두께

Returns:
Type Description
Promise promise

show()

U2dVectorLayer show 함수

showLabel()

U2dVectorLayer 전체 라벨을 show하는 함수

updateFeatures()

전체 Features를 갱신하는 함수