點位高程資訊
點位高程資訊
提供方法指定點位,取得該點位的高程值。此範例利用圖面點擊取得坐標,再以此坐標取得高程數值。
function ElevationPointClick(){
var ele = newTGOS.TEElevation();
var x = parseFloat(document.getElementById("x").value);
var y = parseFloat(document.getElementById("y").value);
var pt = new TGOS.TEPoint(x, y);
var request = {
points:[pt]
};
ele.pointElevation(request,function(results){
for(var i = 0 ; i < results.length;i++)
{
alert(results[i].elevation);
}
});
}