Class: TerrainView

ov. TerrainView

new ov.TerrainView(target, options)

webgl/ov.js, line 639

三維場景視圖

Name Type Description
target String

綁定的DIV名稱。

options Object optional

環境的初始化選項。

Name Type Default Description
transparentBackground Boolean false optional

背景是否透明。

antialias Boolean true optional

抗鋸齒。

backgroundColor ov.Color new ov.Color("#FFFFFF") optional

底色。

showSun Boolean true optional

畫太陽。

showAtmosphere Boolean true optional

畫大氣。

showOuterSpaceBox Boolean true optional

畫外太空。

outputSelectMap Boolean true optional

點選物件。

outputDepthMap Boolean true optional

深度測試。

webglImage String null optional

初始化底圖。

Example

var terrainView = ov.TerrainView("canvas", {
antialias: true,
transparentBackground: false,
showSun: true,
showOuterSpaceBox: true,
showAtmosphere: true,
outputSelectMap: true,
outputDepthMap: true,
backgroundColor: new ov.Color("#FFFFFF"),
webglImage: url
});

Members

readonlyanalysis

分析功能物件

Properties:
Name Type Description
analysis ov.Analysis

分析功能物件,可執行視域分析等

readonlybestCommentator

最佳解說員集合

Properties:
Name Type Description
bestCommentator ov.BestCommentatorCollection

最佳解說員的劇本集合

readonlycamera

取得目前攝影機(姿態)

Properties:
Name Type Description
camera ov.Camera

攝影機(姿態)

canvas

圖台畫布

Properties:
Name Type Description
canvas HTMLCanvasElement

圖台畫布

controlPanel

是否顯示控制面板

Properties:
Name Type Description
controlPanel Boolean

是否顯示控制面板

cursor

目前滑鼠的游標樣式設定

Properties:
Name Type Description
cursorSetting Object

目前滑鼠的游標樣式設定

cursor

目前滑鼠的預設游標樣式

Properties:
Name Type Description
cursor String

目前滑鼠的預設游標樣式

date

時間戳

Properties:
Name Type Description
date Date

時間戳

enableAtmoSky

是否畫天空大氣,預設為開

Properties:
Name Type Description
enableAtmoSky Boolean

天空大氣

enableDrawLightDirectionSketchMap

是否在場景中畫光線方向圖

Properties:
Name Type Description
enableDrawLightDirectionSketchMap Boolean

是否在場景中畫光線方向圖

enableLight

光線的開關

Properties:
Name Type Description
enableLight Boolean

光線的開關

enableSea

是否畫海洋,預設為關

Properties:
Name Type Description
enableSea Boolean

海洋

enableShadow

陰影的開關

Properties:
Name Type Description
enableShadow Boolean

陰影的開關

enableSun

是否畫太陽貼圖,預設為開

Properties:
Name Type Description
enableSun Boolean

太陽貼圖

enableVolumetricLightScattering

是否開啟體積光散射,預設為關

Properties:
Name Type Description
enableVolumetricLightScattering Boolean

體積光散射

freezeKeyboard

凍結鍵盤控制

Properties:
Name Type Description
freezeKeyboard Boolean

凍結鍵盤控制

freezeMouse

凍結滑鼠控制(只能用控制攝影機的方式處理)

Properties:
Name Type Description
freezeMouse Boolean

凍結滑鼠控制

freezeUpdate

凍結畫面更新

Properties:
Name Type Description
freezeUpdate Boolean

凍結畫面更新

freezeUserControl

凍結使用者輸入控制對Viewport的控制(凍結滑鼠與鍵盤)

Properties:
Name Type Description
freezeUserControl Boolean

readonlyisSpherical

是否為"球"

Properties:
Name Type Description
isSpherical Boolean

是否為"球"

keepDraw

是否保持作畫,不會休息(預設為false若無變更就不會重新作畫)

Properties:
Name Type Description
keepDraw Boolean

是否不休息

readonlylayers

所有圖層

Properties:
Name Type Description
layers Array.<ov.Layer>

圖層陣列

lightProperty

光線的特性

Properties:
Name Type Description
lightProperty ov.LightProperty

光線的特性

maxVisualDistance

最大虛擬可視距離

Properties:
Name Type Description
maxVisualDistance Number

最大虛擬可視距離(單位:公尺),用於顯示太遠的物件,預設為0(自動控制)

minHeightAboveGround

最小的離地表高度,初始化時,系統會依據地形影像的解析度來決定,使用者可於初始化後自行設定

Properties:
Name Type Description
minHeightAboveGround double

最小的離地表高度

readonlymousePos

目前滑鼠的坐標

Properties:
Name Type Description
mousePos GeoPoint | undefined

目前滑鼠的坐標,單位為Map

moveMode

移動模式:如面板模式、滑鼠模式、旋轉模式等...

Properties:
Name Type Description
moveMode ov.MOVE_TYPE

移動模式

readonlyname

取得地形圖層名稱

Properties:
Name Type Description
name String

地形圖層名稱

showMenu

開啟或關閉左側面板

Properties:
Name Type Description
showMenu Boolean

面板開啟狀態

readonlysphericalEpsg

球體EPSG

Properties:
Name Type Description
sphericalEpsg Number

球體的Epsg

terrainAlpha

地形不透明度

Properties:
Name Type Description
terrainAlpha Number

不透明度(預設1.0,介於0~1.0)

readonlyterrainEpsg

地形EPSG

Properties:
Name Type Description
terrainEpsg Number

地形的原始Epsg

terrainHitTestOpacityThreshold

地形可以被HitTest的最小不透明度閾值,若地形不透明度低於此值,則引擎允許點擊地形下的三角面

Properties:
Name Type Description
terrainHitTestOpacityThreshold Number

不透明度閾值(預設0.9,介於0~1.0)

throughSurface

是否能穿越地表

Properties:
Name Type Description
throughSurface Boolean

是否能穿越地表

readonlyurl

取得地形圖層連結

Properties:
Name Type Description
url String

地形圖層連結

Methods

abortInput()

webgl/ov.js, line 3498

中斷輸入。

abortMeasure()

webgl/ov.js, line 3979

中斷測量,並呼叫 OnMeasureCompleted({success:false, length: 0, measureObj:null});。

addCustomLayer(param){ov.CustomLayer}

webgl/ov.js, line 2532

加入自畫圖層。

Name Type Description
param Object

參數物件。

Name Type Description
layername String

名稱,圖層名稱不可重複。

callback ov.TerrainView~addCustomLayerCallback optional

回呼函式。

Returns:
Type Description
ov.CustomLayer 自畫圖層。
Example

var param = {};
param.layername = "custom";
var custom = terrainView.addCustomLayer(param);

addEventListener(eventName, callback){Boolean}

webgl/ov.js, line 1878

加入事件監聽器

Name Type Description
eventName String

事件名稱,目前支援以下
MeasureCompleted 測量完成
CameraPosChanged 相機位置改變
Click 滑鼠點擊
MoveEnd 移動結束
MoveStart 移動開始
MouseDown 滑鼠按下
MouseUp 滑鼠彈起

callback ov.TerrainView~addEventListenerCallback

事件觸發時要執行的回呼函式。

Returns:
Type Description
Boolean 是否加入成功。
Example

var result = terrainView.addEventListener("CameraPosChanged", myCallback);

addFigure(param){CTerrainEngine.Element.Figure|null}

webgl/ov.js, line 4007

加入提示圖片。

Name Type Description
param Object

參數物件。

Name Type Default Description
url String

圖片位址。

width String optional

圖片寬,沒設定就使用圖片檔案自身的值,使用"50px"表示寬50像素,或是"50%"表示圖片寬度同畫布寬的一半,輸入數值視同像素

height String optional

圖片高,方法同上。

alpha Number 1 optional

不透明度,值應在0~1之間。

top String "" optional

圖片離畫布頂端的距離,"50px"代表離頂端50個像素,或是"10%"代表離頂端10%的畫布高度。

left String "" optional

圖片離畫布左端的距離,方法同上。

right String "" optional

圖片離畫布右側的距離,方法同上,左右同時有值視同水平至中。

bottom String "" optional

圖片離畫布底端的距離,方法同上,上下同時有值視同垂直至中。

Returns:
Type Description
CTerrainEngine.Element.Figure | null 提示圖片物件
Example

var figure = terrainView.addFigure({ url: "images/common/logo.png", width: "300px", height: "100px", bottom: "10px", right: "10px" });

addModelLayer(param)

webgl/ov.js, line 2458

加入模型圖層。

Name Type Description
param Object

參數物件。

Name Type Description
url String

位址。

identifier String

圖層名稱。

callback ov.TerrainView~addModelLayerCallback

回呼函式。

urlTemplate String optional

網址字串模板,不使用代理則為{URL}。

Example

var param = {};
param.url = "http://127.0.0.1:8080";
param.identifier = "mesh";
param.callback = function(success, layer){if(success){console.log(layer.name);}};
terrainView.addModelLayer(param);

addModelSetLayer(param)

webgl/ov.js, line 2486

加入模型集圖層。

Name Type Description
param Object

參數物件。

Name Type Description
url String

位址。

identifier String

圖層名稱。

callback ov.TerrainView~addModelSetLayerCallback

回呼函式。

urlTemplate String optional

網址字串模板,不使用代理則為{URL}。

Example

var param = {};
param.url = "http://127.0.0.1:8080";
param.identifier = "modelSet";
param.callback = function(success, layer){if(success){console.log(layer.name);}};
terrainView.addModelSetLayer(param);

addMoveEvent()

webgl/ov.js, line 5269

新增移動事件。

Name Type Default Description
param.setps Array.<Object>

階段參數。

Name Type Description
startPosition Geo3DPoint

起始座標。

endPosition Geo3DPoint

結束座標。

reverse Boolean optional

面向是否與行進方向相反。

param.steps.time Number

時間,與速度及加速度擇一。

param.setps.velocity Number

速度(m/s)。

param.setps.acceleration Number

加速度(m/s^2)。

param.setps.stepFunction ov.MoveEvent~stepFunction optional

階段處裡函式。

param.entity ov.CustomEntity | ov.CustomGLTFEntity

自畫圖素。

param.defaultFunction ov.MoveEvent~stepFunction optional

預設處裡函式。

param.angularVelocity Number Math.PI optional

角速度(rad/s)。

param.considerMeshBVH Boolean false optional

是否考慮網格包圍體階層。

param.considerModel Boolean false optional

是否考慮三維模型。

addOGC3DTilesLayer(param)

webgl/ov.js, line 2319

加入OGC 3D Tiles圖層。

Name Type Description
param Object

參數物件。

Name Type Default Description
url String

tileset.json位址。

maximumScreenSpaceError Number 16 optional

最大螢幕空間誤差。

callback ov.TerrainView~addOGC3DTilesLayerCallback

回呼函式。

Example

var param = {};
param.url = "TilesetWithDiscreteLOD/tileset.json";
param.callback = function(success, layer){if(success){console.log(layer.name);}};
terrainView.addOGC3DTilesLayer(param);

addOGCI3SLayer(param)

webgl/ov.js, line 2346

加入OGC I3S圖層。

Name Type Description
param Object

參數物件。

Name Type Default Description
url String

位址,可不給layers,預設為0。

requestMode ov.OGC_I3S_REQUEST ov.OGC_I3S_REQUEST.AUTO optional

I3S請求模式。

recalculateNormals Boolean false optional

使用圖台重新計算的法線向量。

callback ov.TerrainView~addOGCI3SLayerCallback

回呼函式。

Example

var param = {};
param.url = "https://tiles.arcgis.com/tiles/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Buildings_NYC_BKG/SceneServer/layers/0";
param.callback = function(success, layer){if(success){console.log(layer.name);}};
terrainView.addOGCI3SLayer(param);

addOverlayWindow(param){ov.OverlayWindow}

webgl/ov.js, line 5137

新增疊加圖層切窗視窗。

Name Type Description
param Object

參數。

Name Type Default Description
name Number

視窗名稱。

left Number 0 optional

距離左側邊界(0.0~1.0)。

top Number 0 optional

距離上方邊界(0.0~1.0)。

width Number 1 optional

視窗寬(0.0~1.0)。

height Number 1 optional

視窗長(0.0~1.0)。

Returns:
Type Description
ov.OverlayWindow 疊加圖層切窗視窗物件。

addPhotogrammetryModelLayer(param)

webgl/ov.js, line 2293

加入傾斜攝影模型圖層。

Name Type Description
param Object

參數物件。

Name Type Description
url String

位址。

identifier String

圖層名稱。

callback ov.TerrainView~addPhotogrammetryModelLayerCallback

回呼函式。

urlTemplate String optional

網址字串模板,不使用代理則為{URL}。

Example

var param = {};
param.url = "http://127.0.0.1:8080";
param.identifier = "PhotogrammetryModel";
param.callback = function(success, layer){if(success){console.log(layer.name);}};
terrainView.addPhotogrammetryModelLayer(param);

addPhotogrammetryModelMeshBVH(param)

webgl/ov.js, line 5322

新增傾斜攝影模型網格包圍體階層。

Name Type Description
param Object

參數。

Name Type Default Description
url Object

位址,使用json匯入則不需要。

identifier Object

圖層名稱,使用json匯入則不需要。

urlTemplate Object optional

網址字串模板,不使用代理則為{URL}。

targetLevel Number

目標層級,使用json匯入則不需要。

importByJson Boolean false optional

是否使用json匯入。

jsonPath Array.<String> optional

json路徑。

callback ov.TerrainView~addPhotogrammetryModelMeshBVHCallback optional

回呼函式。

addPipelineLayer(param)

webgl/ov.js, line 2374

加入管線圖層。

Name Type Description
param Object

參數物件。

Name Type Description
url String

位址。

identifier String

圖層名稱。

callback ov.TerrainView~addPipelineLayerCallback

回呼函式。

urlTemplate String optional

網址字串模板,不使用代理則為{URL}。

Example

var param = {};
param.url = "http://127.0.0.1:8080";
param.identifier = "pipeline";
param.callback = function(success, layer){if(success){console.log(layer.name);}};
terrainView.addPipelineLayer(param);

addPointCloudLayer(param)

webgl/ov.js, line 2430

加入點雲圖層。

Name Type Description
param Object

參數物件。

Name Type Description
url String

位址。

identifier String

圖層名稱。

callback ov.TerrainView~addPointCloudLayerCallback

回呼函式。

urlTemplate String optional

網址字串模板,不使用代理則為{URL}。

Example

var param = {};
param.url = "http://127.0.0.1:8080";
param.identifier = "pointCloud";
param.callback = function(success, layer){if(success){console.log(layer.name);}};
terrainView.addPointCloudLayer(param);

addProjectorLayer(param)

webgl/ov.js, line 2507

加入監視器圖層。

Name Type Description
param Object

參數物件。

Name Type Description
url String

位址。

identifier String

圖層名稱。

callback ov.TerrainView~addProjectorLayerCallback

回呼函式。

addPromptText(param){CTerrainEngine.Element.Text|null}

webgl/ov.js, line 4037

加入提示文字。

Name Type Description
param Object

參數物件。

Name Type Default Description
text String

文字。

align ov.TEXT_ALIGN

對齊方式。

color ov.Color new ov.Color("#FFFFFF") optional

文字顏色。

font String "Arial" optional

字型。

size Number 16 optional

文字大小。

borderColor ov.Color new ov.Color("#000000") optional

邊框顏色。

borderSize Number optional

邊框大小。

offsetX Number 0 optional

文字水平方向位移,單位px,右為正。

offsetY Number 0 optional

文字垂直位移,單位px,下為正。

Returns:
Type Description
CTerrainEngine.Element.Text | null 提示文字物件
Example

terrainView.addPromptText({
text: "測試文字",
font: "標楷體",
size: 120,
color: new ov.Color("#00FF00"),
align: ov.TEXT_ALIGN.HORZ_CENTER | ov.TEXT_ALIGN.VERT_VCENTER
});

addTerrainCustomTileOverlay(settings, callback, index){ov.TerrainCustomTileOverlay|null}

webgl/ov.js, line 2604

用加入的方式新增Custom tile Overlay。

Name Type Description
settings Object

參數物件。

Name Type Default Description
layername String

Overlay名稱。

opacity Number 1 optional

圖層的不透明度,0~1,預設為1。

onTerrain Boolean true optional

圖層是否顯示在地形上。

callback ov.TerrainView~addTerrainCustomTileOverlayCallback optional

執行新增疊加圖層後的回呼函式。

index Number optional

插入索引,若沒有填值則視為加在最後面。

Returns:
Type Description
ov.TerrainCustomTileOverlay | null 圖層物件,若加入失敗則為null。

addTerrainSceneOverlay(settings, callback, index){ov.TerrainSceneOverlay|null}

webgl/ov.js, line 2923

用加入的方式新增地景 Overlay。

Name Type Description
settings Object

參數物件。

Name Type Default Description
uri String

資源位址。

identifier String

要圖ID。

layername String

圖層名稱。

fadeOutBegin Number 4.0 optional

模型所佔螢幕空間大小,小於此值開始淡出。

fadeOutEnd Number 2.0 optional

模型所佔螢幕空間大小,小於此值完全淡出。

surfaceFadeOutBegin Number 1200.0 optional

地表貼圖開始出現的距離。

surfaceFadeOutEnd Number 2000.0 optional

地表貼圖完全出現的距離。

randomRotationMax Number 180.0 optional

模型隨機旋轉的最大角度。

randomRotationMin Number 0.0 optional

模型隨機旋轉的最小角度。

randomLightMax Number 0.75 optional

模型隨機光照的最大強度。

randomLightMin Number 0.0 optional

模型隨機光照的最小強度。

callback ov.TerrainView~addTerrainSceneOverlayCallback optional

執行新增疊加圖層後的回呼函式。

index number | null optional

插入索引,若沒有填值則視為加在最後面。

Returns:
Type Description
ov.TerrainSceneOverlay | null 圖層物件,若加入失敗則為null。

addTerrainSingleTileOverlay(settings, callback, index){ov.TerrainSingleTileOverlay|null}

webgl/ov.js, line 2633

用加入的方式新增Single tile Overlay。

Name Type Description
settings Object

參數物件。

Name Type Default Description
url String

要圖網址或base64編碼(data:image/png;base64,XXX)。

layername String

Overlay名稱。

boundary GeoBoundary

圖層的範圍。

opacity Number 1 optional

圖層的不透明度,0~1。

show Boolean true optional

圖層是否顯示。

onTerrain Boolean true optional

圖層是否顯示在地形上。

callback ov.TerrainView~addTerrainSingleTileOverlayCallback optional

執行新增疊加圖層後的回呼函式。

index Number optional

插入索引,若沒有填值則視為加在最後面。

Returns:
Type Description
ov.TerrainSingleTileOverlay | null 圖層物件,若加入失敗則為null。

addTerrainVectorTileOverlay(settings, callback, index){ov.TerrainVectorTileOverlay|null}

webgl/ov.js, line 2793

新增地形Vector Tile。

Name Type Description
settings Object

參數物件。

Name Type Default Description
url String

資料來源模板,例如"http://127.0.0.1:8080/3857/identifier/{z}/{x}/{y}.vector.mvt"。

isGeoJson Boolean false optional

資料格式是否為GeoJson,若非則是mapbox的pbf標準格式。

layername String

Overlay名稱,不得與其他地形疊加圖層名稱相同,否則失敗。

lineWidth Number 1 optional

指示線條粗細。

minLevel Number 0 optional

請求最小Level,小於此Level則不會載入疊加資料。

maxLevel Number 23 optional

請求最大Level,大於此Level則不會載入疊加資料。

visibleFactor Number 1.0 optional

可視範圍參數,預設為1.0,越大則可視範圍越遠,在傾斜時更明顯,但無法超越LOD的限制。

urlTemplate String "Oview.aspx?{URL}" optional

網址字串模板,不使用代理則為{URL}。

show Boolean true optional

圖層是否預設為開。

onTerrain Boolean true optional

圖層是否顯示在地形上。

opacity Number 1.0 optional

圖層的不透明度。

occludedOpacity Number 0.25 optional

圖層被遮擋的不透明度。

pointSetting Object optional

點圖資的顯示樣式,有給點圖資才會繪製。

Name Type Default Description
textLabel String "" optional

欲顯示文字的參考欄位。

fontLabel String "" optional

欲套用字型的參考欄位。

fadeEffect Boolean true optional

是否使用淡出淡入效果。

allowOverlapping Boolean true optional

是否允許重疊。

fontTable Object.<String, Object> optional

字型設定定義,以fontLabel欄位名稱當索引。若為"DEFAULT",則會將所有未匹配文字套上此設定字型。

Name Type Default Description
font String "Arial" optional

指定字型。

fontSize Number 14 optional

指定字型大小。

fontColor ov.Color new ov.Color("#E0E0E0") optional

指定字型顏色。

fontBorderSize Number 2 optional

指定字型邊框粗細。

fontBorderColor ov.Color new ov.Color("#000000") optional

指定字型邊框顏色。

pullUpY Number 50 optional

指定圖釘最高高度,單位為pixel或公尺。

pullUpYUnit Number 0 optional

指定圖釘最高高度的單位,0為pixel,1為公尺。

groundLineColor ov.Color new ov.Color("#000000") optional

落地線的顏色。

groundLineWidth Number 1 optional

落地線的寬度。

polylineSetting Object optional

線圖資的顯示樣式,有給線圖資才會繪製。

Name Type Default Description
colorLabel String "" optional

欲套用顏色的參考欄位。

widthLabel Number optional

欲套用粗細的參考欄位,必須為數字。

simpleDraw Boolean false optional

使用輕便的繪圖模式,建議為false。

lineWidthScale Number 1 optional

指示線條粗細的縮放。

dashScale Number -1.0 optional

虛線設定,預設為實線,若等於0.0:系統自己切,大於0.0:以公尺為單位切。

colorTable Object.<String, Object> optional

線圖資的顯示定義,索引為顏色參考欄位之名稱。

Name Type Default Description
color ov.Color new ov.Color("#E8E8E8") optional

線圖資的顯示顏色。

polygonSetting Object optional

面圖資的顯示樣式,有給面圖資才會繪製。

Name Type Default Description
colorLabel String "" optional

面圖資的樣式參考欄位。

colorTable Object.<String, Object> optional

面圖資的樣式定義,索引為圖資參考欄位之名稱。

Name Type Default Description
fillColor ov.Color new ov.Color("#FF0000") optional

面圖資的顏色。

boundaryColor ov.Color new ov.Color("#000000") optional

面圖資的邊緣顏色。

boundaryWidth Number 2 optional

面圖資的邊緣粗細。

callback ov.TerrainView~addTerrainVectorTileOverlayCallback optional

執行新增疊加圖層後的回呼函式

index Number optional

插入索引,若沒有填值則視為加在最後面

Returns:
Type Description
ov.TerrainVectorTileOverlay | null 圖層物件,若加入失敗則為null。
Example

terrainView.addTerrainVectorTileOverlay({
url: "http://127.0.0.1:8080/3857/TEST_VECTORTILE/{z}/{x}/{y}.vector.mvt",
layername: "test_vt",
minLevel: 9,
maxLevel: 30,
opacity: 1.0,
isGeoJson: false,
urlTemplate: "{URL}",
pointSetting: {
textLabel: "show_text_label",
fontLabel: "show_font_label",
fadeEffect: true,
allowOverlapping: false,
groundLineColor: new ov.Color("#FF0000"),
fontTable: {
"DEFAULT": {
font: "微軟正黑體",
fontSize: 16,
fontColor: new ov.Color("#e0e0e0"),
fontBorderSize: 3,
fontBorderColor: new ov.Color("#000000"),
pullUpY: 0,
pullUpYUnit: 0,
},
"text_label_1":{
font: "微軟正黑體",
fontSize: 20,
fontColor: new ov.Color("#d0d000"),
fontBorderSize: 5,
fontBorderColor: new ov.Color("#000000"),
pullUpY: 400
}
}
},
polylineSetting:{
colorLabel: "show_color_label",
realWorldWidth: false,
simpleDraw: false,
fadeEffect: true,
colorTable: {
"DEFAULT": {
color: new ov.Color("#e0e0e080")
},
"color_label_1": {
color: new ov.Color("#e0e00080")
}
}
},
polygonSetting: {
colorLabel:"show_color_label",
colorTable: {
"DEFAULT": {
fillColor: new ov.Color("#ffffff80"),
boundaryColor: new ov.Color("#000000ff"),
boundaryWidth: 2
},
"color_label_2": {
fillColor: new ov.Color("#d0d000d0"),
boundaryColor: new ov.Color("#ff0000ff"),
boundaryWidth: 2
}
}
}
}, console.log)

addTerrainVisualizedDataGridOverlay(setting, callback, index){ov.TerrainVisualizedDataGridOverlay|null}

webgl/ov.js, line 2881

新增可視化資料網格

Name Type Description
setting Object

參數物件。

Name Type Default Description
layername String

Overlay名稱,不得與其他地形疊加圖層名稱相同,否則失敗。

source Array.<Float32Array>

圖層資料位置。

liftSource Array.<Float32Array> optional

圖層抬升資料位置,若沒給抬升將採用圖層資料位置,注意需再設定liftScale。

boundary GeoBoundary

圖層所在經緯度。

height Number

資料高。

width Number

資料寬。

date Array.<Date>

資料時間。

startDateIndex Number 0 optional

播放開始時間索引。

endDateIndex Number optional

播放最終時間索引。

filter String "linear" optional

資料過濾方式,nearest或是linear。

liftFilter String "linear" optional

抬升資料過濾方式,nearest或是linear。

useStepLayeredColorMap Boolean false optional

使用分層設色。

layeredColorMapKey Array.<Number> optional

分層設色圖高度表。

layeredColorMapValue Array.<ov.Color> optional

分層設色圖顏色表。

playSpeed Number 0.16 optional

播放速度。

repeat Boolean true optional

是否重播。

autoPlay Boolean true optional

是否自動播放。

flipY Boolean false optional

資料源是否翻轉Y軸。

onTerrain Boolean true optional

圖層是否參考地形高度,若true則抬升為相對高度;若false則抬升為絕對高度。

liftScale Number 0 optional

依圖層抬升資料拉抬地形的比例,預設0為不抬升。

callback ov.TerrainView~addTerrainVisualizedDataGridOverlayCallback optional

執行新增疊加圖層後的回呼函式。

index Number optional

插入索引,若沒有填值則視為加在最後面。

Returns:
Type Description
ov.TerrainVisualizedDataGridOverlay | null 圖層物件,若加入失敗則為null。

addTerrainWMTSOverlay(settings, callback, index){ov.TerrainWMTSOverlay|null}

webgl/ov.js, line 2665

用加入的方式新增WMTS Overlay。

Name Type Description
settings Object

參數物件。

Name Type Default Description
url String

要圖網址。

identifier String

要圖ID。

layername String

Overlay名稱。

resourceUrl String optional

網址Pattern,XXX/{TileZ}/{TileR}/{TileC}。

opacity Number 1 optional

圖層不透明度,0~1。

show Boolean true optional

圖層是否顯示。

onTerrain Boolean true optional

圖層是否顯示在地形上。

username String optional

若有需要提供,帳號。

password String optional

若有需要提供,密碼。

urlTemplate String optional

網址字串模板,不使用代理則為{URL}。

overlayWindow String optional

指定疊加要加的視窗名字,需先使用addOverlayWindow創建視窗。

callback ov.TerrainView~addTerrainWMTSOverlayCallback optional

執行新增疊加圖層後的回呼函式。

index number | null optional

插入索引,若沒有填值則視為加在最後面。

Returns:
Type Description
ov.TerrainWMTSOverlay | null 圖層物件,若加入失敗則為null。

addTimeEvent(param){Number}

webgl/ov.js, line 5233

添加時間事件。

Name Type Description
param Object

參數。

Name Type Description
start Date

事件開始時間

end Date

事件結束時間。

onPlay function

時間範圍內要執行的函式。

onEnter function

進入時間範圍要執行的函式。

onLeave function

離開時間範圍要執行的函式。

Returns:
Type Description
Number 事件編號。

addVectorLayer(param)

webgl/ov.js, line 2402

加入向量圖層。

Name Type Description
param Object

參數物件。

Name Type Description
url String

位址。

identifier String

圖層名稱。

callback ov.TerrainView~addVectorLayerCallback

回呼函式。

urlTemplate String optional

網址字串模板,不使用代理則為{URL}。

Example

var param = {};
param.url = "http://127.0.0.1:8080";
param.identifier = "vector";
param.callback = function(success, layer){if(success){console.log(layer.name);}};
terrainView.addVectorLayer(param);

beginDirectionRotate(rotSpeed)

webgl/ov.js, line 2046

攝影機的方位角開始旋轉。

Name Type Description
rotSpeed Number

旋轉速度(Arg/Sec),正表示順時針,負表示逆時針。

beginMove(speed, direction)

webgl/ov.js, line 2065

攝影機開始水平的移動。

Name Type Description
speed Number

縮放速度(畫面/sec),正表示前進,負表示後退。

direction Number

方向角(以自己的北方為0)。

beginVertRotate(rotSpeed)

webgl/ov.js, line 2037

攝影機的俯仰角開始旋轉。

Name Type Description
rotSpeed Number

旋轉速度(Arg/Sec),正表示越來越垂直,負表示越來越水平。

beginZoom(speed)

webgl/ov.js, line 2055

攝影機開始縮放。

Name Type Description
speed Number

縮放速度(畫面/sec),正表示前進,負表示後退。

cameraStop()

webgl/ov.js, line 2091

停止攝影機。

clearFigure()

webgl/ov.js, line 4058

清除全部提示圖片ov.TerrainView#addFigure

clearMeasure()

webgl/ov.js, line 3988

清除測量結束產生的作畫。

clearPromptText()

webgl/ov.js, line 4065

清除全部提示文字ov.TerrainView#addPromptText

clearSelectedEntitys()

webgl/ov.js, line 1849

清除所有被選取的圖素。

close()

webgl/ov.js, line 1656

關閉場景視圖,並釋放所有圖層。

Example

terrainView.close();

completeInput()

webgl/ov.js, line 3490

完成輸入。

editSliceSpace(param)

webgl/ov.js, line 4105

編輯裁切空間,若還沒有設定過,則會直接完成輸入。

Name Type Description
param Object optional

參數物件。

Name Type Default Description
color ov.Color new ov.Color("#FF0000") optional

在螢幕畫出回饋的顏色。

colorOpacity Number 1 optional

在螢幕畫出回饋的顏色不透明度。

markTagColor ov.Color new ov.Color("#FFFF00") optional

標示測量結果文字部份的顏色。

markTagColorOpacity Number 1 optional

標示測量結果文字部份的顏色不透明度。

measureScale Number 1 optional

測量結果要再乘以之Scale。

measureDecimalPoint Number 1 optional

測量結果要留的小數點數。

enableInput(enable)

webgl/ov.js, line 2100

設定是否能以鍵盤、滑鼠或觸控操作圖台。

Name Type Description
enable Boolean

是否能以輸入方式操作圖台。

facing(azimuth, polar, timeout, easing, callback){Boolean}

webgl/ov.js, line 2114

轉動攝影機面向指定方位。

Name Type Description
azimuth Number

轉動的目標方位角(度),有效角度為180度至-180度。

polar Number optional

攝影機V方向與垂直於地面之夾角(度),有效角度為0至180度。

timeout Number optional

完成轉動的總時間(毫秒)。

easing function optional

攝影機轉動的動畫easing函數。

callback ov.TerrainView~facingCallback optional

執行完要執行的回呼。

Returns:
Type Description
Boolean 是否設置成功。

findLayer(layerName){ov.Layer}

webgl/ov.js, line 3081

以圖層名稱取回圖層。

Name Type Description
layerName String

圖層名稱。

Returns:
Type Description
ov.Layer 圖層物件。

focusWindowCenterFacing(azimuth, polar, timeout, easing, callback){Boolean}

webgl/ov.js, line 2139

鎖住螢幕中心轉動攝影機面向指定方位。

Name Type Description
azimuth Number

轉動的目標方位角(度),有效角度為180度至-180度。

polar Number

攝影機V方向與垂直於地面之夾角(度),有效角度為0至180度。

timeout Number optional

完成轉動的總時間(毫秒)。

easing function optional

攝影機移動的動畫easing函數。

callback ov.TerrainView~focusWindowCenterFacingCallback optional

移動完成後執行的回呼。

Returns:
Type Description
Boolean 是否設置成功。

getAbsHeight(p, epsg){Number}

webgl/ov.js, line 3972

取得指定位置地表的精確高度。

Name Type Description
p GeoPoint

指定點位置。

epsg Number

指定點的epsg。

Returns:
Type Description
Number 地表的精確高度。

getContextStatus(){Object}

webgl/ov.js, line 3926

取得渲染環境的狀態。

Returns:
Type Description
Object 渲染環境的狀態。

getDrawTerrainSetting(){Object}

webgl/ov.js, line 1408

取得地形的作畫設定。

Returns:
Type Description
Object 地形的作畫設定,參考ov.TerrainView#setDrawTerrainSetting

getFov(){Number}

webgl/ov.js, line 2028

取得圖台水平視野角度(Fov)。

Returns:
Type Description
Number 圖台水平視野角度(Fov)。

getFPS(){Number}

webgl/ov.js, line 4139

取得畫圖的FPS。

Returns:
Type Description
Number 畫圖的FPS。

getHeight(p){Number}

webgl/ov.js, line 3935

取得指定位置地表當前LOD(Level of Detail)的高度。

Name Type Description
p GeoPoint

指定位置。

Returns:
Type Description
Number 地表當前LOD的高度。

getHeightAboveGround(){Number}

webgl/ov.js, line 3943

取得攝影機離當前地面幾何的高度差。

Returns:
Type Description
Number 離地表的高度。

getLayers(){Array.<ov.Layer>}

webgl/ov.js, line 1746

取得開啟中的圖層。

Returns:
Type Description
Array.<ov.Layer> 開啟中的圖層。
Example

var layers = terrainView.getLayers();

getModule(name){ov.Module|null}

webgl/ov.js, line 1646

載入模組並取得手柄。

Name Type Description
name String

模組名稱。

Returns:
Type Description
ov.Module | null 模組手柄。

getOverlayWindow(index){ov.OverlayWindow}

webgl/ov.js, line 5153

回傳指定索引或名稱疊加圖層切窗視窗。

Name Type Description
index Number | String

索引值或名稱。

Returns:
Type Description
ov.OverlayWindow 疊加圖層切窗視窗物件。

getScreenSnap(callback)

webgl/ov.js, line 4161

取得畫布的畫面,會引起圖台立刻重新繪製畫面,並在畫面重新繪製好後返回畫面拷貝的Image物件與DataURL。

Name Type Description
callback ov.TerrainView~getScreenSnapCallback

取得畫面的回呼。

getSelectedEntitys(){Array.<Object>}

webgl/ov.js, line 1824

取得所有被選取的圖素。

Returns:
Type Description
Array.<Object> 被選取的圖素及圖層物件。

getTerrainNodeProgress(){Number}

webgl/ov.js, line 3042

取得地形節點載入的狀態百分比。

Returns:
Type Description
Number 地形節點載入的狀態百分比。

getTerrainOverlay(index){ov.TerrainOverlay|Array.<ov.TerrainOverlay>}

webgl/ov.js, line 2946

取得地形的Overlay。

Name Type Description
index Number | String

index或圖層名稱。

Returns:
Type Description
ov.TerrainOverlay | Array.<ov.TerrainOverlay> Overlay圖層。
Example

terrainView.getTerrainOverlay(0); //取得第1個Overlay
terrainView.getTerrainOverlay("Taiwan3857"); //取得指定Overlay
terrainView.getTerrainOverlay(); //全部拿回來

goto(p, distance, keepPosture, epsg, callback)

webgl/ov.js, line 2163

移動至指定位置,單位是圖面坐標。

Name Type Default Description
p GeoPoint

要飛到p點。

distance double 0 optional

距離。

keepPosture Boolean false optional

代表是否要保持目前姿態。

epsg Number 4326 optional

目標坐標的epsg,若不輸入會將輸入坐標視為與地形同epsg。

callback ov.TerrainView~gotoCallback optional

移動完成後執行的回呼。

gotoAndFocus(focusPoint, distance, param, polarAngle, azimuthAngle, timeout, epsg, callback)

webgl/ov.js, line 2194

移動至指定位置,並鎖定一個指定中心圍繞旋轉。

Name Type Default Description
focusPoint GeoPoint

要飛到並鎖定中心點。

distance Number 0 optional

離中心點的距離。

param Object optional

focus參數。

Name Type Description
allowUpdateFocusPoint Boolean optional

是否允許使用者透過滑鼠操作異動中心點。

maxPolarAngle Number optional

攝影機相對中心點,與天頂夾角的上限(度)。

minPolarAngle Number optional

攝影機相對中心點,與天頂夾角的下限(度)。

maxDistance Number optional

攝影機可以離中心點的最遠距離(公尺)。

minDistance Number optional

攝影機可以離中心點的最近距離(公尺)。

polarAngle Number 0 optional

移動完畢後,攝影機相對中心點的天頂角。

azimuthAngle Number 0 optional

移動完畢後,攝影機相對中心點的方位角。

timeout Number 1000 optional

完成移動的總時間(毫秒)。

epsg Number 4326 optional

指定focusPoint參數的EPSG。

callback ov.TerrainView~gotoAndFocusCallback optional

移動完成後執行的回呼。

gotoCamera(camera, jump, callback)

webgl/ov.js, line 1999

移動到設定的攝影機位置。

Name Type Default Description
camera ov.Camera

攝影機參數。

jump Boolean false optional

true:跳,false:瞬移。

callback ov.TerrainView~gotoCameraCallback optional

jump成功後執行的回呼。

Example

var pos = new GeoPoint(120.3, 22.5, 100);
var v = new Geo3DPoint(0, 0, -1);
var up = new Geo3DPoint(0, 1, 0);
var camera = new ov.Camera(pos, v, up);
terrainView.gotoCamera(camera, true);

input3DBall(parameter)

webgl/ov.js, line 3355

輸入球。

Name Type Description
parameter Object optional

參數物件。

Name Type Default Description
color ov.Color new ov.Color("#FF0000") optional

顏色。

onCompleted ov.TerrainView~input3DBallOnCompleted optional

輸入完成的回呼函式。

onInputting ov.TerrainView~input3DBallOnInputting optional

輸入中的回呼函式。

input3DPoint(parameter)

webgl/ov.js, line 3126

輸入三維點。

Name Type Description
parameter Object optional

參數物件。

Name Type Description
onCompleted ov.TerrainView~input3DPointOnCompleted optional

輸入完成的回呼函式。

input3DPolyline(parameter)

webgl/ov.js, line 3205

輸入三維聚合線。

Name Type Description
parameter Object optional

參數物件。

Name Type Default Description
color ov.Color new ov.Color("#FF0000") optional

顏色。

maxStep Number Number.MAX_SAFE_INTEGER optional

最多輸入幾段。

onCompleted ov.TerrainView~input3DPolylineOnCompleted optional

輸入完成的回呼函式。

onInputting ov.TerrainView~input3DPolylineOnInputting optional

輸入中的回呼函式。

inputScreenRectangle(parameter)

webgl/ov.js, line 3404

輸入矩形。

Name Type Description
parameter Object optional

參數物件。

Name Type Default Description
color ov.Color new ov.Color("#FF0000") optional

顏色。

onCompleted ov.TerrainView~inputScreenRectangleOnCompleted optional

輸入完成的回呼函式。

onInputting ov.TerrainView~inputScreenRectangleOnInputting optional

輸入中的回呼函式。

inputSurfaceCircle(parameter)

webgl/ov.js, line 3306

輸入表面圓。

Name Type Description
parameter Object optional

參數物件。

Name Type Default Description
color ov.Color new ov.Color("#FF0000") optional

顏色。

onCompleted ov.TerrainView~inputSurfaceCircleOnCompleted optional

輸入完成的回呼函式。

onInputting ov.TerrainView~inputSurfaceCircleOnInputting optional

輸入中的回呼函式。

inputSurfacePoint(parameter)

webgl/ov.js, line 3101

輸入表面點。

Name Type Description
parameter Object optional

參數物件。

Name Type Description
onCompleted ov.TerrainView~inputSurfacePointOnCompleted optional

輸入完成的回呼函式。

inputSurfacePolygon(parameter)

webgl/ov.js, line 3256

輸入表面多邊形。

Name Type Description
parameter Object optional

參數物件。

Name Type Default Description
color ov.Color new ov.Color("#FF0000") optional

顏色。

maxStep Number Number.MAX_SAFE_INTEGER optional

最多輸入幾段。

onCompleted ov.TerrainView~inputSurfacePolygonOnCompleted optional

輸入完成的回呼函式。

onInputting ov.TerrainView~inputSurfacePolygonOnInputting optional

輸入中的回呼函式。

inputSurfacePolyline(parameter)

webgl/ov.js, line 3154

輸入表面聚合線。

Name Type Description
parameter Object

參數物件。

Name Type Default Description
color ov.Color new ov.Color("#FF0000") optional

顏色。

maxStep Number Number.MAX_SAFE_INTEGER optional

最多輸入幾段。

onCompleted ov.TerrainView~inputSurfacePolylineOnCompleted optional

輸入完成的回呼函式。

onInputting ov.TerrainView~inputSurfacePolylineOnInputting optional

輸入中的回呼函式。

inputSurfaceRectangle(parameter)

webgl/ov.js, line 3449

輸入表面矩形。

Name Type Description
parameter Object optional

參數物件。

Name Type Default Description
color ov.Color new ov.Color("#FF0000") optional

顏色。

onCompleted ov.TerrainView~inputSurfaceRectangleOnCompleted optional

輸入完成的回呼函式。

onInputting ov.TerrainView~inputSurfaceRectangleOnInputting optional

輸入中的回呼函式。

isOpen(){Boolean}

webgl/ov.js, line 1666

地形場景是否開啟成功。

Returns:
Type Description
Boolean 是否開啟成功。
Example

var result = terrainView.isOpen();

measure2DLength(param)

webgl/ov.js, line 3582

測量2D距離。

Name Type Description
param Object optional

參數物件。

Name Type Default Description
color ov.Color new ov.Color("#FF0000") optional

測量時,在螢幕畫出回饋的顏色。

colorOpacity Number 1 optional

測量時,在螢幕畫出回饋的顏色不透明度。

markGeoColor ov.Color new ov.Color("#0000FF") optional

標示測量結果幾何部份的顏色。

markGeoColorOpacity Number 1 optional

標示測量結果幾何部份的顏色不透明度。

markTagColor ov.Color new ov.Color("#FFFF00") optional

標示測量結果文字部份的顏色。

markTagColorOpacity Number 1 optional

標示測量結果文字部份的顏色不透明度。

measureScale Number 1 optional

測量結果要再乘以之Scale。

measureDecimalPoint Number 1 optional

測量結果要留的小數點數。

measureUnitName Object optional

測量單位參數物件。

Name Type Default Description
distance String "{VALUE}(m)" optional

測量結果要標示的長度格式。

onCompleted ov.TerrainView~measure2DLengthOnCompleted optional

測量完成的回呼函式。

measureArea(param)

webgl/ov.js, line 3816

測量面積。

Name Type Description
param Object optional

參數物件。

Name Type Default Description
color ov.Color new ov.Color("#FF0000") optional

測量時,在螢幕畫出回饋的顏色。

colorOpacity Number 0.5 optional

測量時,在螢幕畫出回饋的顏色不透明度。

markGeoColor ov.Color new ov.Color("#0000FF") optional

標示測量結果幾何部份的顏色。

markGeoColorOpacity Number 0.5 optional

標示測量結果幾何部份的顏色不透明度。

markTagColor ov.Color new ov.Color("#FFFF00") optional

標示測量結果文字部份的顏色。

markTagColorOpacity Number 1 optional

標示測量結果文字部份的顏色不透明度。

measureScale Number 1 optional

測量結果要再乘以之Scale。

measureDecimalPoint Number 1 optional

測量結果要留的小數點數。

measureUnitName Object optional

測量單位參數物件。

Name Type Default Description
area String "{VALUE}(m²)" optional

測量結果要標示的面積格式。

onCompleted ov.TerrainView~measureAreaOnCompleted optional

測量完成的回呼函式。

measureHeight(param)

webgl/ov.js, line 3760

測量高度。

Name Type Description
param Object optional

參數物件。

Name Type Default Description
auxiliaryPlaneSize Number 0 optional

參考平面的大小,若未輸入或給0時,則使用自適應大小。

color ov.Color new ov.Color("#FF0000") optional

測量時,在螢幕畫出回饋的顏色。

colorOpacity Number 1 optional

測量時,在螢幕畫出回饋的顏色不透明度。

markGeoColor ov.Color new ov.Color("#0000FF") optional

標示測量結果幾何部份的顏色。

markGeoColorOpacity Number 1 optional

標示測量結果幾何部份的顏色不透明度。

markTagColor ov.Color new ov.Color("#FFFF00") optional

標示測量結果文字部份的顏色。

markTagColorOpacity Number 1 optional

標示測量結果文字部份的顏色不透明度。

measureScale Number 1 optional

測量結果要再乘以之Scale。

measureDecimalPoint Number 1 optional

測量結果要留的小數點數。

measureUnitName Object optional

測量單位參數物件。

Name Type Default Description
distance String "{VALUE}(m)" optional

測量結果要標示的長度格式。

onCompleted ov.TerrainView~measureHeightOnCompleted optional

測量完成的回呼函式。

measureSpatialLength(param)

webgl/ov.js, line 3704

測量空間距離。

Name Type Description
param Object optional

參數物件。

Name Type Default Description
color ov.Color new ov.Color("#FF0000") optional

測量時,在螢幕畫出回饋的顏色。

colorOpacity Number 1 optional

測量時,在螢幕畫出回饋的顏色不透明度。

markGeoColor ov.Color new ov.Color("#0000FF") optional

標示測量結果幾何部份的顏色。

markGeoColorOpacity Number 1 optional

標示測量結果幾何部份的顏色不透明度。

markTagColor ov.Color new ov.Color("#FFFF00") optional

標示測量結果文字部份的顏色。

markTagColorOpacity Number 1 optional

標示測量結果文字部份的顏色不透明度。

measureScale Number 1 optional

測量結果要再乘以之Scale。

measureDecimalPoint Number 1 optional

測量結果要留的小數點數。

measureUnitName Object optional

測量單位參數物件。

Name Type Default Description
distance String "{VALUE}(m)" optional

測量結果要標示的長度格式。

onCompleted ov.TerrainView~measureSpatialLengthOnCompleted optional

測量完成的回呼函式。

measureSpatialPointToPointLength(param)

webgl/ov.js, line 3641

測量點到點距離。

Name Type Description
param Object optional

參數物件。

Name Type Default Description
color ov.Color new ov.Color("#FF0000") optional

測量時,在螢幕畫出回饋的顏色。

colorOpacity Number 1 optional

測量時,在螢幕畫出回饋的顏色不透明度。

markGeoColor ov.Color new ov.Color("#0000FF") optional

標示測量結果幾何部份的顏色。

markGeoColorOpacity Number 1 optional

標示測量結果幾何部份的顏色不透明度。

markTagColor ov.Color new ov.Color("#FFFF00") optional

標示測量結果文字部份的顏色。

markTagColorOpacity Number 1 optional

標示測量結果文字部份的顏色不透明度。

measureScale Number 1 optional

測量結果要再乘以之Scale。

measureDecimalPoint Number 1 optional

測量結果要留的小數點數。

measureUnitName Object optional

測量單位參數物件。

Name Type Default Description
distance String "{VALUE}(m)" optional

測量結果要標示的長度格式。

distanceHorizontal String "{VALUE}(m)" optional

測量結果要標示的水平長度格式。

distanceVertical String "{VALUE}(m)" optional

測量結果要標示的垂直長度格式。

angleIncluded String "{VALUE}°" optional

測量結果要標示的角度格式。

slope String "{VALUE}%" optional

測量結果要標示的坡度格式。

onCompleted ov.TerrainView~measureSpatialPointToPointLengthOnCompleted optional

測量完成的回呼函式。

measureSurfaceLength(param)

webgl/ov.js, line 3524

測量地表距離。

Name Type Description
param Object optional

參數物件。

Name Type Default Description
color ov.Color "#FF0000" optional

測量時,在螢幕畫出回饋的顏色。

colorOpacity Number 1 optional

測量時,在螢幕畫出回饋的顏色不透明度。

markGeoColor ov.Color "#0000FF" optional

標示測量結果幾何部份的顏色。

markGeoColorOpacity Number 1 optional

標示測量結果幾何部份的顏色不透明度。

markTagColor ov.Color "#FFFF00" optional

標示測量結果文字部份的顏色。

markTagColorOpacity Number 1 optional

標示測量結果文字部份的顏色不透明度。

measureScale Number 1 optional

測量結果要再乘以之Scale。

measureDecimalPoint Number 1 optional

測量結果要留的小數點數。

measureSampleSize Number 300 optional

地表高程的取樣數。

measureUnitName Object optional

測量單位參數物件。

Name Type Default Description
distance String "{VALUE}(m)" optional

測量結果要標示的長度格式。

measureTerrain Object optional

測量目標地形參數,若未指定則量測目前系統載入的地形。

Name Type Default Description
identifier String "" optional

測量目標地形名稱,預設為圖台載入的地形。

url String "" optional

測量目標地形伺服器位址,預設為圖台載入的地形。

onCompleted ov.TerrainView~measureSurfaceLengthOnCompleted optional

測量完成的回呼函式。

measureTerrainSurfaceArea(param)

webgl/ov.js, line 3870

測量表面面積。

Name Type Description
param Object optional

參數物件。

Name Type Default Description
color ov.Color new ov.Color("#FF0000") optional

測量時,在螢幕畫出回饋的顏色。

colorOpacity Number 0.5 optional

測量時,在螢幕畫出回饋的顏色不透明度。

markGeoColor ov.Color new ov.Color("#0000FF") optional

標示測量結果幾何部份的顏色。

markGeoColorOpacity Number 0.5 optional

標示測量結果幾何部份的顏色不透明度。

markTagColor ov.Color new ov.Color("#FFFF00") optional

標示測量結果文字部份的顏色。

markTagColorOpacity Number 1 optional

標示測量結果文字部份的顏色不透明度。

measureScale Number 1 optional

測量結果要再乘以之Scale。

measureDecimalPoint Number 1 optional

測量結果要留的小數點數。

measureSampleSize Number 300 optional

地表高程的取樣數。

measureUnitName Object optional

測量單位參數物件。

Name Type Default Description
area String "{VALUE}(m²)" optional

測量結果要標示的面積格式。

measureTerrain Object optional

測量目標地形參數。

Name Type Default Description
identifier String "" optional

測量目標地形名稱,預設為圖台載入的地形。

url String "" optional

測量目標地形伺服器位址,預設為圖台載入的地形。

calcInaccuracy Boolean false optional

是否計算不準確度。

sendTriangles Boolean false optional

是否回傳切出來的三角面。

onCompleted ov.TerrainView~measureAreaOnCompleted optional

測量完成的回呼函式。

moveFunSetting(setting)

webgl/ov.js, line 1732

設定MoveFun設定。

Name Type Description
setting Object

設定。

Name Type Description
smoothZoom Boolean optional

平滑縮放。

autoPanFactor Number optional

自動拖曳常數0~1,0:關閉自動拖曳,1不會停下。

Example

terrainView.moveFunSetting({smoothZoom: true});

moveTerrainOverlay(oldIndex, newIndex){Boolean}

webgl/ov.js, line 2992

移動地形的Overlay的順序,注意移動非交換,其餘圖層會保持原順序排列,如[0, 1, 2]->[2, 0, 1],若失敗則不移動。

Name Type Description
oldIndex Number | String

原本的index,也可以給圖層名稱當作索引。

newIndex Number | String

新的index,也可以給圖層名稱當作索引。

Returns:
Type Description
Boolean 是否成功。

openFileMesh(url, fileObject, urlTemplate, callback, format)

webgl/ov.js, line 2583

使用File新增Mesh,CFileMesh不用時需自行呼叫Release。

Name Type Description
url String

ServerUrl。

fileObject File

File物件。

urlTemplate String

網址字串模板,不使用代理則為{URL}。

callback ov.TerrainView~openFileMeshCallback

開啟完成後的回呼函式。

format String

回呼函式回傳的資料格式,不使用時預設Undefined

See:

openTerrain(param)

webgl/ov.js, line 1378

開啟地形場景。

Name Type Description
param Object

參數物件。

Name Type Description
url String

位址。

identifier String

地形圖層名稱。

callback ov.TerrainView~openTerrainCallback optional

執行完成後的回呼函式。

urlTemplate String optional

網址字串模板,不使用代理則為{URL}。

Example

var param = {};
param.url = "http://127.0.0.1:8080";
param.identifier = "terrainLayerName";
param.callback = function(layer, success){if(success){console.log(layer.name);}};
terrainView.openTerrain(param);

panelSetting(setting)

webgl/ov.js, line 1716

設定控制面板的參數。

Name Type Description
setting Object

設定。

Name Type Description
color ov.Color optional

顏色。

offset GeoPoint optional

面板位移pixel。

posType POS_TYPE optional

面板預設位置POS_TYPE列舉,LT左上LB左下RT右上RB右下。

alwaysUseFullPanel Boolean optional

永遠顯示完整面板。

Example

terrainView.panelSetting({
color: new ov.Color("#00E8E8"),
offset: new GeoPoint(10, 10),
posType: POS_TYPE.LT
});

randomGoto()

webgl/ov.js, line 4146

隨機飛到任意點。

reloadTerrain(identifier, callback)

webgl/ov.js, line 1395

重新載入同伺服器的另一個地形場景。

Name Type Description
identifier String

地形圖層名稱。

callback ov.TerrainView~reloadTerrainCallback

執行完成後的回呼函式。

Example

terrainView.reloadTerrain("terrain", function(success){console.log(success);});

reloadTerrainOverlay(index){Boolean}

webgl/ov.js, line 3034

強制重新載入地形的Overlay紋理。

Name Type Description
index number | string

index或圖層名稱。

Returns:
Type Description
Boolean 是否成功。
Example

terrainView.reloadTerrainOverlay(0); //重新載入第1個Overlay
terrainView.reloadTerrainOverlay("Taiwan3857"); //重新載入指定Overlay
terrainView.reloadTerrainOverlay(); //全部重載

removeConditionOverlayLayer(){Boolean}

webgl/ov.js, line 4448
Returns:
Type Description
Boolean 是否有移除成功。

removeEventListener(eventName, callback){Boolean}

webgl/ov.js, line 1942

移除事件監聽器。

Name Type Description
eventName String

事件名稱,參考ov.TerrainView#addEventListener

callback callback

加入時的事件回呼。

Returns:
Type Description
Boolean 是否移除成功。
Example

var result = terrainView.removeEventListener("InputCompleted", myCallback);

removeLayer(layer){Boolean}

webgl/ov.js, line 3064

移除圖層。

Name Type Description
layer ov.Layer

要移除的圖層物件。

Returns:
Type Description
Boolean 是否移除成功。

removeMeshBVH(mesh)

webgl/ov.js, line 5338

移除指定網格包圍體階層。

Name Type Description
mesh ov.MeshBVH

網格包圍體階層。

removeMoveEvent(moveEvent)

webgl/ov.js, line 5290

移除移動事件。

Name Type Description
moveEvent ov.MoveEvent

欲移除的移動事件。

removeOverlayWindow(overlayWindow)

webgl/ov.js, line 5171

移除指定疊加圖層切窗視窗。

Name Type Description
overlayWindow ov.OverlayWindow

疊加圖層切窗視窗物件。

removeSliceSpace()

webgl/ov.js, line 4124

移除裁切空間ov.TerrainView#setSliceSpace

removeTerrainOverlay(index){Boolean}

webgl/ov.js, line 3016

移除地形的Overlay,會造成後面的圖層往前移。

Name Type Description
index number | string | Object

index或圖層名稱或手柄。

Returns:
Type Description
Boolean 是否成功。
Example

terrainView.removeTerrainOverlay(0); //移除第1個Overlay
terrainView.removeTerrainOverlay("Taiwan3857"); //移除指定Overlay
terrainView.removeTerrainOverlay(overlay); //移除指定Overlay
terrainView.removeTerrainOverlay(); //全部移除

removeTimeEvent(index)

webgl/ov.js, line 5241

移除時間事件。

Name Type Description
index Number

事件編號。

resetMoveModeKeyboardMapping()

webgl/ov.js, line 1618

重設移動模式鍵盤映射。

resetMoveModeMouseMapping()

webgl/ov.js, line 1637

重設移動模式滑鼠映射。

resumeBaseLayerSetting(){Boolean}

webgl/ov.js, line 2570

恢復地形檔的WMTS影像。

Returns:
Type Description
Boolean 是否恢復成功。

rotateBy(center, rotSpeed, maxRotArg, lookAtCenter)

webgl/ov.js, line 2225

繞著指定坐標維持固定距離旋轉。

Name Type Default Description
center GeoPoint

旋轉的中心點。

rotSpeed Number

旋轉的速率,單位為Deg/Sec。

maxRotArg Number 0 optional

最多只旋轉幾度,若0或沒輸入,代表一直旋轉。

lookAtCenter Boolean true optional

旋轉時,是否一直看著中心。

setBaseLayer(settings){Boolean}

webgl/ov.js, line 2562

設定地形檔的WMTS影像。

Name Type Description
settings Object

WMTS參數物件的settings,參考ov.TerrainView#addTerrainWMTSOverlay

Returns:
Type Description
Boolean 是否設定成功。

setConditionForHideOverlayLayer(setting, callback)

webgl/ov.js, line 4189

設置有隱藏條件的向量圖層(例:行政區圖層)。

Name Type Description
setting Object

參數物件。

Name Type Description
url String

MapServer網址。

layerName String

在MapServer上圖層的名稱。

drawColor ov.Color

外框線顏色。

fillColor ov.Color

內部填滿色。

sql String

要設為隱藏的條件。

callback ov.TerrainView~setConditionForHideOverlayLayerCallback optional

執行完成後的回呼。

Example

var setting = {};
setting.url = "http://127.0.0.1:8080";
setting.drawColor = new ov.Color("#FF0000FF"); //紅色
setting.fillColor = new ov.Color("#FFFF00FF"); //黃色
setting.layerName = "town"; //全台灣行政區圖
setting.sql="COUNTYNAME!='桃園市'"; //桃園市以外全部隱藏
terrainView.setConditionForHideOverlayLayer(setting);

setConditionOverlayLayer(setting, callback)

webgl/ov.js, line 4336

設置條件式向量圖層。

Name Type Description
setting Object

參數物件。

Name Type Description
url String

MapServer網址。

layerName String

在MapServer上圖層的名稱。

drawColor String

外框線顏色(#argb)。

fillColor String

內部填滿色(#argb)。

extraSettings Object optional

上述沒包含的參數,放此物件上(例:setting.extraSettings.LineWidth = "2")。

condition Array.<Object> optional

條件陣列(參數可參考MapServer上向量圖層的條件設定)。

callback ov.TerrainView~setConditionOverlayLayerCallback optional

執行完成後的回呼。

Example

var setting = {};
setting.url = "http://127.0.0.1:8080";
setting.layerName = "town";
setting.drawColor = "#FFFF0000"; //紅色
setting.fillColor = "#FFFFFF00"; //黃色
setting.conditions = [];
//1.將臺中市以外隱藏
var condition1 = {};
condition1.SQL = "COUNTYNAME !='臺中市'";
condition1.Show = "0";
//2.將西屯區設為綠色
var condition2 = {};
condition2.SQL = "TOWNNAME = '西屯區'";
condition2.FillColor = "#FF00FF00";
//3.將南屯區設為紅色
var condition3 = {};
condition3.SQL = "TOWNNAME = '南屯區'";
condition3.FillColor = "#FF0000FF";
setting.conditions.push(condition1);
setting.conditions.push(condition2);
setting.conditions.push(condition3);
terrainView.setConditionOverlayLayer(setting);

setCursorSetting(param)

webgl/ov.js, line 5187

設定游標樣式,若使用url,網址請用雙引號包起來,整組字串請用單引號包起來,如'url("http://localhost:35727/webgl/texture/red.png") 2 2, pointer'。

Name Type Description
param Object

參數。

Name Type Default Description
defaultCursor String "default" optional

預設游標樣式。

moveModeMouseCursor String "grabbing" optional

滑鼠模式游標拖曳樣式。

moveModePanelCursor String "grabbing" optional

面板模式游標拖曳樣式。

moveModeFocusCursor String "grabbing" optional

旋轉模式游標拖曳樣式。

moveModeWalkCursor String "move" optional

地面行走模式游標拖曳樣式。

measureCursor String "crosshair" optional

測量游標樣式。

inputCursor String "copy" optional

輸入游標樣式。

clickableCursor String "pointer" optional

可點擊游標樣式。

setDirection(direction)

webgl/ov.js, line 2074

設定攝影機的方位角。

Name Type Description
direction Number

方向角(以自己的北方為0)。

setDrawTerrainSetting(setting)

webgl/ov.js, line 1512

設定地形的作畫設定

Name Type Description
setting Object

作畫設定

Name Type Description
deepWaterColor ov.Color

深水顏色

shallowWaterColor ov.Color

水表面顏色

waveScale Number

波浪大小

reflectiveColor ov.Color

水面反射的顏色

flowRate Number

水流流速

emptyTileImage String

指定失聯圖磚替代影像

baseColor ov.Color

指定地形底色

cullingSurface Boolean

指定是否剃除反向的三角形表面

surface Boolean

指定作畫時是否要輸出三角面

vertexWireframe Boolean

輸出網格。

vertexWireframeWithBaseOverlay Boolean

指定頂點網格是否要使用紋理上色

vertexWireframeDensityLevel Number

網格密度等級(1~6)。

wireframeColor ov.Color

指定網格的顏色

wireframeOpacity Number

指定網格的不透明度

magFilter ENUM_GL

放大過濾

minFilter ENUM_GL

縮小過濾

mipAnisotropy Boolean

各向異性過濾

noElevation Boolean

關閉高程

showWater Boolean

是否輸出水

waterQuality Boolean

水面渲染品質,分為"very high"、"high"、"normal"、"low"

referenceColorGradientFactor Number

參考表面漸變因數

referenceBaseColorFactor Number

參考表面漸變底色最低比例

referenceBaseColor ov.Color

參考表面底色

referenceSecondaryColor ov.Color

參考表面輔色

referenceGrid Boolean

顯示參考表面格線

referenceGridColor ov.Color

參考表面格線顏色

grid Boolean

輸出框線

skirt Boolean

輸出裙邊

referenceSurface Boolean

輸出參考表面

isDrawAtmoGround Boolean

是否繪製地表大氣

contourSetting Object

等高線設定

Name Type Description
isopen Boolean

是否開啟等高線

hideWhenMoving Boolean

移動時是否隱藏

interval Number

等高線級距

color ov.Color

等高線顏色

alpha Number

等高線不透明度

aspectColorSetting Object

坡向填色設定,優先度最高

Name Type Description
isopen Boolean

是否開啟坡向填色

colorset Array.<ov.Color>

坡向填色分層顏色

degreeset Array.<Number>

坡向填色分層坡向

alpha Number

坡向填色不透明度

slopeColorSetting Object

坡度填色設定,優先度第二

Name Type Description
isopen Boolean

是否開啟坡度填色

colorset Array.<ov.Color>

坡度填色分層顏色

degreeset Array.<Number>

坡度填色分層坡向

alpha Number

坡度填色不透明度

heightColorSetting Object

高度填色設定,優先度最低

Name Type Description
isopen Boolean

是否開啟高度填色

colorset Array.<ov.Color>

高度填色分層顏色

heightset Array.<Number>

高度填色分層高度

alpha Number

高度填色不透明度

graticuleSetting Object

經緯線設定

Name Type Description
isOpen Boolean

是否開啟經緯線

lngLatLineColor ov.Color

經緯線顏色

lngLatLineSize Number

經緯線大小

lngLatTextColor ov.Color

經緯線文字顏色

tropicOfCancerLineColor ov.Color

北迴歸線顏色

tropicOfCancerLineSize Number

北迴歸線大小

tropicOfCancerTextColor ov.Color

北迴歸線文字顏色

tropicOfCapricornLineColor ov.Color

南迴歸線顏色

tropicOfCapricornLineSize Number

南迴歸線大小

tropicOfCapricornTextColor ov.Color

南迴歸線文字顏色

primeMeridianLineColor ov.Color

本初子午線顏色

primeMeridianLineSize Number

本初子午線大小

primeMeridianTextColor ov.Color

本初子午線文字顏色

antiMeridianLineColor ov.Color

對向子午線顏色

antiMeridianLineSize Number

對向子午線大小

antiMeridianTextColor ov.Color

對向子午線文字顏色

equatorLineColor ov.Color

赤道顏色

equatorLineSize Number

赤道大小

equatorTextColor ov.Color

赤道文字顏色

Example

terrainView.setDrawTerrainSetting({
contourSetting:{isopen:true},
aspectColorSetting:{isopen:true},
baseColor:new ov.Color("#FFFFFF"),
cullingSurface:true,
surface:true,
vertexWireframeWithBaseOverlay:true,
wireframeColor:ov.Color("#FFFFFF"),
emptyTileImage:"img.png"
});

setFov(horizontalFov){Boolean}

webgl/ov.js, line 2019

設置圖台水平視野角度(Fov)。

Name Type Description
horizontalFov Number

水平視野角度(Field of View)。

Returns:
Type Description
Boolean 是否設置成功。

setLayerSelectedEntity(layer, id)

webgl/ov.js, line 1858

在指定的圖層物件上選取或清除選取指定的圖素。

Name Type Description
layer ov.Layer

指定圖層物件。

id Number

指定的圖素Id。

setMeasureEpsg(measureEpsg){Boolean}

webgl/ov.js, line 3918

設定測量用的Epsg,測量的計算上會先轉成此Epsg才計算,不接受4326。

Name Type Description
measureEpsg Number

測量用的Epsg。

Returns:
Type Description
Boolean 是否設定成功。

setMoveMode(mode, param)

webgl/ov.js, line 1564

設置操作模式。

Name Type Description
mode ov.MOVE_TYPE

操作模式。

param Object

操作模式的參數,參考ov.MOVE_TYPE

setMoveModeKeyboardMapping(keyboardMappingSetting)

webgl/ov.js, line 1611

設定移動模式鍵盤映射。

Name Type Description
keyboardMappingSetting Object

映射設定,使用KeyboardEvent.code。

Example

//IJKL分別映射到WASD
let keyboardMappingSetting = {};
keyboardMappingSetting.KeyI = "KeyW";
keyboardMappingSetting.KeyJ = "KeyA";
keyboardMappingSetting.KeyK = "KeyS";
keyboardMappingSetting.KeyL = "KeyD";
terrainView.setKeyboardMapping(keyboardMappingSetting);

setMoveModeMouseMapping(button, mappingButton)

webgl/ov.js, line 1630

設定移動模式滑鼠映射。

Name Type Description
button ov.MOUSE_BUTTON

滑鼠按鍵。

mappingButton ov.MOUSE_BUTTON

映射按鍵。

Example

//將滑鼠左鍵映射滑鼠右鍵。
terrainView.setMoveModeMouseMapping(ov.MOUSE_BUTTON.LEFT, ov.MOUSE_BUTTON.RIGHT);

setPath(path)

webgl/ov.js, line 1676

設定程式碼所在路徑。

Name Type Description
path String

路徑。

Example

terrainView.setPath("../webgl/");

setRestrictedArea(polygonSet)

webgl/ov.js, line 5249

設定禁止通行區域。

Name Type Description
polygonSet GeoPolygonSet

禁止通行區域幾何,可接受polygonSet array。

setSeaAltitude(seaAltitude){Boolean}

webgl/ov.js, line 1685

設定海平面高度。

Name Type Description
seaAltitude Number

海平面高度。

Returns:
Type Description
Boolean 是否設定成功。

setSeaQuality(quality){Boolean}

webgl/ov.js, line 1698

設定海渲染品質,預設為normal。

Name Type Description
quality seaQuality

渲染品質,分成"very high"、"high"、"normal"、"low"。

Returns:
Type Description
Boolean 是否設定成功。

setSliceSpace(param)

webgl/ov.js, line 4079

設定裁切空間,會直接清除舊的裁切空間。

Name Type Description
param Object optional

參數物件。

Name Type Default Description
color ov.Color new ov.Color("#FF0000") optional

在螢幕畫出回饋的顏色。

colorOpacity Number 0.5 optional

在螢幕畫出回饋的顏色不透明度。

markTagColor ov.Color new ov.Color("#FFFF00") optional

標示測量結果文字部份的顏色。

markTagColorOpacity Number 1 optional

標示測量結果文字部份的顏色不透明度。

measureScale Number 1 optional

測量結果要再乘以之Scale。

measureDecimalPoint Number 1 optional

測量結果要留的小數點數。

setTerrainFade(param)

webgl/ov.js, line 5218

設定地形開始淡出淡出參數。

Name Type Description
param Object

參數。

Name Type Description
useFade Boolean

開啟地形淡出淡出。

near Number

開始淡出的距離。

far Number

完全消失的距離。

setVertArg(vertArg)

webgl/ov.js, line 2083

設定攝影機的俯仰角。

Name Type Description
vertArg Number

俯仰角(水平為0,俯正仰負)。

setViewDistort(param)

webgl/ov.js, line 5201

設定圖台畫面扭曲參數。

Name Type Description
param Object

參數。

Name Type Default Description
cameraIntrinsicMatrix Array.<Number>

相機3*3內參矩陣,長度為9的數字陣列。

cameraDistortionCoefficient Array.<Number>

相機畸變參數,長度為5的數字陣列。

isOpen Boolean false optional

是否開啟。

updateInterval Number 1000 optional

影像更新頻率,0為不更新,單位為毫秒。

cameraWidth Number 1920 optional

相機影像寬。

cameraHeight Number 1080 optional

相機影像高。

showTerrainBoundingVolume(show)

webgl/ov.js, line 3053

是否顯示地形的包圍盒。

Name Type Description
show Boolean

是否顯示。

Example

terrainView.showTerrainBoundingVolume(true); //顯示包圍盒
terrainView.showTerrainBoundingVolume(false); //關閉顯示包圍盒

swapTerrainOverlay(firstIndex, secondIndex){Boolean}

webgl/ov.js, line 3002

交換地形的Overlay的順序,若失敗則不交換。

Name Type Description
firstIndex Number | String

第一個圖層的index,也可以給圖層名稱當作索引。

secondIndex Number | String

第二個圖層的index,也可以給圖層名稱當作索引。

Returns:
Type Description
Boolean 是否成功。

updateMoveModeParameter(param)

webgl/ov.js, line 1595

更新目前操作模式的參數。

Name Type Description
param Object

操作模式的參數,參考ov.MOVE_TYPE

updateScreen()

webgl/ov.js, line 4131

更新畫面。

windowToTerrain(p){Boolean}

webgl/ov.js, line 3952

將指定螢幕座標轉換成對應的地形位置。

Name Type Description
p GeoPoint

指定位置。

Returns:
Type Description
Boolean 轉換是否成功。

worldToWindow(p, absHeight){Boolean}

webgl/ov.js, line 3962

將指定的世界座標轉換至螢幕座標。

Name Type Description
p GeoPoint

指定位置。

absHeight Boolean

是否為絕對高度。

Returns:
Type Description
Boolean 轉換是否成功。

Type Definitions

addCustomLayerCallback(success, customLayer)

webgl/ov.js, line 2550
Name Type Description
success Boolean

是否成功。

customLayer ov.CustomLayer

自畫圖層。

See:

addEventListenerCallback(MeasureCompletedResult, CameraPosChangedPos, CameraPosChangedV, CameraPosChangedUp, ClickResultMousePos, ClickResultWorldPos, MouseDownResultButton, MouseDownResultMousePos, MouseDownResultMapPos)

webgl/ov.js, line 1915
Name Type Description
MeasureCompletedResult Object

MeasureCompleted結果。

Name Type Description
success Boolean

測量是否成功。

length Number optional

長度測量結果。

height Number optional

高度測量結果。

area Number optional

面積測量結果。

measureObj Object optional

傳入的物件。

CameraPosChangedPos GeoPoint

CameraPosChanged結果的Pos。

CameraPosChangedV Geo3DPoint

CameraPosChanged結果的V。

CameraPosChangedUp Geo3DPoint

CameraPosChanged結果的Up。

ClickResultMousePos GeoPoint

ClickResult結果的滑鼠位置。

ClickResultWorldPos GeoPoint

ClickResult結果的世界位置。

MouseDownResultButton Number

MouseDown結果的滑鼠按鍵。

MouseDownResultMousePos GeoPoint

MouseDown結果的滑鼠位置。

MouseDownResultMapPos GeoPoint

MouseDown結果的地圖位置。

See:

addModelLayerCallback(success, modelLayer)

webgl/ov.js, line 2465
Name Type Description
success Boolean

是否成功。

modelLayer ov.ModelLayer

模型圖層。

See:

addModelSetLayerCallback(success, modelSetLayer)

webgl/ov.js, line 2493
Name Type Description
success Boolean

是否成功。

modelSetLayer ov.ModelSetLayer

模型集圖層。

See:

addOGC3DTilesLayerCallback(success, OGC3DTilesLayer)

webgl/ov.js, line 2326
Name Type Description
success Boolean

是否成功。

OGC3DTilesLayer ov.OGC3DTilesLayer

OGC3DTiles圖層。

See:

addOGCI3SLayerCallback(success, OGCI3SLayer)

webgl/ov.js, line 2353
Name Type Description
success Boolean

是否成功。

OGCI3SLayer ov.OGCI3SLayer

I3S圖層。

See:

addPhotogrammetryModelLayerCallback(success, photogrammetryModelLayer)

webgl/ov.js, line 2300
Name Type Description
success Boolean

是否成功。

photogrammetryModelLayer ov.PhotogrammetryModelLayer

傾斜攝影模型圖層。

See:

addPhotogrammetryModelMeshBVHCallback(success, photogrammetryModelMeshBVH)

webgl/ov.js, line 5327
Name Type Description
success Boolean

是否成功。

photogrammetryModelMeshBVH ov.PhotogrammetryModelMeshBVH

傾斜攝影模型網格包圍體階層。

See:

addPipelineLayerCallback(success, pipelineLayer)

webgl/ov.js, line 2381
Name Type Description
success Boolean

是否成功。

pipelineLayer ov.PipelineLayer

管線圖層。

See:

addPointCloudLayerCallback(success, pointCloudLayer)

webgl/ov.js, line 2437
Name Type Description
success Boolean

是否成功。

pointCloudLayer ov.PointCloudLayer

點雲圖層。

See:

addProjectorLayerCallback(success, projectorLayer)

webgl/ov.js, line 2514
Name Type Description
success Boolean

是否成功。

projectorLayer ov.ProjectorLayer

監視器圖層。

See:

addTerrainCustomTileOverlayCallback(param)

webgl/ov.js, line 2612
Name Type Description
param Object

參數物件。

Name Type Description
success Boolean

是否成功。

message String optional

錯誤訊息。

See:

addTerrainSceneOverlayCallback(param)

webgl/ov.js, line 2929
Name Type Description
param Object

參數物件。

Name Type Description
success Boolean

是否成功。

message String optional

錯誤訊息。

See:

addTerrainSingleTileOverlayCallback(param)

webgl/ov.js, line 2639
Name Type Description
param Object

參數物件。

Name Type Description
success Boolean

是否成功。

message String optional

錯誤訊息。

See:

addTerrainVectorTileOverlayCallback(param)

webgl/ov.js, line 2845
Name Type Description
param Object

參數物件。

Name Type Description
success Boolean

是否成功。

message String optional

錯誤訊息。

layername String optional

圖層名稱。

See:

addTerrainVisualizedDataGridOverlayCallback(param)

webgl/ov.js, line 2897
Name Type Description
param Object

參數物件。

Name Type Description
success Boolean

是否成功。

message String optional

錯誤訊息。

See:

addTerrainWMTSOverlayCallback(param)

webgl/ov.js, line 2671
Name Type Description
param Object

參數物件。

Name Type Description
success Boolean

是否成功。

message String optional

錯誤訊息。

layername String optional

圖層名稱。

See:

addVectorLayerCallback(success, vectorLayer)

webgl/ov.js, line 2409
Name Type Description
success Boolean

是否成功。

vectorLayer ov.VectorLayer

向量圖層。

See:

facingCallback()

webgl/ov.js, line 2125
See:

focusWindowCenterFacingCallback()

webgl/ov.js, line 2150
See:

getScreenSnapCallback(canvasImage, canvasImageDataURL)

webgl/ov.js, line 4164
Name Type Description
canvasImage HTMLImageElement

畫面影像Image物件。

canvasImageDataURL String

畫面影像DomString。

See:

gotoAndFocusCallback()

webgl/ov.js, line 2213
See:

gotoCallback()

webgl/ov.js, line 2173
See:

gotoCameraCallback()

webgl/ov.js, line 2009
See:

input3DBallOnCompleted(onCompletedCallback)

webgl/ov.js, line 3379
Name Type Description
onCompletedCallback Object

輸入結束的結果。

Name Type Description
success Boolean

輸入是否成功。

geo Object optional

輸入結束的幾何。

Name Type Description
center GeoPoint optional

輸入的球心。

radius Number optional

輸入的半徑。

See:

input3DBallOnInputting(OnInputtingCallback)

webgl/ov.js, line 3388
Name Type Description
OnInputtingCallback Object

輸入中的結果。

Name Type Description
geo Object

輸入中的幾何。

Name Type Description
center GeoPoint

輸入中的圓心。

radius Number

輸入中的半徑。

See:

input3DPointOnCompleted(onCompletedCallback)

webgl/ov.js, line 3138
Name Type Description
onCompletedCallback Object

輸入結束的結果。

Name Type Description
success Boolean

輸入是否成功。

geo GeoPoint optional

輸入結束的幾何。

See:

input3DPolylineOnCompleted(onCompletedCallback)

webgl/ov.js, line 3234
Name Type Description
onCompletedCallback Object

輸入結束的結果。

Name Type Description
success Boolean

輸入是否成功。

geo GeoPolyline optional

輸入結束的幾何。

See:

input3DPolylineOnInputting(OnInputtingCallback)

webgl/ov.js, line 3241
Name Type Description
OnInputtingCallback Object

輸入中的結果。

Name Type Description
geo GeoPolyline

輸入中的幾何。

See:

inputScreenRectangleOnCompleted(onCompletedCallback)

webgl/ov.js, line 3428
Name Type Description
onCompletedCallback Object

輸入結束的結果。

Name Type Description
success Boolean

輸入是否成功。

geo CRect optional

輸入結束的幾何。

See:

inputScreenRectangleOnInputting(OnInputtingCallback)

webgl/ov.js, line 3435
Name Type Description
OnInputtingCallback Object

輸入中的結果。

Name Type Description
geo CRect

輸入中的幾何。

See:

inputSurfaceCircleOnCompleted(onCompletedCallback)

webgl/ov.js, line 3330
Name Type Description
onCompletedCallback Object

輸入結束的結果。

Name Type Description
success Boolean

輸入是否成功。

geo Object optional

輸入結束的幾何。

Name Type Description
center GeoPoint optional

輸入的圓心。

radius Number optional

輸入的半徑。

See:

inputSurfaceCircleOnInputting(OnInputtingCallback)

webgl/ov.js, line 3339
Name Type Description
OnInputtingCallback Object

輸入中的結果。

Name Type Description
geo Object

輸入中的幾何。

Name Type Description
center GeoPoint

輸入中的圓心。

radius Number

輸入中的半徑。

See:

inputSurfacePointOnCompleted(onCompletedCallback)

webgl/ov.js, line 3113
Name Type Description
onCompletedCallback Object

輸入結束的結果。

Name Type Description
success Boolean

輸入是否成功。

geo GeoPoint optional

輸入結束的幾何。

See:

inputSurfacePolygonOnCompleted(onCompletedCallback)

webgl/ov.js, line 3285
Name Type Description
onCompletedCallback Object

輸入結束的結果。

Name Type Description
success Boolean

輸入是否成功。

geo GeoPolygon optional

輸入結束的幾何。

See:

inputSurfacePolygonOnInputting(OnInputtingCallback)

webgl/ov.js, line 3292
Name Type Description
OnInputtingCallback Object

輸入中的結果。

Name Type Description
geo GeoPolygon

輸入中的幾何。

See:

inputSurfacePolylineOnCompleted(onCompletedCallback)

webgl/ov.js, line 3183
Name Type Description
onCompletedCallback Object

輸入結束的結果。

Name Type Description
success Boolean

輸入是否成功。

geo GeoPolyline optional

輸入結束的幾何。

See:

inputSurfacePolylineOnInputting(OnInputtingCallback)

webgl/ov.js, line 3190
Name Type Description
OnInputtingCallback Object

輸入中的結果。

Name Type Description
geo GeoPolyline

輸入中的幾何。

See:

inputSurfaceRectangleOnCompleted(onCompletedCallback)

webgl/ov.js, line 3473
Name Type Description
onCompletedCallback Object

輸入結束的結果。

Name Type Description
success Boolean

輸入是否成功。

geo CRect optional

輸入結束的幾何。

See:

inputSurfaceRectangleOnInputting(OnInputtingCallback)

webgl/ov.js, line 3480
Name Type Description
OnInputtingCallback Object

輸入中的結果。

Name Type Description
geo CRect

輸入中的幾何。

See:

measure2DLengthOnCompleted(onCompletedCallback)

webgl/ov.js, line 3613
Name Type Description
onCompletedCallback Object

測量結束結果。

Name Type Description
success Boolean

測量是否成功。

geo Object optional

測量結束的幾何。

Name Type Description
distance Number optional

測量結束的長度。

See:

measureAreaOnCompleted(onCompletedCallback)

webgl/ov.js, line 3904
Name Type Description
onCompletedCallback Object

測量結束結果。

Name Type Description
success Boolean

測量是否成功。

geo Object optional

測量結束的幾何。

Name Type Description
area Number optional

測量結束的面積。

See:

measureHeightOnCompleted(onCompletedCallback)

webgl/ov.js, line 3792
Name Type Description
onCompletedCallback Object

測量結束結果。

Name Type Description
success Boolean

測量是否成功。

geo Object optional

測量結束的幾何。

Name Type Description
height Number optional

測量結束的高度。

See:

measureSpatialLengthOnCompleted(onCompletedCallback)

webgl/ov.js, line 3735
Name Type Description
onCompletedCallback Object

測量結束結果。

Name Type Description
success Boolean

測量是否成功。

geo Object optional

測量結束的幾何。

Name Type Description
distance Number optional

測量結束的長度。

See:

measureSpatialPointToPointLengthOnCompleted(onCompletedCallback)

webgl/ov.js, line 3676
Name Type Description
onCompletedCallback Object

測量結束結果。

Name Type Description
success Boolean

測量是否成功。

geo Object optional

測量結束的幾何。

Name Type Description
distance Number optional

測量結束的長度。

distanceHorizontal Number optional

測量結束的水平長度。

distanceVertical Number optional

測量結束的垂直長度。

angleIncluded Number optional

測量結束的角度。

slope Number optional

測量結束的坡度。

See:

measureSurfaceLengthOnCompleted(onCompletedCallback)

webgl/ov.js, line 3557
Name Type Description
onCompletedCallback Object

測量結束結果。

Name Type Description
success Boolean

測量是否成功。

geo Object optional

測量結束的幾何。

Name Type Description
distance Number optional

測量結束的長度。

sphereDistance Number optional

測量結束的球體長度。

See:

openFileMeshCallback(param)

webgl/ov.js, line 2586
Name Type Description
param Object

參數物件。

Name Type Description
success Boolean

是否成功。

meshs Array.<Object> optional

物件陣列,CFileMesh可用來加入自畫模型。

See:

openTerrainCallback(terrainLayer, success)

webgl/ov.js, line 1381
Name Type Description
terrainLayer CTerrainLayer

地形圖層。

success Boolean

是否成功。

See:

reloadTerrainCallback(success)

webgl/ov.js, line 1398
Name Type Description
success Boolean

是否成功

See:

setConditionForHideOverlayLayerCallback(result)

webgl/ov.js, line 4295
Name Type Description
result Object

結果物件。

Name Type Description
success Boolean

是否成功。

See:

setConditionOverlayLayerCallback(result)

webgl/ov.js, line 4437
Name Type Description
result Object

結果物件。

Name Type Description
success Boolean

是否成功。

See: