new U2dVectorLayer(opt)
화면에 2D Vector를 생성하는 클래스
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opt |
object |
생성자 옵션
|
- Tutorials:
Methods
-
addGeometry(geom)
-
파라미터롤 받은 Geometry 객체를 추가하는 함수
Name Type Description geomU2dGeometry 추가할 2D Geometry 객체
-
addGeometryAsGeojson(json, sourceCRS, callback)Promise
-
Geojson을 읽어 Geometry 객체를 추가하는 함수
Name Type Description jsonObject 읽어올 Geojson Object
sourceCRSString optional Geojson source의 CRS(Projection)
callbackfunction optional 피쳐생성후 호출될 콜백, 생성된 피쳐가 파라메터로 넘겨집니다.
Returns:
Type Description Promise promise -
addGeometryAsWKT(wkt, sourceCRS, callback)Promise
-
WKT를 읽어 Geometry 객체를 추가하는 함수
Name Type Description wktString | Array WKT 문자열
sourceCRSString optional WKT source의 CRS(Projection)
callbackfunction 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 u2dGeometryU2dGeometry 교차 검색할 대상 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 geomU2dGeometry 추가할 2D Geometry 객체
-
removeLabel(targetGeom)
-
지정한 2D 객체의 라벨을 제거하는 함수
Name Type Description targetGeomObject | * 라벨을 제거할 2D 객체 (ex: U2dPoint, U2dLine, U2dPolygon...)
-
setLabel(targetGeom, label, zOffset)
-
지정한 2D 객체에 라벨을 붙이는 함수
Name Type Description targetGeomObject | * 라벨을 붙일 2D 객체 (ex: U2dPoint, U2dLine, U2dPolygon...)
labelString 라벨
zOffsetNumber 라벨 z축 offset
-
setStyle(opt)Promise
-
U2dVectorLayer 전체 2D 객체들의 스타일을 설정하는 함수
Name Type Description opt스타일 옵션
Name Type Description fillColor2D 객체 채우기 색
strokeColor2D 객체 외곽선 색
strokeWidth2D 객체 외관선 두께
Returns:
Type Description Promise promise -
show()
-
U2dVectorLayer show 함수
-
showLabel()
-
U2dVectorLayer 전체 라벨을 show하는 함수
-
updateFeatures()
-
전체 Features를 갱신하는 함수