[GeOnDT for JS 업데이트 안내 – KGEOP 사용자 대상]
GeOnDT for JS 제품의 버전이 업데이트되어 안내드립니다.
1. UAnalyGiznoModel 의 reset API 가 정상 동작하도록 수정되었습니다.
U3dApp.getAnalysis('GizmoModel')로 접근할수있는 UAnalyGiznoModel의 reset API 가 수정한 객체를 정상적으로 초기화 하도록 수정되었습니다.
2. U3dModelShapeLayer (SHP 파일 3D 형상화) 에서 출력되는 객체의 텍스쳐 변경 기능이 정상적으로 작동하도록 수정되었습니다.
let textureList = [
'./image/buld/buld_texture_1.jpg',
'./image/buld/buld_texture_2.jpg',
'./image/buld/buld_texture_3.jpg',
];
let currentTextureVisible = false;
let currentTextureIndex = 0;
function styleFunction(feature) {
return {
//color: color, //+ 색상 입력 가능
//opacity: opacity, /+투명도 입력 가능
visible: true, //+ 가시화 여부
imgvisible: currentTextureVisible, //+ 이미지 가시화 여부
imgurl: textureList[currentTextureIndex] //+ 이미지 url
};
}
let layer = new Union3D.model.U3dModelShapeLayer({
name: result.name,
minlevel: 17,
transparent: false,
style: {
color: $('#stroke').val(),
opacity: 1,
transparent: false
},
textureurl: textureList,
usetexture: false, // styleFunction이 입력 되어있을 경우 styleFunction의 러턴값 우선 적용
useproxy: true,
styleFunction: styleFunction // styleFunction의 리턴 스타일 값으로 스타일을 적용 할 수있습니다.
// styleFunction의 리턴 값으로 스타일 적용 할시, layer.updateStyle()를 호출 하여야 합니다.
});
layer.then(()=>{
layer.addFeatureCollection(featureCollection);
app.fitLayerExtent(layer.getName(), false, 500);
});
텍스쳐 적용 버튼 클릭시
$('#texture-apply').on('click', function (e) {
currentTextureVisible = true;
if (currentTextureIndex === 3) {
currentTextureIndex = 0;
}
currentTextureIndex++;
layer.updateStyle();
});
텍스쳐 미적용 버튼 클릭시
$('#texture-reset').on('click', function (e) {
currentTextureVisible = false;
layer.updateStyle();
});
|