設定線圖徵

設定線圖徵

在設定好一組線資料後,必須藉由APITELine類別的方法加以呈現,並決定線資料的樣式,包含是否顯示、是否可點擊、顏色、筆畫寬度、筆畫透明度、堆疊順序等,以及滑鼠的觸發事件,以下為設定線圖徵筆畫寬度、顏色及堆疊順序的範例。

           var testline;

           var linecolor;

           var lineweight;

        function InitWnd() {

                   var pBody = document.getElementById("TGMap");

            tg3dEarth = newTGOS.TEOnlineMap(pBody,{

                           viewpoint: newTGOS.TEViewpoint(121.52276,25.05803, 5000, 0, 0)

                   },function (){

                           var path = [];

                           path[0] = newTGOS.TEPoint(121.51861,25.04193);

                           path[1] = newTGOS.TEPoint(121.51971,25.04568);

                           path[2] = newTGOS.TEPoint(121.52232,25.05112);

                           path[3] = newTGOS.TEPoint(121.52269,25.05261);

                           path[4] = newTGOS.TEPoint(121.52309,25.06109);

                           path[5] = newTGOS.TEPoint(121.52270,25.06279);

                           path[6] = newTGOS.TEPoint(121.52239,25.06425);

                           path[7] = newTGOS.TEPoint(121.52245,25.06660);

                           path[8] = newTGOS.TEPoint(121.52297,25.06840);

                           path[9] = newTGOS.TEPoint(121.53262,25.06819);

                           var lineStr =new TGOS.TELineString(path);

                           testline = newTGOS.TELine(tg3dEarth, lineStr, { //繪出pathlineStr的線圖徵

                                   strokeColor: '#00AA88',

                                   strokeWeight: 5

                           });

                   });

           

        }

 

 

回到上方