Class: PipelineLayer

ov. PipelineLayer

new ov.PipelineLayer()

webgl/ov-PipelineLayer.js, line 6

管線圖層

Extends

Members

boundary

Boundary

Properties:
Name Type Description
Boundary GeoBoundary

圖層邊界。

readonlyname

圖層名稱

Properties:
Name Type Description
name String

名稱。

show

圖層顯示

Properties:
Name Type Description
show Boolean

是否顯示圖層。

tooltipSetting

Tooltip設定。

Properties:
Name Type Description
positionMode ov.TOOLTIP_POSITION_MODE

定位模式。

show Boolean

是否顯示。

offset GeoPoint

偏移。

style Object

Tooltip style,可自行擴充。

preProcessing ov.Layer~tooltipPreProcessingCallback

內容前處理方法。

positionPreProcessing ov.Layer~tooltipPositionPreProcessingCallback

座標前處理方法。

Methods

inherited enableOrderIndependentTransparency(enable)

webgl/ov-Layer.js, line 280

透明度是否使用OIT演算法,正確性較高但效能會降低。

Name Type Description
enable Boolean

啟用OIT透明。

getAttr(id, fieldName, callback)

webgl/ov-PipelineLayer.js, line 76

取得指定管線的指定屬性值。

Name Type Description
id Number

指定管線的ID。

fieldName String

欲取得的欄位。

callback ov.PipelineLayer~getAttrCallback

非同步取得屬性後的回呼。

getAttrs(id, callback)

webgl/ov-PipelineLayer.js, line 108

取得指定管線的所有屬性值。

Name Type Description
id Number

指定管線的ID。

callback ov.PipelineLayer~getAttrsCallback

非同步取得屬性後的回呼。

getColAndAttrs(id, callback)

webgl/ov-PipelineLayer.js, line 90

取得指定圖素的所有屬性欄位名稱和屬性值。

Name Type Description
id Number

指定建物的ID。

callback ov.PipelineLayer~getColAndAttrsCallback

非同步取得屬性後的回呼。

inherited getHeader(callback)

webgl/ov-Layer.js, line 96

取得圖層標頭物件。

Name Type Description
callback ov.Layer~setOnGetHeaderCallback

請求標頭物件的回呼,不給則同步回傳(不保證回傳速度)。

getOrgFilter(){Array.<String>}

webgl/ov-PipelineLayer.js, line 49

取得圖層管線管理單位篩選狀態。

Returns:
Type Description
Array.<String> 圖層管線管理單位篩選狀態。

getPipelineAttrName(){Array.<String>}

webgl/ov-PipelineLayer.js, line 15

取得圖層屬性欄位名稱。

Returns:
Type Description
Array.<String> 圖層屬性欄位名稱清單。

getPipelineOrgName(){Array.<String>}

webgl/ov-PipelineLayer.js, line 23

取得圖層管理單位。

Returns:
Type Description
Array.<String> 圖層管理單位清單。

getTypeFilter(type){Boolean}

webgl/ov-PipelineLayer.js, line 32

取得圖層管線指定類型篩選狀態。

Name Type Description
type Number

指定的類型代碼。

Returns:
Type Description
Boolean 圖層指定管線類型篩選狀態。

inherited goto(callback)

webgl/ov-Layer.js, line 288

飛到圖層的位置。

Name Type Description
callback ov.Layer~gotoCallback

移動完成後執行的回呼。

makeProfile(polyline, callback)

webgl/ov-PipelineLayer.js, line 122

取得與指定線段相交的幾何剖面數據。

Name Type Description
polyline GeoPolyline

剖面的幾何。

callback ov.PipelineLayer~makeProfileCallback

剖面數據取得的回呼。

searchByDistance(epsg, geo, distance, sql, callback)

webgl/ov-PipelineLayer.js, line 169

查詢在指定幾何範圍以內的圖素,並以SQL篩選。

Name Type Description
epsg Number

幾何的EPSG。

geo GeoPolygon

指定幾何。

distance Number

指定距離,單位公尺。

sql String

SQL篩選條件

callback ov.PipelineLayer~searchByDistanceCallback

查詢的回呼。

searchByInclude(epsg, geo, sql, callback)

webgl/ov-PipelineLayer.js, line 152

查詢被指定幾何包圍的圖素,並以SQL篩選。

Name Type Description
epsg Number

幾何的EPSG。

geo GeoPolygon

指定幾何。

sql String

SQL篩選條件。

callback ov.PipelineLayer~searchByIncludeCallback

查詢的回呼。

searchBySQL(sql, callback)

webgl/ov-PipelineLayer.js, line 136

以SQL條件查詢圖層中的圖素。

Name Type Description
sql String

SQL查詢條件。

callback ov.PipelineLayer~searchBySQLCallback

查詢的回呼。

inherited setAllowHoverEntity(allow)

webgl/ov-Layer.js, line 199

設定圖層的圖素是否能Hover。

Name Type Description
allow Boolean

是否能Hover。

inherited setAllowSelectEntity(allow)

webgl/ov-Layer.js, line 207

設定圖層的圖素是否能被選取。

Name Type Description
allow Boolean

是否能被點選。

inherited setDepthFunc(depthFunc)

webgl/ov-Layer.js, line 313

設置圖層深度測試的方式。

Name Type Description
depthFunc ov.DEPTH_FUNC

深度測試的方式。

setDrawAllFlow(enableDrawAll)

webgl/ov-PipelineLayer.js, line 182

設定開啟流向全畫功能。

Name Type Description
enableDrawAll Boolean

是否開啟流向全畫功能。

inherited setDrawSelectedEntityOutline(isDraw)

webgl/ov-Layer.js, line 151

設定圖層的圖素是否顯示outline。

Name Type Description
isDraw Boolean

是否顯示。

setEntityColor(entityId, color, mix)

webgl/ov-PipelineLayer.js, line 254

設定指定管線顏色。

Name Type Description
entityId Number

指定管線Id。

color ov.Color optional

指定的顏色。

mix Number optional

指定的混色比例。

Example

pipelineLayer.setEntityColor(1234, "#FFFFFF", 1.0); //管線變白色
pipelineLayer.setEntityColor(1234, "#FFFFFF", 0.5); //管線變原本的顏色與白色各半混色,比如這樣,管線會看起來有些像高亮
pipelineLayer.setEntityColor(1234, null); //清除管線的顏色設定
pipelineLayer.setEntityColor(-1); //清除整張圖層的顏色設定

setEntityFlow(entityId, isDrawFlow)

webgl/ov-PipelineLayer.js, line 195

設定指定管線是否畫出流向,如有設定全畫ov.PipelineLayer#setDrawAllFlow則以全畫為主。

Name Type Description
entityId Number

指定管線Id。

isDrawFlow Boolean optional

是否畫出流向。

Example

layer.setEntityFlow(9527, true); //開啟指定管線的流向作畫
layer.setEntityFlow(9527, false); //關閉指定管線的流向作畫
layer.setEntityFlow(-1); //清除整張圖層的流向設定

inherited setEntitySelected(entityID)

webgl/ov-Layer.js, line 324

設定圖素選取狀態。
未選取則變成選取狀態。
選取則變成未選取狀態。
-1清除所有選取狀態。

Name Type Description
entityID Number

圖素ID。

inherited setFadeNearFar(near, far){Boolean}

webgl/ov-Layer.js, line 272

設定圖層開始淡出與完全消失的距離。

Name Type Description
near Number

開始淡出的距離。

far Number

完全消失的距離。

Returns:
Type Description
Boolean 設定是否成功,當near > far時,會失敗。

setFlowColorWeight(r, g, b)

webgl/ov-PipelineLayer.js, line 205

設定流向箭頭顏色(0~1之間)。

Name Type Description
r Number

R通道值。

g Number

G通道值。

b Number

B通道值。

setFlowSpeed(flowSpeed)

webgl/ov-PipelineLayer.js, line 213

設定流向速度(預設1)。

Name Type Description
flowSpeed Number

流向速度。

setFlowTextureMaxDensity(x, y)

webgl/ov-PipelineLayer.js, line 230

設定流向標示每根管線X,Y方向上貼圖數的最大值,設完後各管線可能會不等速流動。

Name Type Description
x Number | null optional

x方向貼圖數的最大值。

y Number | null optional

y方向貼圖數的最大值。

setFlowTypeFilter(enable, type)

webgl/ov-PipelineLayer.js, line 239

設定流向管線指定類型篩選狀態。

Name Type Description
enable Boolean

設定這個管線類型的篩選狀態。

type Number

指定的類型代碼。

setFlowUseTexture(flowUseTexture)

webgl/ov-PipelineLayer.js, line 221

設定流向是否使用箭頭圖片。

Name Type Description
flowUseTexture Boolean

是否使用箭頭圖片。

inherited setHide(mode)

webgl/ov-Layer.js, line 305

設定圖層隱藏模式。

Name Type Description
mode ov.HIDE

隱藏模式。

inherited setHoverEntityHighlightColor(color, opacity)

webgl/ov-Layer.js, line 188

設定圖層圖素的Hover高亮顏色。

Name Type Description
color ov.Color

Hover高亮的顏色。

opacity Number

不透明度。

inherited setOffset(x, y, z){Boolean}

webgl/ov-Layer.js, line 218

設定圖層的公尺平移量(目前僅支援PhotogrammetryModel、PointCloud、Model、ModelSet、Pipeline)。

Name Type Description
x Number

向東西方向偏移,單位為公尺。

y Number

向南北方向偏移,單位為公尺。

z Number

向垂直於地表方向偏移,單位為公尺。

Returns:
Type Description
Boolean 變換是否成功,某些圖層不支持此操作時返回false。

inherited setOnClickEntity(callback)

webgl/ov-Layer.js, line 109

設定此圖層圖素被點擊時的回呼。

Name Type Description
callback ov.Layer~setOnClickEntityCallback

圖素被點擊時的回呼。

inherited setOpacity(opacity)

webgl/ov-Layer.js, line 143

設置圖層不透明程度。

Name Type Description
opacity Number

圖層不透明程度(0~1)。

setOrgFilter(enable, org)

webgl/ov-PipelineLayer.js, line 58

設定圖層管線管理單位篩選狀態

Name Type Description
enable Boolean

設定這張管線圖層是否要啟用管理單位篩選。

org Array.<String>

指定要顯示的管理單位,最多16個。

inherited setOutlineColor(VisibleColor, HiddenColor)

webgl/ov-Layer.js, line 160

設定選取圖層圖素的Outline顏色。

Name Type Description
VisibleColor ov.Color

outline可視的顏色。

HiddenColor ov.Color

outline不可視的顏色。

inherited setResolutionScale(resolutionScale){Boolean}

webgl/ov-Layer.js, line 245

設定圖層解析度條件的Scale比例。

Name Type Description
resolutionScale Number

解析度條件的Scale比例(初始值1,越大越容易分裂,模型越細緻)。

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

inherited setRotate(degree){Boolean}

webgl/ov-Layer.js, line 227

設定圖層的旋轉量(目前僅支援PhotogrammetryModel、PointCloud、Model、ModelSet、Pipeline)。

Name Type Description
degree Number

旋轉角度。

Returns:
Type Description
Boolean 變換是否成功,某些圖層不支持此操作時返回false。

inherited setScale(scale){Boolean}

webgl/ov-Layer.js, line 236

設定圖層的縮放量(目前僅支援PhotogrammetryModel、PointCloud、Model、ModelSet、Pipeline)。

Name Type Description
scale Number

縮放比例。

Returns:
Type Description
Boolean 變換是否成功,某些圖層不支持此操作時返回false。

inherited setSelectedEntityHighlightColor(color, opacity)

webgl/ov-Layer.js, line 176

設定圖層圖素的選取高亮顏色。

Name Type Description
color ov.Color

選取高亮的顏色。

opacity Number

不透明度。

setShowUnderGroundCube(enable)

webgl/ov-PipelineLayer.js, line 265

設定是否繪製地下人手孔立方體光柱。

Name Type Description
enable Boolean

是否繪製。

setTooltipAttrName(name)

webgl/ov-PipelineLayer.js, line 66

設定管線Tooltip要直接使用屬性欄位顯示,會取代Tooltip前處理函數。

Name Type Description
name String

Tooltip要使用的屬性欄位名稱。

setTypeFilter(enable, type)

webgl/ov-PipelineLayer.js, line 41

設定圖層管線指定類型篩選狀態。

Name Type Description
enable Boolean

設定這個管線類型的篩選狀態。

type Number

指定的類型代碼。

setUnderGroundCubeTypeColor(type, color, opacity)

webgl/ov-PipelineLayer.js, line 275

設定地下人手孔類型立方體光柱顏色。

Name Type Description
type Number

指定的類型代碼。

color ov.Color optional

顏色。

opacity Number optional

不透明度。

inherited setUseFade(useFade)

webgl/ov-Layer.js, line 262

設定圖層是否開啟淡出功能。

Name Type Description
useFade Boolean

淡出開關。

inherited setZScale(zScale){Boolean}

webgl/ov-Layer.js, line 254

設定圖層的ZScale(ZScale:越小圖層越不會被遮擋)。

Name Type Description
zScale Number

ZScale的值。

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

Type Definitions

getAttrCallback(attr)

webgl/ov-PipelineLayer.js, line 79
Name Type Description
attr String | null

屬性。

See:

getAttrsCallback(attrs)

webgl/ov-PipelineLayer.js, line 111
Name Type Description
attrs Object | null

屬性物件。

See:

getColAndAttrsCallback(attrs)

webgl/ov-PipelineLayer.js, line 97
Name Type Description
attrs Object

屬性物件。

See:

makeProfileCallback(pipelineEntities)

webgl/ov-PipelineLayer.js, line 125
Name Type Description
pipelineEntities Array.<Object>

剖面管線資料。

See:

searchByDistanceCallback(entities)

webgl/ov-PipelineLayer.js, line 172
Name Type Description
entities Object

圖素物件

See:

searchByIncludeCallback(entities)

webgl/ov-PipelineLayer.js, line 155
Name Type Description
entities Object

圖素物件

See:

searchBySQLCallback(entities)

webgl/ov-PipelineLayer.js, line 139
Name Type Description
entities Object

圖素物件。

See: