new ov.TerrainView(target, options)
三維場景視圖
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
target |
String |
綁定的DIV名稱。 |
||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
optional
環境的初始化選項。
|
Example
var terrainView = new 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 analysisov.Analysis 分析功能物件,可執行視域分析等
-
backgroundColor
-
背景顏色
Properties:
Name Type Description backgroundColorov.Color 背景顏色
-
readonlybestCommentator
-
最佳解說員集合
Properties:
Name Type Description bestCommentatorov.BestCommentatorCollection 最佳解說員的劇本集合
-
readonlycamera
-
取得目前攝影機(姿態)
Properties:
Name Type Description cameraov.Camera 攝影機(姿態)
-
canvas
-
圖台畫布
Properties:
Name Type Description canvasHTMLCanvasElement 圖台畫布
-
cloudProperty
-
雲的特性。
Properties:
Name Type Description cloudPropertyov.CloudProperty 雲的特性。
-
controlPanel
-
是否顯示控制面板
Properties:
Name Type Description controlPanelBoolean 是否顯示控制面板
-
cursor
-
目前滑鼠的預設游標樣式
Properties:
Name Type Description cursorString 目前滑鼠的預設游標樣式
-
cursorSetting
-
目前滑鼠的游標樣式設定
Properties:
Name Type Description cursorSettingObject 目前滑鼠的游標樣式設定
-
date
-
時間戳
Properties:
Name Type Description dateDate 時間戳
-
enableAtmoSky
-
是否畫天空大氣,預設為開
Properties:
Name Type Description enableAtmoSkyBoolean 天空大氣
-
enableAtmosphere
-
大氣的開關
Properties:
Name Type Description enableAtmosphereBoolean 大氣的開關
-
enableCloud
-
是否畫雲,預設為關。
Properties:
Name Type Description enableCloudBoolean 是否畫雲。
-
enableDrawLightDirectionSketchMap
-
是否在場景中畫光線方向圖
Properties:
Name Type Description enableDrawLightDirectionSketchMapBoolean 是否在場景中畫光線方向圖
-
enableLight
-
光線的開關
Properties:
Name Type Description enableLightBoolean 光線的開關
-
enableLogarithmicDepthBuffer
-
是否啟用對數深度緩衝。
可以看得更遠,但會失去抗鋸齒效果、降低效能。Properties:
Name Type Description enableLogarithmicDepthBufferBoolean 是否啟用對數深度緩衝。
-
enableOuterSpaceBox
-
外太空的開關
Properties:
Name Type Description enableOuterSpaceBoxBoolean 外太空的開關
-
enableSea
-
是否畫海洋,預設為關
Properties:
Name Type Description enableSeaBoolean 海洋
-
enableShadow
-
陰影的開關
Properties:
Name Type Description enableShadowBoolean 陰影的開關
-
enableSun
-
是否畫太陽貼圖,預設為開
Properties:
Name Type Description enableSunBoolean 太陽貼圖
-
enableVolumetricLightScattering
-
是否開啟體積光散射,預設為關
Properties:
Name Type Description enableVolumetricLightScatteringBoolean 體積光散射
-
freezeKeyboard
-
凍結鍵盤控制
Properties:
Name Type Description freezeKeyboardBoolean 凍結鍵盤控制
-
freezeMouse
-
凍結滑鼠控制(只能用控制攝影機的方式處理)
Properties:
Name Type Description freezeMouseBoolean 凍結滑鼠控制
-
freezeUpdate
-
凍結畫面更新
Properties:
Name Type Description freezeUpdateBoolean 凍結畫面更新
-
freezeUserControl
-
凍結使用者輸入控制對Viewport的控制(凍結滑鼠與鍵盤)
Properties:
Name Type Description freezeUserControlBoolean -
readonlyisSpherical
-
是否為"球"
Properties:
Name Type Description isSphericalBoolean 是否為"球"
-
keepDraw
-
是否保持作畫,不會休息(預設為false若無變更就不會重新作畫)
Properties:
Name Type Description keepDrawBoolean 是否不休息
-
readonlylayers
-
所有圖層
Properties:
Name Type Description layersArray.<ov.Layer> 圖層陣列
-
lightProperty
-
光線的特性
Properties:
Name Type Description lightPropertyov.LightProperty 光線的特性
-
maxVisualDistance
-
最大虛擬可視距離
Properties:
Name Type Description maxVisualDistanceNumber 最大虛擬可視距離(單位:公尺),用於顯示太遠的物件,預設為0(自動控制)
-
minHeightAboveGround
-
最小的離地表高度,初始化時,系統會依據地形影像的解析度來決定,使用者可於初始化後自行設定
Properties:
Name Type Description minHeightAboveGrounddouble 最小的離地表高度
-
readonlymousePos
-
目前滑鼠的坐標
Properties:
Name Type Description mousePosGeoPoint | undefined 目前滑鼠的坐標,單位為Map
-
moveMode
-
移動模式:如面板模式、滑鼠模式、旋轉模式等...
Properties:
Name Type Description moveModeov.MOVE_TYPE 移動模式
-
readonlyname
-
取得地形圖層名稱
Properties:
Name Type Description nameString 地形圖層名稱
-
showMenu
-
開啟或關閉最佳解說員面板,需加入material-icons.css
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
或參照Google Fonts Material Icons Guide設置離線版本。
https://developers.google.com/fonts/docs/material_iconsProperties:
Name Type Description showMenuBoolean 面板開啟狀態
-
readonlysphericalEpsg
-
球體EPSG
Properties:
Name Type Description sphericalEpsgNumber 球體的Epsg
-
terrainAlpha
-
地形不透明度
Properties:
Name Type Description terrainAlphaNumber 不透明度(預設1.0,介於0~1.0)
-
readonlyterrainEpsg
-
地形EPSG
Properties:
Name Type Description terrainEpsgNumber 地形的原始Epsg
-
terrainHitTestOpacityThreshold
-
地形可以被HitTest的最小不透明度閾值,若地形不透明度低於此值,則引擎允許點擊地形下的三角面
Properties:
Name Type Description terrainHitTestOpacityThresholdNumber 不透明度閾值(預設0.9,介於0~1.0)
-
throughSurface
-
是否能穿越地表
Properties:
Name Type Description throughSurfaceBoolean 是否能穿越地表
-
readonlyurl
-
取得地形圖層連結
Properties:
Name Type Description urlString 地形圖層連結
-
readonlywidgets
-
所有widget
Properties:
Name Type Description widgetsArray.<Object> widget陣列
Methods
-
abortInput()
webgl/ov.js, line 3667 -
中斷輸入。
-
abortMeasure()
webgl/ov.js, line 3965 -
中斷測量,並呼叫 OnMeasureCompleted({success:false, length: 0, measureObj:null});。
-
addCustomLayer(param){ov.CustomLayer}
webgl/ov.js, line 2789 -
加入自畫圖層。
Name Type Description paramObject 參數物件。
Name Type Description layernameString 名稱,圖層名稱不可重複。
callbackov.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 2069 -
加入事件監聽器
Name Type Description eventNameString 事件名稱,目前支援以下
MeasureCompleted 測量完成
CameraPosChanged 相機位置改變
Click 滑鼠點擊
MoveEnd 移動結束
MoveStart 移動開始
MouseDown 滑鼠按下
MouseUp 滑鼠彈起callbackov.TerrainView~addEventListenerCallback 事件觸發時要執行的回呼函式。
Returns:
Type Description Boolean 是否加入成功。 Example
var result = terrainView.addEventListener("CameraPosChanged", myCallback);
-
addFigure(param){CTerrainEngine.Element.Figure|null}
webgl/ov.js, line 3991 -
加入提示圖片。
Name Type Description paramObject 參數物件。
Name Type Default Description urlString 圖片位址。
widthString optional 圖片寬,沒設定就使用圖片檔案自身的值,使用"50px"表示寬50像素,或是"50%"表示圖片寬度同畫布寬的一半,輸入數值視同像素
heightString optional 圖片高,方法同上。
alphaNumber 1 optional 不透明度,值應在0~1之間。
topString "" optional 圖片離畫布頂端的距離,"50px"代表離頂端50個像素,或是"10%"代表離頂端10%的畫布高度。
leftString "" optional 圖片離畫布左端的距離,方法同上。
rightString "" optional 圖片離畫布右側的距離,方法同上,左右同時有值視同水平至中。
bottomString "" 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" });
-
addFixTerrainLevelBoundary(level, boundary)
webgl/ov.js, line 5596 -
新增一個固定地形節點Level的範圍。
Name Type Description levelNumber 要固定的Level。
boundaryGeoBoundary 範圍。
-
addKMLScene(param){ov.KMLScene}
webgl/ov.js, line 5381 -
新增kml場景。
Name Type Description paramObject 參數。
Name Type Description nameString 場景名稱。
Returns:
Type Description ov.KMLScene kml場景。 -
addModelLayer(param)
webgl/ov.js, line 2712 -
加入模型圖層。
Name Type Description paramObject 參數物件。
Name Type Description urlString 位址。
identifierString 圖層名稱。
callbackov.TerrainView~addModelLayerCallback 回呼函式。
urlTemplateString optional 網址字串模板,可給代理如PROXY_URL/{URL}。
tokenString optional 若有需要提供,token。
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 2741 -
加入模型集圖層。
Name Type Description paramObject 參數物件。
Name Type Description urlString 位址。
identifierString 圖層名稱。
callbackov.TerrainView~addModelSetLayerCallback 回呼函式。
urlTemplateString optional 網址字串模板,可給代理如PROXY_URL/{URL}。
tokenString optional 若有需要提供,token。
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(param)
webgl/ov.js, line 5334 -
新增移動事件。
Name Type Description paramObject 參數。
Name Type Default Description stepsArray.<Object> 階段參數。
Name Type Description startPositionGeo3DPoint 起始座標。
endPositionGeo3DPoint 結束座標。
reverseBoolean optional 面向是否與行進方向相反。
timeNumber 時間,與速度及加速度擇一。
velocityNumber 速度(m/s)。
accelerationNumber 加速度(m/s^2)。
stepFunctionov.MoveEvent~stepFunction optional 階段處裡函式。
entityov.CustomEntity | ov.CustomGLTFEntity 自畫圖素。
upGeoPoint | Geo3DPoint | null null optional glTF圖素上方向量,null為自動調整。
defaultFunctionov.MoveEvent~stepFunction optional 預設處裡函式。
angularVelocityNumber Math.PI optional 角速度(rad/s)。
standDetectFrustumHeightNumber 1 optional 站立採樣攝影機高度(相對當前移動位置),單位公尺
standDetectRangeNumber 0.1 optional 站立偵測範圍,單位公尺
considerModelBoolean false optional 是否考慮三維模型。
-
addOGC3DTilesLayer(param)
webgl/ov.js, line 2566 -
加入OGC 3D Tiles圖層。
Name Type Description paramObject 參數物件。
Name Type Default Description urlString tileset.json位址。
maximumScreenSpaceErrorNumber 16 optional 最大螢幕空間誤差。
callbackov.TerrainView~addOGC3DTilesLayerCallback 回呼函式。
urlTemplateString optional 網址字串模板,可給代理如PROXY_URL/{URL}。
tokenString optional 若有需要提供,token。
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 2596 -
加入OGC I3S圖層。
Name Type Description paramObject 參數物件。
Name Type Default Description urlString 位址,可不給layers,預設為0。
requestModeov.OGC_I3S_REQUEST ov.OGC_I3S_REQUEST.AUTO optional I3S請求模式。
recalculateNormalsBoolean false optional 使用圖台重新計算的法線向量。
skippingLevelBoolean false optional 是否使用跳層分裂。
callbackov.TerrainView~addOGCI3SLayerCallback 回呼函式。
urlTemplateString optional 網址字串模板,可給代理如PROXY_URL/{URL}。
tokenString optional 若有需要提供,token。
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 5164 -
新增疊加圖層切窗視窗。
Name Type Description paramObject 參數。
Name Type Default Description nameNumber 視窗名稱。
leftNumber 0 optional 距離左側邊界(0.0~1.0)。
topNumber 0 optional 距離上方邊界(0.0~1.0)。
widthNumber 1 optional 視窗寬(0.0~1.0)。
heightNumber 1 optional 視窗長(0.0~1.0)。
Returns:
Type Description ov.OverlayWindow 疊加圖層切窗視窗物件。 -
addPhotogrammetryModelLayer(param)
webgl/ov.js, line 2512 -
加入傾斜攝影模型圖層。
Name Type Description paramObject 參數物件。
Name Type Description urlString 位址。
identifierString 圖層名稱。
callbackov.TerrainView~addPhotogrammetryModelLayerCallback 回呼函式。
urlTemplateString optional 網址字串模板,可給代理如PROXY_URL/{URL}。
tokenString optional 若有需要提供,token。
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); -
addPipelineLayer(param)
webgl/ov.js, line 2625 -
加入管線圖層。
Name Type Description paramObject 參數物件。
Name Type Description urlString 位址。
identifierString 圖層名稱。
callbackov.TerrainView~addPipelineLayerCallback 回呼函式。
urlTemplateString optional 網址字串模板,可給代理如PROXY_URL/{URL}。
tokenString optional 若有需要提供,token。
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 2683 -
加入點雲圖層。
Name Type Description paramObject 參數物件。
Name Type Description urlString 位址。
identifierString 圖層名稱。
callbackov.TerrainView~addPointCloudLayerCallback 回呼函式。
urlTemplateString optional 網址字串模板,可給代理如PROXY_URL/{URL}。
tokenString optional 若有需要提供,token。
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 2764 -
加入監視器圖層。
Name Type Description paramObject 參數物件。
Name Type Description urlString 位址。
identifierString 圖層名稱。
callbackov.TerrainView~addProjectorLayerCallback 回呼函式。
tokenString optional 若有需要提供,token。
reloadTimeNumber optional 影像重新載入時間,小於零則不主動重新載入。
-
addPromptText(param){CTerrainEngine.Element.Text|null}
webgl/ov.js, line 4021 -
加入提示文字。
Name Type Description paramObject 參數物件。
Name Type Default Description textString 文字。
alignov.TEXT_ALIGN 對齊方式。
colorov.Color new ov.Color("#FFFFFF") optional 文字顏色。
fontString "Arial" optional 字型。
sizeNumber 16 optional 文字大小。
borderColorov.Color new ov.Color("#000000") optional 邊框顏色。
borderSizeNumber optional 邊框大小。
offsetXNumber 0 optional 文字水平方向位移,單位px,右為正。
offsetYNumber 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
}); -
addS3CloudPhotogrammetryModelLayer(param)
webgl/ov.js, line 2537 -
加入S3雲端傾斜攝影模型圖層。
Name Type Description paramObject 參數物件。
Name Type Description urlString S3 Bucket 位址。
callbackov.TerrainView~addPhotogrammetryModelLayerCallback 回呼函式。
Example
var param = {};
param.url = "http://example.com/bucketroot/";
param.callback = function(success, layer){if(success){console.log(layer);}};
terrainView.addPhotogrammetryModelLayer(param); -
addTerrainCustomTileOverlay(settings, callback, index){ov.TerrainCustomTileOverlay|null}
webgl/ov.js, line 2861 -
用加入的方式新增Custom tile Overlay。
Name Type Description settingsObject 參數物件。
Name Type Default Description layernameString Overlay名稱。
opacityNumber 1 optional 圖層的不透明度,0~1,預設為1。
onTerrainBoolean true optional 圖層是否顯示在地形上。
callbackov.TerrainView~addTerrainCustomTileOverlayCallback optional 執行新增疊加圖層後的回呼函式。
indexNumber optional 插入索引,若沒有填值則視為加在最後面。
Returns:
Type Description ov.TerrainCustomTileOverlay | null 圖層物件,若加入失敗則為null。 -
addTerrainDitchOverlay(settings, callback, index){ov.TerrainDitchOverlay|null}
webgl/ov.js, line 3264 -
新增溝渠圖層。
Name Type Description settingsObject 參數物件。
Name Type Default Description uriString 資源位址。
identifierString 要圖ID。
layernameString 圖層名稱。
tokenString optional 若有需要提供,token。
verticalOffsetNumber 0.0 optional 垂直偏移。
waterHeightNumber 0.25 optional 水面高度。
lineSegmentEntitiesSettingArray.<Object> optional 渠道線圖素設定。
Name Type Description nameString optional 渠道名稱。
modelArray.<Object> optional 渠道模型參數。
Name Type Description baseColorTextureImageSourceString optional 貼圖來源。
callbackov.TerrainView~addTerrainDitchOverlayCallback optional 執行新增疊加圖層後的回呼函式。
indexnumber | null optional 插入索引,若沒有填值則視為加在最後面。
Returns:
Type Description ov.TerrainDitchOverlay | null 圖層物件,若加入失敗則為null。 -
addTerrainSceneOverlay(settings, callback, index){ov.TerrainSceneOverlay|null}
webgl/ov.js, line 3232 -
用加入的方式新增地景 Overlay。
Name Type Description settingsObject 參數物件。
Name Type Default Description uriString 資源位址。
identifierString 要圖ID。
layernameString 圖層名稱。
tokenString optional 若有需要提供,token。
fadeOutBeginNumber 4.0 optional 模型所佔螢幕空間大小,小於此值開始淡出。
fadeOutEndNumber 2.0 optional 模型所佔螢幕空間大小,小於此值完全淡出。
surfaceFadeOutBeginNumber 1200.0 optional 地表貼圖開始出現的距離。
surfaceFadeOutEndNumber 2000.0 optional 地表貼圖完全出現的距離。
randomRotationMaxNumber 180.0 optional 模型隨機旋轉的最大角度。
randomRotationMinNumber 0.0 optional 模型隨機旋轉的最小角度。
randomLightMaxNumber 0.75 optional 模型隨機光照的最大強度。
randomLightMinNumber 0.0 optional 模型隨機光照的最小強度。
fbmMaxNumber 1.0 optional 地表貼圖隨機的最大強度。
fbmMinNumber 0.7 optional 地表貼圖亮度的最小強度。
callbackov.TerrainView~addTerrainSceneOverlayCallback optional 執行新增疊加圖層後的回呼函式。
indexnumber | null optional 插入索引,若沒有填值則視為加在最後面。
Returns:
Type Description ov.TerrainSceneOverlay | null 圖層物件,若加入失敗則為null。 -
addTerrainSingleTileOverlay(settings, callback, index){ov.TerrainSingleTileOverlay|null}
webgl/ov.js, line 2901 -
用加入的方式新增Single tile Overlay。
Name Type Default Description settingsObject 參數物件。
Name Type Default Description urlString 要圖網址或base64編碼(data:image/png;base64,XXX)。
layernameString Overlay名稱。
boundaryGeoBoundary 圖層的範圍。
worldFileObject optional World File參數。
Name Type Description ANumber optional x方向比例(World File第1行)。
DNumber optional y方向偏斜(World File第2行)。
BNumber optional x方向偏斜(World File第3行)。
ENumber optional y方向比例,通常為負值(World File第4行)。
CNumber optional 圖片左上角x座標(World File第5行)。
FNumber optional 圖片左上角y座標(World File第6行)。
rotateReferencePointov.ROTATE_REFERENCE_POINT ov.ROTATE_REFERENCE_POINT.UPPER_LEFT optional 圖片旋轉基準點。
rotateAngleNumber 0 optional 圖片旋轉角度。
epsgNumber 4326 optional 目標坐標的epsg。
opacityNumber 1 optional 圖層的不透明度,0~1。
setting.colorov.Color new ov.Color("#FFFFFFFF") optional 圖層混色顏色。
settings.showBoolean true optional 圖層是否顯示。
settings.onTerrainBoolean true optional 圖層是否顯示在地形上。
callbackov.TerrainView~addTerrainSingleTileOverlayCallback optional 執行新增疊加圖層後的回呼函式。
indexNumber optional 插入索引,若沒有填值則視為加在最後面。
Returns:
Type Description ov.TerrainSingleTileOverlay | null 圖層物件,若加入失敗則為null。 -
addTerrainVectorTileOverlay(settings, callback, index){ov.TerrainVectorTileOverlay|null}
webgl/ov.js, line 3097 -
新增地形Vector Tile。
Name Type Description settingsObject 參數物件。
Name Type Default Description urlString 資料來源模板,例如"http://127.0.0.1:8080/3857/identifier/{z}/{x}/{y}.vector.mvt"。
isGeoJsonBoolean false optional 資料格式是否為GeoJson,若非則是mapbox的pbf標準格式。
layernameString Overlay名稱,不得與其他地形疊加圖層名稱相同,否則失敗。
lineWidthNumber 1 optional 指示線條粗細。
minLevelNumber 0 optional 請求最小Level,小於此Level則不會載入疊加資料。
maxLevelNumber 23 optional 請求最大Level,大於此Level則不會載入疊加資料。
visibleFactorNumber 1.0 optional 可視範圍參數,預設為1.0,越大則可視範圍越遠,在傾斜時更明顯,但無法超越LOD的限制。
urlTemplateString "" optional 網址字串模板,可給代理如PROXY_URL/{URL}。
tokenString optional 若有需要提供,token。
showBoolean true optional 圖層是否預設為開。
onTerrainBoolean true optional 圖層是否顯示在地形上。
opacityNumber 1.0 optional 圖層的不透明度。
occludedOpacityNumber 0.25 optional 圖層被遮擋的不透明度。
pointSettingObject optional 點圖資的顯示樣式,有給點圖資才會繪製。
Name Type Default Description textLabelString "" optional 欲顯示文字的參考欄位。
fontLabelString "" optional 欲套用字型的參考欄位。
fadeEffectBoolean true optional 是否使用淡出淡入效果。
allowOverlappingBoolean true optional 是否允許重疊。
fontTableObject.<String, Object> optional 字型設定定義,以fontLabel欄位名稱當索引。若為"DEFAULT",則會將所有未匹配文字套上此設定字型。
Name Type Default Description fontString "Arial" optional 指定字型。
fontSizeNumber 14 optional 指定字型大小。
fontColorov.Color new ov.Color("#E0E0E0") optional 指定字型顏色。
fontBorderSizeNumber 2 optional 指定字型邊框粗細。
fontBorderColorov.Color new ov.Color("#000000") optional 指定字型邊框顏色。
pullUpYNumber 50 optional 指定圖釘最高高度,單位為pixel或公尺。
pullUpYUnitNumber 0 optional 指定圖釘最高高度的單位,0為pixel,1為公尺。
groundLineColorov.Color new ov.Color("#000000") optional 落地線的顏色。
groundLineWidthNumber 1 optional 落地線的寬度。
polylineSettingObject optional 線圖資的顯示樣式,有給線圖資才會繪製。
Name Type Default Description colorLabelString "" optional 欲套用顏色的參考欄位。
widthLabelNumber optional 欲套用粗細的參考欄位,必須為數字。
simpleDrawBoolean false optional 使用輕便的繪圖模式,建議為false。
lineWidthScaleNumber 1 optional 指示線條粗細的縮放。
dashScaleNumber -1.0 optional 虛線設定,預設為實線,若等於0.0:系統自己切,大於0.0:以公尺為單位切。
colorTableObject.<String, Object> optional 線圖資的顯示定義,索引為顏色參考欄位之名稱。
Name Type Default Description colorov.Color new ov.Color("#E8E8E8") optional 線圖資的顯示顏色。
polygonSettingObject optional 面圖資的顯示樣式,有給面圖資才會繪製。
Name Type Default Description colorLabelString "" optional 面圖資的樣式參考欄位。
colorTableObject.<String, Object> optional 面圖資的樣式定義,索引為圖資參考欄位之名稱。
Name Type Default Description fillColorov.Color new ov.Color("#FF0000") optional 面圖資的顏色。
boundaryColorov.Color new ov.Color("#000000") optional 面圖資的邊緣顏色。
boundaryWidthNumber 2 optional 面圖資的邊緣粗細。
callbackov.TerrainView~addTerrainVectorTileOverlayCallback optional 執行新增疊加圖層後的回呼函式
indexNumber 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,
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 3187 -
新增可視化資料網格
Name Type Description settingObject 參數物件。
Name Type Default Description layernameString Overlay名稱,不得與其他地形疊加圖層名稱相同,否則失敗。
sourceArray.<Float32Array> 圖層資料位置。
liftSourceArray.<Float32Array> optional 圖層抬升資料位置,若沒給抬升將採用圖層資料位置,注意需再設定liftScale。
zScaleNumber 1.0 optional 設定圖層的ZScale(ZScale:越小圖層越不會被遮擋)。
boundaryGeoBoundary 圖層所在經緯度。
heightNumber 資料高。
widthNumber 資料寬。
dateArray.<Date> 資料時間。
startDateIndexNumber 0 optional 播放開始時間索引。
endDateIndexNumber optional 播放最終時間索引。
filterString "linear" optional 資料過濾方式,nearest或是linear。
liftFilterString "linear" optional 抬升資料過濾方式,nearest或是linear。
useStepLayeredColorMapBoolean false optional 使用分層設色。
layeredColorMapKeyArray.<Number> optional 分層設色圖高度表。
layeredColorMapValueArray.<ov.Color> optional 分層設色圖顏色表。
playSpeedNumber 0.16 optional 播放速度。
repeatBoolean true optional 是否重播。
autoPlayBoolean true optional 是否自動播放。
flipYBoolean false optional 資料源是否翻轉Y軸。
outputDepthBoolean false optional 是否輸出深度,有輸出深度才能在mousePos指的到。
onTerrainBoolean true optional 圖層是否參考地形高度,若true則抬升為相對高度;若false則抬升為絕對高度。
liftScaleNumber 0 optional 依圖層抬升資料拉抬地形的比例,預設0為不抬升。
callbackov.TerrainView~addTerrainVisualizedDataGridOverlayCallback optional 執行新增疊加圖層後的回呼函式。
indexNumber optional 插入索引,若沒有填值則視為加在最後面。
Returns:
Type Description ov.TerrainVisualizedDataGridOverlay | null 圖層物件,若加入失敗則為null。 -
addTerrainWMSOverlay(settings, callback, index){ov.TerrainWMSOverlay|null}
webgl/ov.js, line 2970 -
用加入的方式新增WMS Overlay。
Name Type Description settingsObject 參數物件。
Name Type Default Description urlString 要圖網址。
identifierString 要圖ID。
layernameString Overlay名稱。
stylesString optional 圖層樣式。
timeString optional 圖層時間。
opacityNumber 1 optional 圖層不透明度,0~1。
showBoolean true optional 圖層是否顯示。
onTerrainBoolean true optional 圖層是否顯示在地形上。
tokenString optional 若有需要提供,token。
usernameString optional 若有需要提供,帳號。
passwordString optional 若有需要提供,密碼。
urlTemplateString optional 網址字串模板,可給代理如PROXY_URL/{URL}。
overlayWindowString optional 指定疊加要加的視窗名字,需先使用addOverlayWindow創建視窗。
callbackov.TerrainView~addTerrainWMSOverlayCallback optional 執行新增疊加圖層後的回呼函式。
indexnumber | null optional 插入索引,若沒有填值則視為加在最後面。
Returns:
Type Description ov.TerrainWMSOverlay | null 圖層物件,若加入失敗則為null。 -
addTerrainWMTSOverlay(settings, callback, index){ov.TerrainWMTSOverlay|null}
webgl/ov.js, line 2935 -
用加入的方式新增WMTS Overlay。
Name Type Description settingsObject 參數物件。
Name Type Default Description urlString 要圖網址。
identifierString 要圖ID。
layernameString Overlay名稱。
resourceUrlString optional 網址Pattern,XXX/{TileZ}/{TileR}/{TileC}。
opacityNumber 1 optional 圖層不透明度,0~1。
showBoolean true optional 圖層是否顯示。
onTerrainBoolean true optional 圖層是否顯示在地形上。
tokenString optional 若有需要提供,token。
usernameString optional 若有需要提供,帳號。
passwordString optional 若有需要提供,密碼。
urlTemplateString optional 網址字串模板,可給代理如PROXY_URL/{URL}。
overlayWindowString optional 指定疊加要加的視窗名字,需先使用addOverlayWindow創建視窗。
maxLevelNumber optional 圖層最大level上限。
callbackov.TerrainView~addTerrainWMTSOverlayCallback optional 執行新增疊加圖層後的回呼函式。
indexnumber | null optional 插入索引,若沒有填值則視為加在最後面。
Returns:
Type Description ov.TerrainWMTSOverlay | null 圖層物件,若加入失敗則為null。 -
addTimeEvent(param){Number}
webgl/ov.js, line 5285 -
添加時間事件。
Name Type Description paramObject 參數。
Name Type Description startDate 事件開始時間(包含)。
endDate 事件結束時間(包含)。
onPlayfunction 時間範圍內要執行的函式。
onEnterfunction 進入時間範圍要執行的函式。
onLeavefunction 離開時間範圍要執行的函式。
Returns:
Type Description Number 事件編號。 -
addTimeShowEvent(start, end, showableObj){Number}
webgl/ov.js, line 5257 -
添加定時顯示事件。
Name Type Description startDate 開始顯示時間(包含)。
endDate 結束顯示時間(包含)。
showableObjObject 任何支援show的圖層或實體(ov.TerrainOverlay/ov.Layer/ov.CustomLayer/ov.CustomEntity等)。
Returns:
Type Description Number 事件編號。 -
addUI(UI)
webgl/ov.js, line 4552 -
添加UI物件到圖台。
Name Type Description UIov.UI.Container 要新增的UI物件
-
addVectorLayer(param)
webgl/ov.js, line 2654 -
加入向量圖層。
Name Type Description paramObject 參數物件。
Name Type Description urlString 位址。
identifierString 圖層名稱。
callbackov.TerrainView~addVectorLayerCallback 回呼函式。
urlTemplateString optional 網址字串模板,可給代理如PROXY_URL/{URL}。
tokenString optional 若有需要提供,token。
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); -
addVREntity(customEntity, position, geoParam, isFixed)
webgl/ov.js, line 5487 -
新增VR空間下的自畫圖素,會隨著頭盔更新位置。
Name Type Description customEntityov.CustomEntity 自畫圖素。
positionGeo3DPoint 相對頭盔的位置。
geoParamString 位置的參數名稱。
isFixedboolean 位置方位是否固定。
-
beginDirectionRotate(rotSpeed)
webgl/ov.js, line 2242 -
攝影機的方位角開始旋轉。
Name Type Description rotSpeedNumber 旋轉速度(Arg/Sec),正表示順時針,負表示逆時針。
-
beginMove(speed, direction)
webgl/ov.js, line 2261 -
攝影機開始水平的移動。
Name Type Description speedNumber 縮放速度(畫面/sec),正表示前進,負表示後退。
directionNumber 方向角(以自己的北方為0)。
-
beginVertRotate(rotSpeed)
webgl/ov.js, line 2233 -
攝影機的俯仰角開始旋轉。
Name Type Description rotSpeedNumber 旋轉速度(Arg/Sec),正表示越來越垂直,負表示越來越水平。
-
beginZoom(speed)
webgl/ov.js, line 2251 -
攝影機開始縮放。
Name Type Description speedNumber 縮放速度(畫面/sec),正表示前進,負表示後退。
-
cameraStop()
webgl/ov.js, line 2287 -
停止攝影機。
-
clearFigure()
webgl/ov.js, line 4042 -
清除全部提示圖片
ov.TerrainView#addFigure。 -
clearMeasure()
webgl/ov.js, line 3972 -
清除測量結束產生的作畫。
-
clearPromptText()
webgl/ov.js, line 4049 -
清除全部提示文字
ov.TerrainView#addPromptText。 -
clearSelectedEntitys()
webgl/ov.js, line 2040 -
清除所有被選取的圖素。
-
close()
webgl/ov.js, line 1847 -
關閉場景視圖,並釋放所有圖層。
Example
terrainView.close();
-
closeVR()
webgl/ov.js, line 5429 -
關閉VR。
-
completeInput()
webgl/ov.js, line 3659 -
完成輸入。
-
correctARHitTestPlane()
webgl/ov.js, line 5537 -
校正ARHitTest平面於地表,需在初始化時有開啟HitTest。
-
deleteLayerCache(objectStore, callback)
webgl/ov.js, line 5587 -
刪除所有IDB快取
Name Type Description objectStoreLayerCache.DB_STORE_NAMES optional 限制刪除的圖層種類,預設刪除所有資料表。
callbackfunction optional 成功刪除callback。
-
deleteLayerCacheOlderThan(time, objectStore, callback)
webgl/ov.js, line 5578 -
刪除比指定時間舊的IDB快取
Name Type Description timeDate 時間。
objectStoreLayerCache.DB_STORE_NAMES optional 限制刪除的圖層種類,預設刪除所有資料表中符合條件的資料。
callbackfunction optional 成功刪除callback。
-
editSliceSpace(param)
webgl/ov.js, line 4114 -
編輯裁切空間,若還沒有設定過,則會直接完成輸入。
Name Type Description paramObject optional 參數物件。
Name Type Default Description colorov.Color new ov.Color("#FF0000") optional 在螢幕畫出回饋的顏色。
colorOpacityNumber 1 optional 在螢幕畫出回饋的顏色不透明度。
markTagColorov.Color new ov.Color("#FFFF00") optional 標示測量結果文字部份的顏色。
markTagColorOpacityNumber 1 optional 標示測量結果文字部份的顏色不透明度。
measureScaleNumber 1 optional 測量結果要再乘以之Scale。
measureDecimalPointNumber 1 optional 測量結果要留的小數點數。
planeEnableRotationArray [true, true, true, true, true, true] optional 特定面不能旋轉。
planeEnableResizeArray [true, true, true, true, true, true] optional 特定面不能拉伸。
-
enableInput(enable)
webgl/ov.js, line 2296 -
設定是否能以鍵盤、滑鼠或觸控操作圖台。
Name Type Description enableBoolean 是否能以輸入方式操作圖台。
-
facing(azimuth, polar, timeout, easing, onFinish, onAbort){Boolean}
webgl/ov.js, line 2311 -
轉動攝影機面向指定方位。
Name Type Description azimuthNumber 轉動的目標方位角(度),有效角度為180度至-180度。
polarNumber optional 攝影機V方向與垂直於地面之夾角(度),有效角度為0至180度。
timeoutNumber optional 完成轉動的總時間(毫秒)。
easingfunction optional 攝影機轉動的動畫easing函數。
onFinishov.TerrainView~facingOnFinish optional 執行完要執行的回呼。
onAbortov.TerrainView~facingOnAbort optional 執行被中斷要執行的回呼。
Returns:
Type Description Boolean 是否設置成功。 -
findLayer(layerName){ov.Layer}
webgl/ov.js, line 3430 -
以圖層名稱取回圖層。
Name Type Description layerNameString 圖層名稱。
Returns:
Type Description ov.Layer 圖層物件。 -
focusWindowCenterFacing(azimuth, polar, timeout, easing, onFinish, onAbort){Boolean}
webgl/ov.js, line 2341 -
鎖住螢幕中心轉動攝影機面向指定方位。
Name Type Description azimuthNumber 轉動的目標方位角(度),有效角度為180度至-180度。
polarNumber 攝影機V方向與垂直於地面之夾角(度),有效角度為0至180度。
timeoutNumber optional 完成轉動的總時間(毫秒)。
easingfunction optional 攝影機移動的動畫easing函數。
onFinishov.TerrainView~focusWindowCenterFacingOnFinish optional 移動完成後執行的回呼。
onAbortov.TerrainView~focusWindowCenterFacingOnAbort optional 移動被中斷執行的回呼。
Returns:
Type Description Boolean 是否設置成功。 -
getAbsHeight(p, epsg){Number}
webgl/ov.js, line 3948 -
取得指定位置地表的精確高度。
Name Type Description pGeoPoint 指定點位置。
epsgNumber 指定點的epsg。
Returns:
Type Description Number 地表的精確高度。 -
getAbsHeights(pts, epsg){Array.<Number>}
webgl/ov.js, line 3958 -
批次取得指定位置地表的精確高度。
Name Type Description ptsArray.<GeoPoint> 指定點位置。
epsgNumber 指定點的epsg。
Returns:
Type Description Array.<Number> 地表的精確高度,失敗時回傳空陣列。 -
getAllKMLScene(){Array.<ov.KMLScene>}
webgl/ov.js, line 5399 -
取得所有kml場景。
Returns:
Type Description Array.<ov.KMLScene> kml場景。 -
getARModelEntity(){ov.CustomGLTFEntity}
webgl/ov.js, line 5545 -
取得AR的模型,需在初始化時有開啟HitTest。
Returns:
Type Description ov.CustomGLTFEntity 加入的模型 -
getContextStatus(){Object}
webgl/ov.js, line 3902 -
取得渲染環境的狀態。
Returns:
Type Description Object 渲染環境的狀態。 -
getDrawTerrainSetting(){Object}
webgl/ov.js, line 1597 -
取得地形的作畫設定。
Returns:
Type Description Object 地形的作畫設定,參考 ov.TerrainView#setDrawTerrainSetting。 -
getFov(){Number}
webgl/ov.js, line 2224 -
取得圖台水平視野角度(Fov)。
Returns:
Type Description Number 圖台水平視野角度(Fov)。 -
getFPS(){Number}
webgl/ov.js, line 4136 -
取得畫圖的FPS。
Returns:
Type Description Number 畫圖的FPS。 -
getHeight(p){Number}
webgl/ov.js, line 3911 -
取得指定位置地表當前LOD(Level of Detail)的高度。
Name Type Description pGeoPoint 指定位置。
Returns:
Type Description Number 地表當前LOD的高度。 -
getHeightAboveGround(){Number}
webgl/ov.js, line 3919 -
取得攝影機離當前地面幾何的高度差。
Returns:
Type Description Number 離地表的高度。 -
getLayers(){Array.<ov.Layer>}
webgl/ov.js, line 1937 -
取得開啟中的圖層。
Returns:
Type Description Array.<ov.Layer> 開啟中的圖層。 Example
var layers = terrainView.getLayers();
-
getModule(name){ov.Module|null}
webgl/ov.js, line 1837 -
載入模組並取得手柄。
Name Type Description nameString 模組名稱。
Returns:
Type Description ov.Module | null 模組手柄。 -
getOrthographicScreenSnap(param)
webgl/ov.js, line 4181 -
取得正射影像畫面
Name Type Description paramObject 原型為function(Image),會將轉換後的Image透過此Callback傳給呼叫者。
Name Type Default Description posNumber optional 攝影機的位置, 預設為目前攝影機的位置。
zOffsetNumber 0 optional 攝影機的z方向位移。
angleNumber 0 optional 攝影機的面向旋轉角度, 預設朝下。
widthNumber 1024 optional 影像寬(pixel)。
heightNumber 1024 optional 影像高(pixel)。
frustumWidthNumber 2000 optional 正射影像範圍寬(公尺)。
frustumHeightNumber 2000 optional 正射影像範圍高(公尺)。
farNumber optional 正射影像範圍深度, 預設為高度的1.1倍。
callbackov.TerrainView~getScreenSnapCallback optional 取得畫面的回呼, 預設為下載為screenshot.png。
-
getOverlayWindow(index){ov.OverlayWindow}
webgl/ov.js, line 5180 -
回傳指定索引或名稱疊加圖層切窗視窗。
Name Type Description indexNumber | String 索引值或名稱。
Returns:
Type Description ov.OverlayWindow 疊加圖層切窗視窗物件。 -
getScreenSnap(callback)
webgl/ov.js, line 4158 -
取得畫布的畫面,會引起圖台立刻重新繪製畫面,並在畫面重新繪製好後返回畫面拷貝的Image物件與DataURL。
Name Type Description callbackov.TerrainView~getScreenSnapCallback 取得畫面的回呼。
-
getSelectedEntitys(){Array.<Object>}
webgl/ov.js, line 2015 -
取得所有被選取的圖素。
Returns:
Type Description Array.<Object> 被選取的圖素及圖層物件。 -
getTerrainNodeProgress(){Number}
webgl/ov.js, line 3391 -
取得地形節點載入的狀態百分比。
Returns:
Type Description Number 地形節點載入的狀態百分比。 -
getTerrainOverlay(index){ov.TerrainOverlay|Array.<ov.TerrainOverlay>}
webgl/ov.js, line 3287 -
取得地形的Overlay。
Name Type Description indexNumber | String index或圖層名稱。
Returns:
Type Description ov.TerrainOverlay | Array.<ov.TerrainOverlay> Overlay圖層。 Example
terrainView.getTerrainOverlay(0); //取得第1個Overlay
terrainView.getTerrainOverlay("Taiwan3857"); //取得指定Overlay
terrainView.getTerrainOverlay(); //全部拿回來 -
getWidgetByType(type){Array.<Object>}
webgl/ov.js, line 4536 -
取得指定類別的Widget陣列。
Name Type Description typeObject Widget的類型。
Returns:
Type Description Array.<Object> 指定類別的Widget陣列。 Example
new ov.Widget.Timeline({terrainView: terrainView});
var timeline = terrainView.getWidgetByType(ov.Widget.Timeline);
// [ov.W…t.Timeline] -
getXRViewInformation(){Object}
webgl/ov.js, line 5559 -
取得AR/VR的空間資訊
Returns:
Type Description Object 空間資訊 -
getXRViewport(){CRect}
webgl/ov.js, line 5466 -
取得AR/VR畫面viewport,VR為雙眼各占一半寬。
Returns:
Type Description CRect viewport。 -
goto(p, distance, keepPosture, epsg, onFinish, onAbort)
webgl/ov.js, line 2370 -
移動至指定位置,單位是圖面坐標。
Name Type Default Description pGeoPoint 要飛到p點。
distancedouble 0 optional 距離。
keepPostureBoolean false optional 代表是否要保持目前姿態。
epsgNumber 4326 optional 目標坐標的epsg,若不輸入會將輸入坐標視為與地形同epsg。
onFinishov.TerrainView~gotoOnFinish optional 移動完成後執行的回呼。
onAbortov.TerrainView~gotoOnAbort optional 移動被中斷執行的回呼。
-
gotoAndFocus(focusPoint, distance, param, polarAngle, azimuthAngle, timeout, epsg, onFinish, onAbort)
webgl/ov.js, line 2406 -
移動至指定位置,並鎖定一個指定中心圍繞旋轉。
Name Type Default Description focusPointGeoPoint 要飛到並鎖定中心點。
distanceNumber 0 optional 離中心點的距離。
paramObject optional focus參數。
Name Type Description allowUpdateFocusPointBoolean optional 是否允許使用者透過滑鼠操作異動中心點。
maxPolarAngleNumber optional 攝影機相對中心點,與天頂夾角的上限(度)。
minPolarAngleNumber optional 攝影機相對中心點,與天頂夾角的下限(度)。
maxDistanceNumber optional 攝影機可以離中心點的最遠距離(公尺)。
minDistanceNumber optional 攝影機可以離中心點的最近距離(公尺)。
polarAngleNumber 0 optional 移動完畢後,攝影機相對中心點的天頂角。
azimuthAngleNumber 0 optional 移動完畢後,攝影機相對中心點的方位角。
timeoutNumber 1000 optional 完成移動的總時間(毫秒)。
epsgNumber 4326 optional 指定focusPoint參數的EPSG。
onFinishov.TerrainView~gotoAndFocusOnFinish optional 移動完成後執行的回呼。
onAbortov.TerrainView~gotoAndFocusOnAbort optional 移動被中斷執行的回呼。
-
gotoCamera(camera, jump, onFinish, onAbort)
webgl/ov.js, line 2191 -
移動到設定的攝影機位置。
Name Type Default Description cameraov.Camera 攝影機參數。
jumpBoolean false optional true:跳,false:瞬移。
onFinishov.TerrainView~gotoCameraOnFinish optional jump成功後執行的回呼。
onAbortov.TerrainView~gotoCameraOnAbort 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); -
importKML(param)
webgl/ov.js, line 5366 -
匯入KML。
Name Type Description paramObject 參數。
Name Type Description urlString kml位址
nameString optional 場景名稱。
callbackov.TerrainView~importKMLCallback 完成後的回呼函式。
-
initAR(buttonElement, callback, options)
webgl/ov.js, line 5516 -
初始化AR,需在https或localhost下。
如果系統支援AR,按鈕會變得可按。
啟動選項參閱文件
https://developer.mozilla.org/en-US/docs/Web/API/XRSystem/requestSession#parametersName Type Description buttonElementHTMLButtonElement 按鈕元件。
callbackov.TerrainView~initARCallback AR啟動後的回呼函式。
optionsObject optional AR啟動選項。
Example
var terrainView = new ov.TerrainView("canvas"));
terrainView.initAR(button, function(){
console.log("AR");
//建議關閉外太空,大氣,清除色,避免蓋住相機畫面
terrainview.enableOuterSpaceBox = false;
terrainview.enableAtmosphere = false;
terrainview.backgroundColor = new ov.Color("#00000000");
},
{
requiredFeatures: ["hit-test"], //請求hitTest功能
optionalFeatures: ["dom-overlay"], //請求dom套疊功能
domOverlay: {
root: document.getElementById("MyControl") //設定要套疊在AR上的dom
}
}); -
initVR(buttonElement, callback)
webgl/ov.js, line 5418 -
初始化VR,需在https或localhost下。
如果系統支援VR,按鈕會變得可按。Name Type Description buttonElementHTMLButtonElement 按鈕元件。
callbackov.TerrainView~initVRCallback VR啟動後的回呼函式。
-
input3DBall(parameter)
webgl/ov.js, line 3587 -
輸入球。
Name Type Description parameterObject optional 參數物件。
Name Type Default Description colorov.Color new ov.Color("#FF0000") optional 顏色。
onCompletedov.TerrainView~input3DBallOnCompleted optional 輸入完成的回呼函式。
onInputtingov.TerrainView~input3DBallOnInputting optional 輸入中的回呼函式。
-
input3DPoint(parameter)
webgl/ov.js, line 3466 -
輸入三維點。
Name Type Description parameterObject optional 參數物件。
Name Type Description onCompletedov.TerrainView~input3DPointOnCompleted optional 輸入完成的回呼函式。
-
input3DPolyline(parameter)
webgl/ov.js, line 3510 -
輸入三維聚合線。
Name Type Description parameterObject optional 參數物件。
Name Type Default Description colorov.Color new ov.Color("#FF0000") optional 顏色。
maxStepNumber Number.MAX_SAFE_INTEGER optional 最多輸入幾段。
onCompletedov.TerrainView~input3DPolylineOnCompleted optional 輸入完成的回呼函式。
onInputtingov.TerrainView~input3DPolylineOnInputting optional 輸入中的回呼函式。
-
inputScreenRectangle(parameter)
webgl/ov.js, line 3615 -
輸入矩形。
Name Type Description parameterObject optional 參數物件。
Name Type Default Description colorov.Color new ov.Color("#FF0000") optional 顏色。
onCompletedov.TerrainView~inputScreenRectangleOnCompleted optional 輸入完成的回呼函式。
onInputtingov.TerrainView~inputScreenRectangleOnInputting optional 輸入中的回呼函式。
-
inputSurfaceCircle(parameter)
webgl/ov.js, line 3559 -
輸入表面圓。
Name Type Description parameterObject optional 參數物件。
Name Type Default Description colorov.Color new ov.Color("#FF0000") optional 顏色。
onCompletedov.TerrainView~inputSurfaceCircleOnCompleted optional 輸入完成的回呼函式。
onInputtingov.TerrainView~inputSurfaceCircleOnInputting optional 輸入中的回呼函式。
-
inputSurfacePoint(parameter)
webgl/ov.js, line 3450 -
輸入表面點。
Name Type Description parameterObject optional 參數物件。
Name Type Description onCompletedov.TerrainView~inputSurfacePointOnCompleted optional 輸入完成的回呼函式。
-
inputSurfacePolygon(parameter)
webgl/ov.js, line 3535 -
輸入表面多邊形。
Name Type Description parameterObject optional 參數物件。
Name Type Default Description colorov.Color new ov.Color("#FF0000") optional 顏色。
maxStepNumber Number.MAX_SAFE_INTEGER optional 最多輸入幾段。
onCompletedov.TerrainView~inputSurfacePolygonOnCompleted optional 輸入完成的回呼函式。
onInputtingov.TerrainView~inputSurfacePolygonOnInputting optional 輸入中的回呼函式。
-
inputSurfacePolyline(parameter)
webgl/ov.js, line 3485 -
輸入表面聚合線。
Name Type Description parameterObject 參數物件。
Name Type Default Description colorov.Color new ov.Color("#FF0000") optional 顏色。
maxStepNumber Number.MAX_SAFE_INTEGER optional 最多輸入幾段。
onCompletedov.TerrainView~inputSurfacePolylineOnCompleted optional 輸入完成的回呼函式。
onInputtingov.TerrainView~inputSurfacePolylineOnInputting optional 輸入中的回呼函式。
-
inputSurfaceRectangle(parameter)
webgl/ov.js, line 3639 -
輸入表面矩形。
Name Type Description parameterObject optional 參數物件。
Name Type Default Description colorov.Color new ov.Color("#FF0000") optional 顏色。
onCompletedov.TerrainView~inputSurfaceRectangleOnCompleted optional 輸入完成的回呼函式。
onInputtingov.TerrainView~inputSurfaceRectangleOnInputting optional 輸入中的回呼函式。
-
isOpen(){Boolean}
webgl/ov.js, line 1857 -
地形場景是否開啟成功。
Returns:
Type Description Boolean 是否開啟成功。 Example
var result = terrainView.isOpen();
-
measure2DLength(param)
webgl/ov.js, line 3719 -
測量2D距離。
Name Type Description paramObject optional 參數物件。
Name Type Default Description colorov.Color new ov.Color("#FF0000") optional 測量時,在螢幕畫出回饋的顏色。
colorOpacityNumber 1 optional 測量時,在螢幕畫出回饋的顏色不透明度。
markGeoColorov.Color new ov.Color("#0000FF") optional 標示測量結果幾何部份的顏色。
markGeoColorOpacityNumber 1 optional 標示測量結果幾何部份的顏色不透明度。
markTagColorov.Color new ov.Color("#FFFF00") optional 標示測量結果文字部份的顏色。
markTagColorOpacityNumber 1 optional 標示測量結果文字部份的顏色不透明度。
measureScaleNumber 1 optional 測量結果要再乘以之Scale。
measureDecimalPointNumber 1 optional 測量結果要留的小數點數。
measureUnitNameObject optional 測量單位參數物件。
Name Type Default Description distanceString "{VALUE}(m)" optional 測量結果要標示的長度格式。
onCompletedov.TerrainView~measure2DLengthOnCompleted optional 測量完成的回呼函式。
-
measureArea(param)
webgl/ov.js, line 3836 -
測量面積。
Name Type Description paramObject optional 參數物件。
Name Type Default Description colorov.Color new ov.Color("#FF0000") optional 測量時,在螢幕畫出回饋的顏色。
colorOpacityNumber 0.5 optional 測量時,在螢幕畫出回饋的顏色不透明度。
markGeoColorov.Color new ov.Color("#0000FF") optional 標示測量結果幾何部份的顏色。
markGeoColorOpacityNumber 0.5 optional 標示測量結果幾何部份的顏色不透明度。
markTagColorov.Color new ov.Color("#FFFF00") optional 標示測量結果文字部份的顏色。
markTagColorOpacityNumber 1 optional 標示測量結果文字部份的顏色不透明度。
measureScaleNumber 1 optional 測量結果要再乘以之Scale。
measureDecimalPointNumber 1 optional 測量結果要留的小數點數。
measureUnitNameObject optional 測量單位參數物件。
Name Type Default Description areaString "{VALUE}(m²)" optional 測量結果要標示的面積格式。
onCompletedov.TerrainView~measureAreaOnCompleted optional 測量完成的回呼函式。
-
measureHeight(param)
webgl/ov.js, line 3809 -
測量高度。
Name Type Description paramObject optional 參數物件。
Name Type Default Description auxiliaryPlaneSizeNumber 0 optional 參考平面的大小,若未輸入或給0時,則使用自適應大小。
colorov.Color new ov.Color("#FF0000") optional 測量時,在螢幕畫出回饋的顏色。
colorOpacityNumber 1 optional 測量時,在螢幕畫出回饋的顏色不透明度。
markGeoColorov.Color new ov.Color("#0000FF") optional 標示測量結果幾何部份的顏色。
markGeoColorOpacityNumber 1 optional 標示測量結果幾何部份的顏色不透明度。
markTagColorov.Color new ov.Color("#FFFF00") optional 標示測量結果文字部份的顏色。
markTagColorOpacityNumber 1 optional 標示測量結果文字部份的顏色不透明度。
measureScaleNumber 1 optional 測量結果要再乘以之Scale。
measureDecimalPointNumber 1 optional 測量結果要留的小數點數。
measureUnitNameObject optional 測量單位參數物件。
Name Type Default Description distanceString "{VALUE}(m)" optional 測量結果要標示的長度格式。
onCompletedov.TerrainView~measureHeightOnCompleted optional 測量完成的回呼函式。
-
measureSpatialLength(param)
webgl/ov.js, line 3781 -
測量空間距離。
Name Type Description paramObject optional 參數物件。
Name Type Default Description colorov.Color new ov.Color("#FF0000") optional 測量時,在螢幕畫出回饋的顏色。
colorOpacityNumber 1 optional 測量時,在螢幕畫出回饋的顏色不透明度。
markGeoColorov.Color new ov.Color("#0000FF") optional 標示測量結果幾何部份的顏色。
markGeoColorOpacityNumber 1 optional 標示測量結果幾何部份的顏色不透明度。
markTagColorov.Color new ov.Color("#FFFF00") optional 標示測量結果文字部份的顏色。
markTagColorOpacityNumber 1 optional 標示測量結果文字部份的顏色不透明度。
measureScaleNumber 1 optional 測量結果要再乘以之Scale。
measureDecimalPointNumber 1 optional 測量結果要留的小數點數。
measureUnitNameObject optional 測量單位參數物件。
Name Type Default Description distanceString "{VALUE}(m)" optional 測量結果要標示的長度格式。
onCompletedov.TerrainView~measureSpatialLengthOnCompleted optional 測量完成的回呼函式。
-
measureSpatialPointToPointLength(param)
webgl/ov.js, line 3750 -
測量點到點距離。
Name Type Description paramObject optional 參數物件。
Name Type Default Description colorov.Color new ov.Color("#FF0000") optional 測量時,在螢幕畫出回饋的顏色。
colorOpacityNumber 1 optional 測量時,在螢幕畫出回饋的顏色不透明度。
markGeoColorov.Color new ov.Color("#0000FF") optional 標示測量結果幾何部份的顏色。
markGeoColorOpacityNumber 1 optional 標示測量結果幾何部份的顏色不透明度。
markTagColorov.Color new ov.Color("#FFFF00") optional 標示測量結果文字部份的顏色。
markTagColorOpacityNumber 1 optional 標示測量結果文字部份的顏色不透明度。
measureScaleNumber 1 optional 測量結果要再乘以之Scale。
measureDecimalPointNumber 1 optional 測量結果要留的小數點數。
measureUnitNameObject optional 測量單位參數物件。
Name Type Default Description distanceString "{VALUE}(m)" optional 測量結果要標示的長度格式。
distanceHorizontalString "{VALUE}(m)" optional 測量結果要標示的水平長度格式。
distanceVerticalString "{VALUE}(m)" optional 測量結果要標示的垂直長度格式。
angleIncludedString "{VALUE}°" optional 測量結果要標示的角度格式。
slopeString "{VALUE}%" optional 測量結果要標示的坡度格式。
onCompletedov.TerrainView~measureSpatialPointToPointLengthOnCompleted optional 測量完成的回呼函式。
-
measureSurfaceLength(param)
webgl/ov.js, line 3691 -
測量地表距離。
Name Type Description paramObject optional 參數物件。
Name Type Default Description colorov.Color "#FF0000" optional 測量時,在螢幕畫出回饋的顏色。
colorOpacityNumber 1 optional 測量時,在螢幕畫出回饋的顏色不透明度。
markGeoColorov.Color "#0000FF" optional 標示測量結果幾何部份的顏色。
markGeoColorOpacityNumber 1 optional 標示測量結果幾何部份的顏色不透明度。
markTagColorov.Color "#FFFF00" optional 標示測量結果文字部份的顏色。
markTagColorOpacityNumber 1 optional 標示測量結果文字部份的顏色不透明度。
measureScaleNumber 1 optional 測量結果要再乘以之Scale。
measureDecimalPointNumber 1 optional 測量結果要留的小數點數。
measureSampleSizeNumber 300 optional 地表高程的取樣數。
measureUnitNameObject optional 測量單位參數物件。
Name Type Default Description distanceString "{VALUE}(m)" optional 測量結果要標示的長度格式。
measureTerrainObject optional 測量目標地形參數,若未指定則量測目前系統載入的地形。
Name Type Default Description identifierString "" optional 測量目標地形名稱,預設為圖台載入的地形。
urlString "" optional 測量目標地形伺服器位址,預設為圖台載入的地形。
onCompletedov.TerrainView~measureSurfaceLengthOnCompleted optional 測量完成的回呼函式。
-
measureTerrainSurfaceArea(param)
webgl/ov.js, line 3861 -
測量表面面積。
Name Type Description paramObject optional 參數物件。
Name Type Default Description colorov.Color new ov.Color("#FF0000") optional 測量時,在螢幕畫出回饋的顏色。
colorOpacityNumber 0.5 optional 測量時,在螢幕畫出回饋的顏色不透明度。
markGeoColorov.Color new ov.Color("#0000FF") optional 標示測量結果幾何部份的顏色。
markGeoColorOpacityNumber 0.5 optional 標示測量結果幾何部份的顏色不透明度。
markTagColorov.Color new ov.Color("#FFFF00") optional 標示測量結果文字部份的顏色。
markTagColorOpacityNumber 1 optional 標示測量結果文字部份的顏色不透明度。
measureScaleNumber 1 optional 測量結果要再乘以之Scale。
measureDecimalPointNumber 1 optional 測量結果要留的小數點數。
measureSampleSizeNumber 300 optional 地表高程的取樣數。
measureUnitNameObject optional 測量單位參數物件。
Name Type Default Description areaString "{VALUE}(m²)" optional 測量結果要標示的面積格式。
measureTerrainObject optional 測量目標地形參數。
Name Type Default Description identifierString "" optional 測量目標地形名稱,預設為圖台載入的地形。
urlString "" optional 測量目標地形伺服器位址,預設為圖台載入的地形。
calcInaccuracyBoolean false optional 是否計算不準確度。
sendTrianglesBoolean false optional 是否回傳切出來的三角面。
onCompletedov.TerrainView~measureAreaOnCompleted optional 測量完成的回呼函式。
-
moveFunSetting(setting)
webgl/ov.js, line 1923 -
設定MoveFun設定。
Name Type Description settingObject 設定。
Name Type Description smoothZoomBoolean optional 平滑縮放。
autoPanFactorNumber optional 自動拖曳常數0~1,0:關閉自動拖曳,1不會停下。
Example
terrainView.moveFunSetting({smoothZoom: true});
-
moveTerrainOverlay(oldIndex, newIndex){Boolean}
webgl/ov.js, line 3341 -
移動地形的Overlay的順序,注意移動非交換,其餘圖層會保持原順序排列,如[0, 1, 2]->[2, 0, 1],若失敗則不移動。
Name Type Description oldIndexNumber | String 原本的index,也可以給圖層名稱當作索引。
newIndexNumber | String 新的index,也可以給圖層名稱當作索引。
Returns:
Type Description Boolean 是否成功。 -
openFileMesh(url, fileObject, urlTemplate, callback, format)
webgl/ov.js, line 2840 -
使用File新增Mesh,CFileMesh不用時需自行呼叫Release。
Name Type Description urlString ServerUrl。
fileObjectFile File物件。
urlTemplateString 網址字串模板,可給代理如PROXY_URL/{URL}。
callbackov.TerrainView~openFileMeshCallback 開啟完成後的回呼函式。
formatString 回呼函式回傳的資料格式,可選格式有"blob"、"integrate"、"json"。
-
openTerrain(param)
webgl/ov.js, line 1567 -
開啟地形場景。
Name Type Description paramObject 參數物件。
Name Type Description urlString 位址。
identifierString 地形圖層名稱。
callbackov.TerrainView~openTerrainCallback optional 執行完成後的回呼函式。
urlTemplateString optional 網址字串模板,可給代理如PROXY_URL/{URL}。
tokenString optional 若有需要提供,token。
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 1907 -
設定控制面板的參數。
Name Type Description settingObject 設定。
Name Type Description colorov.Color optional 顏色。
offsetGeoPoint optional 面板位移pixel。
posTypePOS_TYPE optional 面板預設位置POS_TYPE列舉,LT左上LB左下RT右上RB右下。
alwaysUseFullPanelBoolean optional 永遠顯示完整面板。
Example
terrainView.panelSetting({
color: new ov.Color("#00E8E8"),
offset: new GeoPoint(10, 10),
posType: POS_TYPE.LT
}); -
randomGoto()
webgl/ov.js, line 4143 -
隨機飛到任意點。
-
reloadTerrain(identifier, callback)
webgl/ov.js, line 1584 -
重新載入同伺服器的另一個地形場景。
Name Type Description identifierString 地形圖層名稱。
callbackov.TerrainView~reloadTerrainCallback 執行完成後的回呼函式。
Example
terrainView.reloadTerrain("terrain", function(success){console.log(success);});
-
reloadTerrainOverlay(index){Boolean}
webgl/ov.js, line 3383 -
強制重新載入地形的Overlay紋理。
Name Type Description indexnumber | string index或圖層名稱。
Returns:
Type Description Boolean 是否成功。 Example
terrainView.reloadTerrainOverlay(0); //重新載入第1個Overlay
terrainView.reloadTerrainOverlay("Taiwan3857"); //重新載入指定Overlay
terrainView.reloadTerrainOverlay(); //全部重載 -
removeAllFixTerrainLevelBoundary()
webgl/ov.js, line 5603 -
清除所有固定地形節點Level的範圍。
-
removeConditionOverlayLayer(){Boolean}
webgl/ov.js, line 4462 -
Returns:
Type Description Boolean 是否有移除成功。 -
removeEventListener(eventName, callback){Boolean}
webgl/ov.js, line 2133 -
移除事件監聽器。
Name Type Description eventNameString 事件名稱,參考
ov.TerrainView#addEventListener。callbackcallback 加入時的事件回呼。
Returns:
Type Description Boolean 是否移除成功。 Example
var result = terrainView.removeEventListener("InputCompleted", myCallback);
-
removeKMLScene(scene){Boolean}
webgl/ov.js, line 5391 -
移除指定kml場景。
Name Type Description sceneov.KMLScene kml場景。
Returns:
Type Description Boolean 是否移除成功。 -
removeLayer(layer){Boolean}
webgl/ov.js, line 3413 -
移除圖層。
Name Type Description layerov.Layer 要移除的圖層物件。
Returns:
Type Description Boolean 是否移除成功。 -
removeMoveEvent(moveEvent)
webgl/ov.js, line 5355 -
移除移動事件。
Name Type Description moveEventov.MoveEvent 欲移除的移動事件。
-
removeOverlayWindow(overlayWindow)
webgl/ov.js, line 5198 -
移除指定疊加圖層切窗視窗。
Name Type Description overlayWindowov.OverlayWindow 疊加圖層切窗視窗物件。
-
removeSliceSpace()
webgl/ov.js, line 4121 -
移除裁切空間
ov.TerrainView#setSliceSpace。 -
removeTerrainOverlay(index){Boolean}
webgl/ov.js, line 3365 -
移除地形的Overlay,會造成後面的圖層往前移。
Name Type Description indexnumber | 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){Boolean}
webgl/ov.js, line 5294 -
移除時間事件。
Name Type Description indexNumber 事件編號。
Returns:
Type Description Boolean 移除是否成功。 -
removeUI(UI)
webgl/ov.js, line 4560 -
從圖台移除UI物件。
Name Type Description UIov.UI.Container 要移除的UI物件
-
resetMoveModeKeyboardMapping()
webgl/ov.js, line 1809 -
重設移動模式鍵盤映射。
-
resetMoveModeMouseMapping()
webgl/ov.js, line 1828 -
重設移動模式滑鼠映射。
-
resumeBaseLayerSetting(){Boolean}
webgl/ov.js, line 2827 -
恢復地形檔的WMTS影像。
Returns:
Type Description Boolean 是否恢復成功。 -
rotateBy(center, rotSpeed, maxRotArg, lookAtCenter)
webgl/ov.js, line 2441 -
繞著指定坐標維持固定距離旋轉。
Name Type Default Description centerGeoPoint 旋轉的中心點。
rotSpeedNumber 旋轉的速率,單位為Deg/Sec。
maxRotArgNumber 0 optional 最多只旋轉幾度,若0或沒輸入,代表一直旋轉。
lookAtCenterBoolean true optional 旋轉時,是否一直看著中心。
-
setARModel(src, height, isAbsHeight)
webgl/ov.js, line 5530 -
設定模型於ARHitTest平面上,需在初始化時有開啟HitTest。
Name Type Description srcString optional glTF模型來源,如果沒指定會使用預設模型
heightNumber optional 離平面高度(m)
isAbsHeightBool optional 是否為絕對高
-
setBaseLayer(settings){Boolean}
webgl/ov.js, line 2819 -
設定地形檔的WMTS影像。
Name Type Description settingsObject WMTS參數物件的settings,參考
ov.TerrainView#addTerrainWMTSOverlay。Returns:
Type Description Boolean 是否設定成功。 -
setConditionForHideOverlayLayer(setting, callback)
webgl/ov.js, line 4203 -
設置有隱藏條件的向量圖層(例:行政區圖層)。
Name Type Description settingObject 參數物件。
Name Type Description urlString MapServer網址。
layerNameString 在MapServer上圖層的名稱。
drawColorov.Color 外框線顏色。
fillColorov.Color 內部填滿色。
sqlString 要設為隱藏的條件。
callbackov.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 4350 -
設置條件式向量圖層。
Name Type Description settingObject 參數物件。
Name Type Description urlString MapServer網址。
layerNameString 在MapServer上圖層的名稱。
drawColorString 外框線顏色(#argb)。
fillColorString 內部填滿色(#argb)。
extraSettingsObject optional 上述沒包含的參數,放此物件上(例:setting.extraSettings.LineWidth = "2")。
conditionsArray.<Object> optional 條件陣列(參數可參考MapServer上向量圖層的條件設定)。
callbackov.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 5214 -
設定游標樣式,若使用url,網址請用雙引號包起來,整組字串請用單引號包起來,如'url("http://localhost:35727/webgl/texture/red.png") 2 2, pointer'。
Name Type Description paramObject 參數。
Name Type Default Description defaultCursorString "default" optional 預設游標樣式。
moveModeMouseCursorString "grabbing" optional 滑鼠模式游標拖曳樣式。
moveModePanelCursorString "grabbing" optional 面板模式游標拖曳樣式。
moveModeFocusCursorString "grabbing" optional 旋轉模式游標拖曳樣式。
moveModeWalkCursorString "move" optional 地面行走模式游標拖曳樣式。
measureCursorString "crosshair" optional 測量游標樣式。
inputCursorString "copy" optional 輸入游標樣式。
clickableCursorString "pointer" optional 可點擊游標樣式。
-
setDirection(direction)
webgl/ov.js, line 2270 -
設定攝影機的方位角。
Name Type Description directionNumber 方向角(以自己的北方為0)。
-
setDrawTerrainSetting(setting)
webgl/ov.js, line 1703 -
設定地形的作畫設定
Name Type Description settingObject 作畫設定
Name Type Description maxLevelNumber 地形分裂最大level上限
deepWaterColorov.Color 深水顏色
shallowWaterColorov.Color 水表面顏色
waveScaleNumber 波浪大小
reflectiveColorov.Color 水面反射的顏色
flowRateNumber 水流流速
emptyTileImageString 指定失聯圖磚替代影像
baseColorov.Color 指定地形底色
cullingSurfaceBoolean 指定是否剃除反向的三角形表面
surfaceBoolean 指定作畫時是否要輸出三角面
vertexWireframeBoolean 輸出網格。
vertexWireframeWithBaseOverlayBoolean 指定頂點網格是否要使用紋理上色
vertexWireframeDensityLevelNumber 網格密度等級(1~6)。
wireframeColorov.Color 指定網格的顏色
wireframeOpacityNumber 指定網格的不透明度
magFilterENUM_GL 放大過濾
minFilterENUM_GL 縮小過濾
mipAnisotropyBoolean 各向異性過濾
noElevationBoolean 關閉高程
showWaterBoolean 是否輸出水
waterQualityBoolean 水面渲染品質,分為"very high"、"high"、"normal"、"low"
referenceColorGradientFactorNumber 參考表面漸變因數
referenceBaseColorFactorNumber 參考表面漸變底色最低比例
referenceBaseColorov.Color 參考表面底色
referenceSecondaryColorov.Color 參考表面輔色
referenceGridBoolean 顯示參考表面格線
referenceGridColorov.Color 參考表面格線顏色
gridBoolean 輸出框線
skirtBoolean 輸出裙邊
referenceSurfaceBoolean 輸出參考表面
isDrawAtmoGroundBoolean 是否繪製地表大氣
enableShadowBoolean 是否輸出陰影
contourSettingObject 等高線設定
Name Type Description isopenBoolean 是否開啟等高線
hideWhenMovingBoolean 移動時是否隱藏
intervalNumber 等高線級距
colorov.Color 等高線顏色
alphaNumber 等高線不透明度
aspectColorSettingObject 坡向填色設定,優先度最高
Name Type Description isopenBoolean 是否開啟坡向填色
colorsetArray.<ov.Color> 坡向填色分層顏色
degreesetArray.<Number> 坡向填色分層坡向
alphaNumber 坡向填色不透明度
slopeColorSettingObject 坡度填色設定,優先度第二
Name Type Description isopenBoolean 是否開啟坡度填色
colorsetArray.<ov.Color> 坡度填色分層顏色
degreesetArray.<Number> 坡度填色分層坡向
alphaNumber 坡度填色不透明度
heightColorSettingObject 高度填色設定,優先度最低
Name Type Description isopenBoolean 是否開啟高度填色
colorsetArray.<ov.Color> 高度填色分層顏色
heightsetArray.<Number> 高度填色分層高度
alphaNumber 高度填色不透明度
graticuleSettingObject 經緯線設定
Name Type Description isOpenBoolean 是否開啟經緯線
lngLatLineColorov.Color 經緯線顏色
lngLatLineSizeNumber 經緯線大小
lngLatTextColorov.Color 經緯線文字顏色
tropicOfCancerLineColorov.Color 北迴歸線顏色
tropicOfCancerLineSizeNumber 北迴歸線大小
tropicOfCancerTextColorov.Color 北迴歸線文字顏色
tropicOfCapricornLineColorov.Color 南迴歸線顏色
tropicOfCapricornLineSizeNumber 南迴歸線大小
tropicOfCapricornTextColorov.Color 南迴歸線文字顏色
primeMeridianLineColorov.Color 本初子午線顏色
primeMeridianLineSizeNumber 本初子午線大小
primeMeridianTextColorov.Color 本初子午線文字顏色
antiMeridianLineColorov.Color 對向子午線顏色
antiMeridianLineSizeNumber 對向子午線大小
antiMeridianTextColorov.Color 對向子午線文字顏色
equatorLineColorov.Color 赤道顏色
equatorLineSizeNumber 赤道大小
equatorTextColorov.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 2215 -
設置圖台水平視野角度(Fov)。
Name Type Description horizontalFovNumber 水平視野角度(Field of View)。
Returns:
Type Description Boolean 是否設置成功。 -
setLayerSelectedEntity(layer, id)
webgl/ov.js, line 2049 -
在指定的圖層物件上選取或清除選取指定的圖素。
Name Type Description layerov.Layer 指定圖層物件。
idNumber 指定的圖素Id。
-
setMeasureAfterTerrainDraw(afterTerrain)
webgl/ov.js, line 3886 -
設定測量是否比地形晚畫,預設為true。
Name Type Description afterTerrainBoolean 是否比地形晚畫。
-
setMeasureEpsg(measureEpsg){Boolean}
webgl/ov.js, line 3878 -
設定測量用的Epsg,測量的計算上會先轉成此Epsg才計算,不接受4326。
Name Type Description measureEpsgNumber 測量用的Epsg。
Returns:
Type Description Boolean 是否設定成功。 -
setMeasureFreezeClick(freeze)
webgl/ov.js, line 3894 -
設定測量中凍結滑鼠點擊,預設為true。
Name Type Description freezeBoolean 是否凍結滑鼠點擊。
-
setMoveMode(mode, param)
webgl/ov.js, line 1755 -
設置操作模式。
Name Type Description modeov.MOVE_TYPE 操作模式。
paramObject 操作模式的參數,參考
ov.MOVE_TYPE -
setMoveModeKeyboardMapping(keyboardMappingSetting)
webgl/ov.js, line 1802 -
設定移動模式鍵盤映射。
Name Type Description keyboardMappingSettingObject 映射設定,使用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 1821 -
設定移動模式滑鼠映射。
Name Type Description buttonov.MOUSE_BUTTON 滑鼠按鍵。
mappingButtonov.MOUSE_BUTTON 映射按鍵。
Example
//將滑鼠左鍵映射滑鼠右鍵。
terrainView.setMoveModeMouseMapping(ov.MOUSE_BUTTON.LEFT, ov.MOUSE_BUTTON.RIGHT); -
setPath(path)
webgl/ov.js, line 1867 -
設定程式碼所在路徑。
Name Type Description pathString 路徑。
Example
terrainView.setPath("../webgl/");
-
setRestrictedArea(polygonSet)
webgl/ov.js, line 5311 -
設定禁止通行區域。
Name Type Description polygonSetGeoPolygonSet 禁止通行區域幾何,可接受polygonSet array。
-
setSeaAltitude(seaAltitude){Boolean}
webgl/ov.js, line 1876 -
設定海平面高度。
Name Type Description seaAltitudeNumber 海平面高度。
Returns:
Type Description Boolean 是否設定成功。 -
setSeaQuality(quality){Boolean}
webgl/ov.js, line 1889 -
設定海渲染品質,預設為normal。
Name Type Description qualityseaQuality 渲染品質,分成"very high"、"high"、"normal"、"low"。
Returns:
Type Description Boolean 是否設定成功。 -
setSelectMode(mode)
webgl/ov.js, line 5408 -
設定圖素選取模式,預設為ov.SELECT_REPLACE,如需點選多個圖素可設置為ov.SELECT_ADD
按住ctrl亦可以觸發多選模式Name Type Description modeov.SELECT_TYPE 選取類型。
-
setSliceSpace(param)
webgl/ov.js, line 4076 -
設定裁切空間,會直接清除舊的裁切空間,可作用於ModelLayer、ModelSetLayer、OGCI3SLayer、OGC3DTilesLayer、PhotogrammetryLayer、PipelineLayer、PointCloudLayer。
Name Type Description paramObject optional 參數物件。
Name Type Default Description colorov.Color new ov.Color("#FF0000") optional 在螢幕畫出回饋的顏色。
colorOpacityNumber 0.5 optional 在螢幕畫出回饋的顏色不透明度。
markTagColorov.Color new ov.Color("#FFFF00") optional 標示測量結果文字部份的顏色。
markTagColorOpacityNumber 1 optional 標示測量結果文字部份的顏色不透明度。
measureScaleNumber 1 optional 測量結果要再乘以之Scale。
measureDecimalPointNumber 1 optional 測量結果要留的小數點數。
planeEnableRotationArray [true, true, true, true, true, true] optional 特定面不能旋轉。
planeEnableResizeArray [true, true, true, true, true, true] optional 特定面不能拉伸。
measuringTextureParamObject null optional 裁切體上刻度圖參數。
Name Type Description enableDrawGeoPoint optional 是否作畫。
heightIntervalGeoPoint optional 高度間隔。
lineWidthScaleGeo3DPoint optional 刻度線寬。
sliceSpaceParamObject null optional 直接指定裁切體幾何。
Name Type Description originGeoPoint optional 裁切體幾何起點。
heightVectorGeo3DPoint optional 裁切體幾何高度向量。
sideExtendVectorGeo3DPoint optional 裁切體幾何兩側延展向量。
depthNumber optional 裁切體幾何深度。
parameter.onCompletedov.TerrainView~setSliceSpaceOnCompleted optional 輸入完成的回呼函式。
parameter.onEditingov.TerrainView~setSliceSpaceOnEditing optional 編輯中的回呼函式。
-
setTerrainFade(param)
webgl/ov.js, line 5245 -
設定地形開始淡出淡出參數。
Name Type Description paramObject 參數。
Name Type Description useFadeBoolean 開啟地形淡出淡出。
nearNumber 開始淡出的距離。
farNumber 完全消失的距離。
-
setTimeEventEnable(index, enable)
webgl/ov.js, line 5303 -
開關時間事件。
Name Type Description indexNumber 事件編號。
enableBoolean 是否啟用事件。
-
setVertArg(vertArg)
webgl/ov.js, line 2279 -
設定攝影機的俯仰角。
Name Type Description vertArgNumber 俯仰角(水平為0,俯正仰負)。
-
setViewDistort(param)
webgl/ov.js, line 5228 -
設定圖台畫面扭曲參數。
Name Type Description paramObject 參數。
Name Type Default Description cameraIntrinsicMatrixArray.<Number> 相機3*3內參矩陣,長度為9的數字陣列。
cameraDistortionCoefficientArray.<Number> 相機畸變參數,長度為5的數字陣列。
isOpenBoolean false optional 是否開啟。
updateIntervalNumber 1000 optional 影像更新頻率,0為不更新,單位為毫秒。
cameraWidthNumber 1920 optional 相機影像寬。
cameraHeightNumber 1080 optional 相機影像高。
-
setVRControllerTriggerType(handedness, type)
webgl/ov.js, line 5568 -
設定VR手把板機鍵功能
Name Type Description handednessString 手把,分成left、right
typeString 板機功能,分成Teleport、Zoom、Select
-
setXRPosition(position)
webgl/ov.js, line 5437 -
AR/VR移動到指定的位置。
Name Type Description positionGeoPoint 移動的位置。
-
setXRPositionChangedListener(callback)
webgl/ov.js, line 5454 -
AR/VR移動事件監聽器,使用手把傳送或
ov.TerrainView#setXRPosition會觸發。Name Type Description callbackov.TerrainView~setXRPositionChangedListenerCallback 傳送後的回呼函式。
-
setXRView(view)
webgl/ov.js, line 5446 -
AR/VR移動到指定的方向
Name Type Description viewGeo3DPoint 面對的方向
-
showTerrainBoundingVolume(show)
webgl/ov.js, line 3402 -
是否顯示地形的包圍盒。
Name Type Description showBoolean 是否顯示。
Example
terrainView.showTerrainBoundingVolume(true); //顯示包圍盒
terrainView.showTerrainBoundingVolume(false); //關閉顯示包圍盒 -
swapTerrainOverlay(firstIndex, secondIndex){Boolean}
webgl/ov.js, line 3351 -
交換地形的Overlay的順序,若失敗則不交換。
Name Type Description firstIndexNumber | String 第一個圖層的index,也可以給圖層名稱當作索引。
secondIndexNumber | String 第二個圖層的index,也可以給圖層名稱當作索引。
Returns:
Type Description Boolean 是否成功。 -
updateMoveModeParameter(param)
webgl/ov.js, line 1786 -
更新目前操作模式的參數。
Name Type Description paramObject 操作模式的參數,參考
ov.MOVE_TYPE -
updateScreen()
webgl/ov.js, line 4128 -
更新畫面。
-
windowToTerrain(p){Boolean}
webgl/ov.js, line 3928 -
將指定螢幕座標轉換成對應的地形位置。
Name Type Description pGeoPoint 指定位置。
Returns:
Type Description Boolean 轉換是否成功。 -
worldToWindow(p, absHeight){Boolean}
webgl/ov.js, line 3938 -
將指定的世界座標轉換至螢幕座標。
Name Type Description pGeoPoint 指定位置。
absHeightBoolean 是否為絕對高度。
Returns:
Type Description Boolean 轉換是否成功。 -
xrWindowToWorld(pos, distance){GeoPoint}
webgl/ov.js, line 5476 -
AR/VR螢幕座標轉地圖座標。
Name Type Description posGeoPoint 螢幕座標。
distanceNumber 離使用者的距離。
Returns:
Type Description GeoPoint 地圖座標。
Type Definitions
-
addCustomLayerCallback(success, customLayer)
webgl/ov.js, line 2807 -
Name Type Description successBoolean 是否成功。
customLayerov.CustomLayer 自畫圖層。
- See:
-
addEventListenerCallback(MeasureCompletedResult, CameraPosChangedPos, CameraPosChangedV, CameraPosChangedUp, ClickResultMousePos, ClickResultWorldPos, MouseDownResultButton, MouseDownResultMousePos, MouseDownResultMapPos)
webgl/ov.js, line 2106 -
Name Type Description MeasureCompletedResultObject MeasureCompleted結果。
Name Type Description successBoolean 測量是否成功。
lengthNumber optional 長度測量結果。
heightNumber optional 高度測量結果。
areaNumber optional 面積測量結果。
measureObjObject optional 傳入的物件。
CameraPosChangedPosGeoPoint CameraPosChanged結果的Pos。
CameraPosChangedVGeo3DPoint CameraPosChanged結果的V。
CameraPosChangedUpGeo3DPoint CameraPosChanged結果的Up。
ClickResultMousePosGeoPoint ClickResult結果的滑鼠位置。
ClickResultWorldPosGeoPoint ClickResult結果的世界位置。
MouseDownResultButtonNumber MouseDown結果的滑鼠按鍵。
MouseDownResultMousePosGeoPoint MouseDown結果的滑鼠位置。
MouseDownResultMapPosGeoPoint MouseDown結果的地圖位置。
- See:
-
addModelLayerCallback(success, modelLayer)
webgl/ov.js, line 2719 -
Name Type Description successBoolean 是否成功。
modelLayerov.ModelLayer 模型圖層。
- See:
-
addModelSetLayerCallback(success, modelSetLayer)
webgl/ov.js, line 2748 -
Name Type Description successBoolean 是否成功。
modelSetLayerov.ModelSetLayer 模型集圖層。
- See:
-
addOGC3DTilesLayerCallback(success, OGC3DTilesLayer)
webgl/ov.js, line 2573 -
Name Type Description successBoolean 是否成功。
OGC3DTilesLayerov.OGC3DTilesLayer OGC3DTiles圖層。
- See:
-
addOGCI3SLayerCallback(success, OGCI3SLayer)
webgl/ov.js, line 2603 -
Name Type Description successBoolean 是否成功。
OGCI3SLayerov.OGCI3SLayer I3S圖層。
- See:
-
addPhotogrammetryModelLayerCallback(success, photogrammetryModelLayer)
webgl/ov.js, line 2519 -
Name Type Description successBoolean 是否成功。
photogrammetryModelLayerov.PhotogrammetryModelLayer 傾斜攝影模型圖層。
-
addPhotogrammetryModelLayerCallback(success, photogrammetryModelLayer)
webgl/ov.js, line 2545 -
Name Type Description successBoolean 是否成功。
photogrammetryModelLayerov.PhotogrammetryModelLayer 傾斜攝影模型圖層。
-
addPipelineLayerCallback(success, pipelineLayer)
webgl/ov.js, line 2632 -
Name Type Description successBoolean 是否成功。
pipelineLayerov.PipelineLayer 管線圖層。
- See:
-
addPointCloudLayerCallback(success, pointCloudLayer)
webgl/ov.js, line 2690 -
Name Type Description successBoolean 是否成功。
pointCloudLayerov.PointCloudLayer 點雲圖層。
- See:
-
addProjectorLayerCallback(success, projectorLayer)
webgl/ov.js, line 2771 -
Name Type Description successBoolean 是否成功。
projectorLayerov.ProjectorLayer 監視器圖層。
- See:
-
addTerrainCustomTileOverlayCallback(param)
webgl/ov.js, line 2869 -
Name Type Description paramObject 參數物件。
Name Type Description successBoolean 是否成功。
messageString optional 錯誤訊息。
-
addTerrainDitchOverlayCallback(param)
webgl/ov.js, line 3270 -
Name Type Description paramObject 參數物件。
Name Type Description successBoolean 是否成功。
messageString optional 錯誤訊息。
-
addTerrainSceneOverlayCallback(param)
webgl/ov.js, line 3238 -
Name Type Description paramObject 參數物件。
Name Type Description successBoolean 是否成功。
messageString optional 錯誤訊息。
-
addTerrainSingleTileOverlayCallback(param)
webgl/ov.js, line 2907 -
Name Type Description paramObject 參數物件。
Name Type Description successBoolean 是否成功。
messageString optional 錯誤訊息。
-
addTerrainVectorTileOverlayCallback(param)
webgl/ov.js, line 3149 -
Name Type Description paramObject 參數物件。
Name Type Description successBoolean 是否成功。
messageString optional 錯誤訊息。
layernameString optional 圖層名稱。
-
addTerrainVisualizedDataGridOverlayCallback(param)
webgl/ov.js, line 3203 -
Name Type Description paramObject 參數物件。
Name Type Description successBoolean 是否成功。
messageString optional 錯誤訊息。
-
addTerrainWMSOverlayCallback(param)
webgl/ov.js, line 2976 -
Name Type Description paramObject 參數物件。
Name Type Description successBoolean 是否成功。
layernameString optional 圖層名稱。
-
addTerrainWMTSOverlayCallback(param)
webgl/ov.js, line 2941 -
Name Type Description paramObject 參數物件。
Name Type Description successBoolean 是否成功。
messageString optional 錯誤訊息。
layernameString optional 圖層名稱。
-
addVectorLayerCallback(success, vectorLayer)
webgl/ov.js, line 2661 -
Name Type Description successBoolean 是否成功。
vectorLayerov.VectorLayer 向量圖層。
- See:
-
facingOnAbort()
webgl/ov.js, line 2326 -
- See:
-
facingOnFinish()
webgl/ov.js, line 2322 -
- See:
-
focusWindowCenterFacingOnAbort()
webgl/ov.js, line 2356 -
focusWindowCenterFacingOnFinish()
webgl/ov.js, line 2352 -
getScreenSnapCallback(canvasImage, canvasImageDataURL)
webgl/ov.js, line 4161 -
Name Type Description canvasImageHTMLImageElement 畫面影像Image物件。
canvasImageDataURLString 畫面影像DomString。
- See:
-
gotoAndFocusOnAbort()
webgl/ov.js, line 2429 -
- See:
-
gotoAndFocusOnFinish()
webgl/ov.js, line 2425 -
- See:
-
gotoCameraOnAbort()
webgl/ov.js, line 2205 -
- See:
-
gotoCameraOnFinish()
webgl/ov.js, line 2201 -
- See:
-
gotoOnAbort()
webgl/ov.js, line 2384 -
- See:
-
gotoOnFinish()
webgl/ov.js, line 2380 -
- See:
-
importKMLCallback(scene)
webgl/ov.js, line 5369 -
Name Type Description sceneov.KMLScene kml場景。
- See:
-
initARCallback()
webgl/ov.js, line 5519 -
- See:
-
initVRCallback()
webgl/ov.js, line 5421 -
- See:
-
input3DBallOnCompleted(onCompletedCallback)
webgl/ov.js, line 3590 -
Name Type Description onCompletedCallbackObject 輸入結束的結果。
Name Type Description successBoolean 輸入是否成功。
geoObject optional 輸入結束的幾何。
Name Type Description centerGeoPoint optional 輸入的球心。
radiusNumber optional 輸入的半徑。
- See:
-
input3DBallOnInputting(OnInputtingCallback)
webgl/ov.js, line 3599 -
Name Type Description OnInputtingCallbackObject 輸入中的結果。
Name Type Description geoObject 輸入中的幾何。
Name Type Description centerGeoPoint 輸入中的圓心。
radiusNumber 輸入中的半徑。
- See:
-
input3DPointOnCompleted(onCompletedCallback)
webgl/ov.js, line 3469 -
Name Type Description onCompletedCallbackObject 輸入結束的結果。
Name Type Description successBoolean 輸入是否成功。
geoGeoPoint optional 輸入結束的幾何。
- See:
-
input3DPolylineOnCompleted(onCompletedCallback)
webgl/ov.js, line 3513 -
Name Type Description onCompletedCallbackObject 輸入結束的結果。
Name Type Description successBoolean 輸入是否成功。
geoGeoPolyline optional 輸入結束的幾何。
- See:
-
input3DPolylineOnInputting(OnInputtingCallback)
webgl/ov.js, line 3520 -
Name Type Description OnInputtingCallbackObject 輸入中的結果。
Name Type Description geoGeoPolyline 輸入中的幾何。
- See:
-
inputScreenRectangleOnCompleted(onCompletedCallback)
webgl/ov.js, line 3618 -
Name Type Description onCompletedCallbackObject 輸入結束的結果。
Name Type Description successBoolean 輸入是否成功。
geoCRect optional 輸入結束的幾何。
-
inputScreenRectangleOnInputting(OnInputtingCallback)
webgl/ov.js, line 3625 -
Name Type Description OnInputtingCallbackObject 輸入中的結果。
Name Type Description geoCRect 輸入中的幾何。
-
inputSurfaceCircleOnCompleted(onCompletedCallback)
webgl/ov.js, line 3562 -
Name Type Description onCompletedCallbackObject 輸入結束的結果。
Name Type Description successBoolean 輸入是否成功。
geoObject optional 輸入結束的幾何。
Name Type Description centerGeoPoint optional 輸入的圓心。
radiusNumber optional 輸入的半徑。
- See:
-
inputSurfaceCircleOnInputting(OnInputtingCallback)
webgl/ov.js, line 3571 -
Name Type Description OnInputtingCallbackObject 輸入中的結果。
Name Type Description geoObject 輸入中的幾何。
Name Type Description centerGeoPoint 輸入中的圓心。
radiusNumber 輸入中的半徑。
- See:
-
inputSurfacePointOnCompleted(onCompletedCallback)
webgl/ov.js, line 3453 -
Name Type Description onCompletedCallbackObject 輸入結束的結果。
Name Type Description successBoolean 輸入是否成功。
geoGeoPoint optional 輸入結束的幾何。
- See:
-
inputSurfacePolygonOnCompleted(onCompletedCallback)
webgl/ov.js, line 3538 -
Name Type Description onCompletedCallbackObject 輸入結束的結果。
Name Type Description successBoolean 輸入是否成功。
geoGeoPolygon optional 輸入結束的幾何。
- See:
-
inputSurfacePolygonOnInputting(OnInputtingCallback)
webgl/ov.js, line 3545 -
Name Type Description OnInputtingCallbackObject 輸入中的結果。
Name Type Description geoGeoPolygon 輸入中的幾何。
- See:
-
inputSurfacePolylineOnCompleted(onCompletedCallback)
webgl/ov.js, line 3488 -
Name Type Description onCompletedCallbackObject 輸入結束的結果。
Name Type Description successBoolean 輸入是否成功。
geoGeoPolyline optional 輸入結束的幾何。
-
inputSurfacePolylineOnInputting(OnInputtingCallback)
webgl/ov.js, line 3495 -
Name Type Description OnInputtingCallbackObject 輸入中的結果。
Name Type Description geoGeoPolyline 輸入中的幾何。
-
inputSurfaceRectangleOnCompleted(onCompletedCallback)
webgl/ov.js, line 3642 -
Name Type Description onCompletedCallbackObject 輸入結束的結果。
Name Type Description successBoolean 輸入是否成功。
geoCRect optional 輸入結束的幾何。
-
inputSurfaceRectangleOnInputting(OnInputtingCallback)
webgl/ov.js, line 3649 -
Name Type Description OnInputtingCallbackObject 輸入中的結果。
Name Type Description geoCRect 輸入中的幾何。
-
measure2DLengthOnCompleted(onCompletedCallback)
webgl/ov.js, line 3722 -
Name Type Description onCompletedCallbackObject 測量結束結果。
Name Type Description successBoolean 測量是否成功。
geoObject optional 測量結束的幾何。
Name Type Description distanceNumber optional 測量結束的長度。
- See:
-
measureAreaOnCompleted(onCompletedCallback)
webgl/ov.js, line 3864 -
Name Type Description onCompletedCallbackObject 測量結束結果。
Name Type Description successBoolean 測量是否成功。
geoObject optional 測量結束的幾何。
Name Type Description areaNumber optional 測量結束的面積。
- See:
-
measureHeightOnCompleted(onCompletedCallback)
webgl/ov.js, line 3812 -
Name Type Description onCompletedCallbackObject 測量結束結果。
Name Type Description successBoolean 測量是否成功。
geoObject optional 測量結束的幾何。
Name Type Description heightNumber optional 測量結束的高度。
- See:
-
measureSpatialLengthOnCompleted(onCompletedCallback)
webgl/ov.js, line 3784 -
Name Type Description onCompletedCallbackObject 測量結束結果。
Name Type Description successBoolean 測量是否成功。
geoObject optional 測量結束的幾何。
Name Type Description distanceNumber optional 測量結束的長度。
-
measureSpatialPointToPointLengthOnCompleted(onCompletedCallback)
webgl/ov.js, line 3753 -
Name Type Description onCompletedCallbackObject 測量結束結果。
Name Type Description successBoolean 測量是否成功。
geoObject optional 測量結束的幾何。
Name Type Description distanceNumber optional 測量結束的長度。
distanceHorizontalNumber optional 測量結束的水平長度。
distanceVerticalNumber optional 測量結束的垂直長度。
angleIncludedNumber optional 測量結束的角度。
slopeNumber optional 測量結束的坡度。
-
measureSurfaceLengthOnCompleted(onCompletedCallback)
webgl/ov.js, line 3694 -
Name Type Description onCompletedCallbackObject 測量結束結果。
Name Type Description successBoolean 測量是否成功。
geoObject optional 測量結束的幾何。
Name Type Description distanceNumber optional 測量結束的長度。
sphereDistanceNumber optional 測量結束的球體長度。
-
openFileMeshCallback(param)
webgl/ov.js, line 2843 -
Name Type Description paramObject 參數物件。
Name Type Description successBoolean 是否成功。
meshsArray.<Object> optional 物件陣列,CFileMesh可用來加入自畫模型。
- See:
-
openTerrainCallback(terrainLayer, success)
webgl/ov.js, line 1570 -
Name Type Description terrainLayerCTerrainLayer 地形圖層。
successBoolean 是否成功。
- See:
-
reloadTerrainCallback(success)
webgl/ov.js, line 1587 -
Name Type Description successBoolean 是否成功
- See:
-
setConditionForHideOverlayLayerCallback(result)
webgl/ov.js, line 4309 -
Name Type Description resultObject 結果物件。
Name Type Description successBoolean 是否成功。
-
setConditionOverlayLayerCallback(result)
webgl/ov.js, line 4451 -
Name Type Description resultObject 結果物件。
Name Type Description successBoolean 是否成功。
-
setSliceSpaceOnCompleted(onCompletedCallback)
webgl/ov.js, line 4079 -
Name Type Description onCompletedCallbackObject 裁切空間結果。
Name Type Description successBoolean 是否成功。
sliceSpaceParamObject 裁切空間的幾何。
Name Type Description originGeoPoint 裁切空間的起點。
heightVectorGeo3DPoint 裁切體幾何高度向量。
sideExtendVectorGeo3DPoint 裁切體幾何兩側延展向量。
depthGeo3DPoint 裁切體幾何深度。
- See:
-
setSliceSpaceOnEditing(onEditingCallback)
webgl/ov.js, line 4090 -
Name Type Description onEditingCallbackObject 裁切空間結果。
Name Type Description successBoolean 是否成功。
sliceSpaceParamObject 裁切空間的幾何。
Name Type Description originGeoPoint 裁切空間的起點。
heightVectorGeo3DPoint 裁切體幾何高度向量。
sideExtendVectorGeo3DPoint 裁切體幾何兩側延展向量。
depthGeo3DPoint 裁切體幾何深度。
- See:
-
setXRPositionChangedListenerCallback()
webgl/ov.js, line 5457