繪製三維面資料
繪製三維面資料
由一個或多個封閉線資料組成,並包含所圍成範圍的幾何圖形資料。此外同時也允許在面圖徵中,有空洞的存在。三維面資料可以設定高程值,以及外框線、內框線(如果面資料存在空洞)、所包含的範圍。如要設定框線粗細顏色、填色顏色等視覺呈現,請參閱圖層套疊大項下圖形與圖片類別中的設定面圖徵頁籤中的說明。
function addPolyGon(){
var path = [];
path[0] = new TGOS.TEPoint(121.48633, 25.16105,500);
path[1] = new TGOS.TEPoint(121.56735, 25.16105,500);
path[2] = new TGOS.TEPoint(121.56735, 25.26105,500);
path[3] = new TGOS.TEPoint(121.48633, 25.26105,500);
path[4] = new TGOS.TEPoint(121.48633, 25.16105,500);
var lineStr = new TGOS.TELineString(path);
var ring = new TGOS.TELinearRing(lineStr);
var polygon = new TGOS.TEPolygon([ring]);
var testFill = new TGOS.TEFill(tg3dEarth,polygon,{
fillColor:"#ffff00",
fillOpacity:0.5,
strokeColor:"#ff0000",
strokeWeight:100,
strokeOpacity:1,
AltitudeMode : TGOS.TEAltitudeModeType.RelativeToGround,
//設TEAltitudeModeType,可以有RelativeToGround, Absolute, ClampToGround 3種
Extrude: ture //是否拔高
});
}