new U2dVectorShaderLayer(opt)
| Name | Type | Description |
|---|---|---|
opt |
U2dVectorShaderLayerCO |
- Tutorials:
Members
-
OPT_KEYS
-
Methods
-
addGeometry(geom)
-
파라미터롤 받은 Geometry 객체를 추가하는 함수
Name Type Description geomU2dGeometry 추가할 2D Geometry 객체
-
addGeometryAsGeojson(json, sourceCRS, callback)Promise.<void>
-
Geojson을 읽어 Geometry 객체를 추가하는 함수
Name Type Description jsonobject 읽어올 Geojson Object
sourceCRSstring optional Geojson source의 CRS(Projection)
callbackfunction optional 피쳐생성후 호출될 콜백, 생성된 피쳐가 파라메터로 넘겨집니다.
Returns:
Type Description Promise.<void> promise -
addGeometryAsTopojson(json, sourceCRS, callback)Promise.<void>
-
TopoJson 파일을 읽어 Geometry 객체를 추가하는 함수
Name Type Description jsonstring | array 읽어올 TopoJson
sourceCRSstring optional TopoJson source의 CRS(Projection)
callbackfunction optional 피쳐 생성 후 호출될 콜백, 생성된 피쳐가 파라메터로 넘겨집니다.
Returns:
Type Description Promise.<void> promise -
addGeometryAsWKT(wkt, sourceCRS, callback)Promise.<void>
-
WKT를 읽어 Geometry 객체를 추가하는 함수
Name Type Description wktstring | array WKT 문자열
sourceCRSstring optional WKT source의 CRS(Projection)
callbackfunction optional 피쳐생성후 호출될 콜백, 생성된 피쳐가 파라메터로 넘겨집니다.
Returns:
Type Description Promise.<void> promise -
addTileFromScene(tile)boolean
-
입력받은 타일을 화면에(scene)에 추가하는 함수
Name Type Description tileU3dQuadTile 타일
Returns:
Type Description boolean 작업 성공 여부. 성공하면 true, 실패면 false. -
clearLabel()
-
전체 라벨을 제거하는 함수
-
async createTexture(tile)Promise.<void>
-
WFS tile 응답 또는 기존 cache를 terrain decal payload로 변환합니다. base texture가 없는 runtime tile은 표시 전 payload를 prewarm합니다.
Name Type Description tileU3dQuadTile 타일
Returns:
Type Description Promise.<void> -
dispose()ReturnType.<Class.<deferred>>
-
Returns:
Type Description ReturnType.<Class.<deferred>> -
getBoundingBox()Box3
-
레이어의 바운딩박스(Box3)를 반환하는 함수
Returns:
Type Description Box3 -
getDebugTileState(tileKey)U2dVectorShaderLayer~DebugTileState|undefined
-
tile 상태 debug 용
Name Type Description tileKeystring 확인하려는 tile의 key값
Returns:
Type Description U2dVectorShaderLayer~DebugTileState | undefined -
getFeatureById(id)UMeasureFeature|undefined
-
Name Type Description idstring | number Returns:
Type Description UMeasureFeature | undefined -
getFeatureByUid(uid)UMeasureFeature|undefined
-
Name Type Description uidstring Returns:
Type Description UMeasureFeature | undefined -
getFeatureByXY(x, y)UMeasureFeature
-
위경도 좌표를 받아서 해당 위치의 feature를 반환
Name Type Description xGeoPosition.x 경도
yGeoPosition.y 위도
Returns:
Type Description UMeasureFeature 입력 받은 위치에 해당하는 feature 정보 -
getFeatures()Array
-
U2dVectorShaderLayer의 Feature 목록을 반환하는 함수
Returns:
Type Description Array Feature 목록 -
getGeometries()Array.<UMeasureFeature>
-
생성된 전체 2D Geometry 객체 목록을 반환하는 함수
Returns:
Type Description Array.<UMeasureFeature> 2D Geometry 객체 목록 -
getIntersects(u2dGeometry)Array.<U2dGeometry>|undefined
-
파라미터로 입력받은 U2dGeometry와 교차되는 2D Geometry 객체를 반환하는 함수
Name Type Description u2dGeometryU2dGeometry 교차 검색할 대상 U2dGeometry
Returns:
Type Description Array.<U2dGeometry> | undefined Example
vectorLayer.getIntersects(new Union3D.geom.U2dPoint().setPosition([126.94215165535197, 37.519650370480015])); -
getSimplifyInfo()U2dVectorShaderLayer~U2dVectorShaderLayer_SimplifyInfo
-
Returns:
Type Description U2dVectorShaderLayer~U2dVectorShaderLayer_SimplifyInfo -
getVectorExtent()Box3|undefined
-
Returns:
Type Description Box3 | undefined -
hide(refresh)
-
U2dVectorShaderLayer hide 함수 vector layer 소유 source payload만 제거하고 다른 source와 terrain mesh visibility는 유지합니다.
Name Type Description refreshboolean optional -
hideLabel()
-
U2dVectorShaderLayer 전체 라벨을 hide하는 함수
-
initialize()void
-
앱 공유 terrain manager와 이 레이어가 소유한 shader cache manager를 연결합니다.
Returns:
Type Description void 반환값이 없습니다. -
isDataExist()boolean
-
Returns:
Type Description boolean -
logDebugTileState(tileKey)U2dVectorShaderLayer~DebugTileState|undefined
-
Name Type Description tileKeystring Returns:
Type Description U2dVectorShaderLayer~DebugTileState | undefined -
processMaterial(tile, features, index)
-
Name Type Description tileU3dQuadTile featuresArray.<object> indexnumber optional -
refreshTerrainDynamicCircleRadius(opt)boolean
-
카메라 거리에 따라 동적 원형 feature 반경을 다시 계산하고 연결된 tile만 갱신합니다.
Name Type Default Description optobject {} optional 반경 갱신 옵션입니다.
Name Type Default Description radiusnumber optional 화면 기준 반경입니다.
resetboolean false optional 원래 geometry 반경으로 복원할지 여부입니다.
deferFlushboolean true optional tile rebuild를 다음 flush까지 미룰지 여부입니다.
Returns:
Type Description boolean 하나 이상의 tile payload가 변경되었으면 true입니다. -
removeGeometry(geom)
-
사용자 feature 제거 시 runtime payload와 local tile 바인딩을 함께 정리해 잔상 decal을 막습니다.
Name Type Description geomU2dGeometry 추가할 2D Geometry 객체
-
removeHigLight(geom)
-
Name Type Description geomU2dGeometry -
removeHigLightAll()
-
highlight 상태인 feature들의 highlight를 해제합니다.
-
removeLabel(targetGeom)
-
지정한 2D 객체의 라벨을 제거하는 함수
Name Type Description targetGeomObject | * 라벨을 제거할 2D 객체 (ex: U2dPoint, U2dLine, U2dPolygon...)
-
removeTileFromScene(tile)boolean
-
화면(scene)에서 입력받은 타일을 제거하는 함수
Name Type Description tileU3dQuadTile 타일
Returns:
Type Description boolean 작업 성공 여부. 성공하면 true, 실패면 false. -
renderTile(tile, isForce)
-
Name Type Description tileU3dQuadTile isForceboolean -
setDynamicRadius(value, radius)U2dVectorShaderLayer
-
circle type 에 대한 동적 반경 사이즈를 설정하는 함수
Name Type Default Description valueboolean 사동적 반경 용 여부. true면 사용, false면 사용 안함.
radiusnumber 8 optional 반경 크기
Returns:
Type Description U2dVectorShaderLayer 현재 레이어입니다. -
setFeatureStyle(feature, style)
-
feature를 입력 받아 해당 feature의 style을 설정하는 함수
Name Type Description featureUMeasureFeature style을 수정하려는 대상
styleobject style 수정 내용
-
setHighLight(geom, opt)
-
Name Type Description geomU2dGeometry optobject optional 하이라이트 스타일입니다.
Name Type Description fillColorColorRepresentation optional 채우기 색상입니다.
fillOpacitynumber optional 채우기 투명도입니다.
strokeColorColorRepresentation optional 외곽선 색상입니다.
strokeOpacitynumber optional 외곽선 투명도입니다.
strokeWidthnumber optional 외곽선 두께입니다.
opacitynumber optional 개별 투명도가 없을 때 사용할 공통 투명도입니다.
-
setLabel(targetGeom, label, zOffset)
-
지정한 2D 객체에 라벨을 붙이는 함수
Name Type Description targetGeomObject | * 라벨을 붙일 2D 객체 (ex: U2dPoint, U2dLine, U2dPolygon...)
labelString 라벨
zOffsetNumber 라벨 z축 offset
-
setOpacity(val)
-
레이어 투명도를 설정하는 메서드 입니다.
Name Type Description valnumber 투명도 (0~1)
-
setSimplifyValue(type, property, minValue, maxValue)
-
Name Type Description type'line' | 'polygon' property'level' | 'tolerance' | 'size' minValuenumber maxValuenumber -
setStyle(opt)Promise
-
U2dVectorShaderLayer 전체 2D 객체들의 스타일을 설정하는 함수
Name Type Description opt스타일 옵션
Name Type Description fillColor2D 객체 채우기 색
strokeColor2D 객체 외곽선 색
strokeWidth2D 객체 외관선 두께
Returns:
Type Description Promise promise -
setStyleFunction(styleFunction)Promise.<void>
-
layer style function을 교체하고 cache feature의 style payload를 갱신합니다.
Name Type Description styleFunctionfunction style을 지정하려는 함수
Returns:
Type Description Promise.<void> -
setVectorExtent()
-
-
show(show, refresh)
-
U2dVectorShaderLayer show 함수 vector layer를 표시하고 현재 tile cache에서 이 layer 소유 source payload를 복원합니다.
Name Type Default Description showboolean true optional refreshboolean optional -
showLabel()
-
U2dVectorShaderLayer 전체 라벨을 show하는 함수
-
update(drawArg, curTime)
-
Name Type Description drawArgUDrawArg curTimenumber -
updateFeatures()
-
전체 2D Geometry 객체를 제거하고 레이어를 비우는 함수