new ov.VectorLayer()
向量圖層
Extends
Members
-
boundary
-
Boundary
Properties:
Name Type Description Boundary
GeoBoundary 圖層邊界。
-
readonlyname
-
圖層名稱
Properties:
Name Type Description name
String 名稱。
-
show
-
圖層顯示
Properties:
Name Type Description show
Boolean 是否顯示圖層。
Methods
-
changeMouseClickClusterEntity(clickFunction){Boolean}
webgl/ov-VectorLayer.js, line 119 -
更換點擊到群集圖素觸發的事件。
Name Type Description clickFunction
ov.VectorLayer~changeMouseClickClusterEntityCallback 更換的事件。
Returns:
Type Description Boolean 是否成功。 -
changeMouseClickPointEntity(clickFunction){Boolean}
webgl/ov-VectorLayer.js, line 134 -
更換點擊到點圖素觸發的事件。
Name Type Description clickFunction
ov.VectorLayer~changeMouseClickPointEntityCallback 更換的事件。
Returns:
Type Description Boolean 是否成功。 -
changeToDefaultImage()
webgl/ov-VectorLayer.js, line 155 -
還原成預設群集顯示的Icon圖片。
-
changeUserDefineImage(url)
webgl/ov-VectorLayer.js, line 148 -
更換群集顯示的Icon圖片。
Name Type Description url
String Icon圖片的網址。
-
inherited enableOrderIndependentTransparency(enable)
webgl/ov-Layer.js, line 217 -
透明度是否使用OIT演算法,正確性較高但效能會降低。
Name Type Description enable
Boolean 啟用OIT透明。
-
getAttrs(id, type, callback)
webgl/ov-VectorLayer.js, line 17 -
取得指定圖素的所有屬性值。
Name Type Description id
Number 指定圖素的ID。
type
ov.ENUM_VECTOR_ENTITY_TYPE 指定圖素的Type。
callback
ov.VectorLayer~getAttrsCallback 非同步取得屬性後的回呼。
-
getFieldDefine(type, callback)
webgl/ov-VectorLayer.js, line 46 -
取得指定類別的欄位名稱。
Name Type Description type
ov.ENUM_VECTOR_ENTITY_TYPE 指定的類別。
callback
ov.VectorLayer~getFieldDefineCallback 非同步取得欄位名稱資訊後的回呼。
-
getGeo(id, type, callback)
webgl/ov-VectorLayer.js, line 32 -
取得指定圖素的幾何資訊。
Name Type Description id
Number 指定圖素的ID。
type
ov.ENUM_VECTOR_ENTITY_TYPE 指定圖素的Type。
callback
ov.VectorLayer~getGeoCallback 非同步取得幾何資訊後的回呼。
-
inherited goto(callback)
webgl/ov-Layer.js, line 225 -
飛到圖層的位置。
Name Type Description callback
ov.Layer~gotoCallback 移動完成後執行的回呼。
-
gotoEntity(id, type)
webgl/ov-VectorLayer.js, line 110 -
飛行至指定圖素。
Name Type Description id
Number 指定圖素的ID。
type
ov.ENUM_VECTOR_ENTITY_TYPE 指定圖素的類型。
-
searchByDistance(epsg, geo, distance, type, sql, callback)
webgl/ov-VectorLayer.js, line 96 -
查詢在指定幾何範圍以內的圖素,並以SQL篩選。
Name Type Description epsg
Number 幾何的EPSG。
geo
GeoPolygon 指定幾何。
distance
Number 指定距離,單位公尺。
type
ov.ENUM_VECTOR_ENTITY_TYPE 查詢圖素的類型。
sql
String SQL篩選條件。
callback
ov.VectorLayer~searchByDistanceCallback 非同步查詢的回呼。
-
searchByInclude(epsg, geo, type, sql, callback)
webgl/ov-VectorLayer.js, line 78 -
查詢被指定幾何包圍的圖素,並以SQL篩選。
Name Type Description epsg
Number 幾何的EPSG。
geo
GeoPolygon 指定幾何。
type
ov.ENUM_VECTOR_ENTITY_TYPE 查詢圖素的類型。
sql
String SQL篩選條件。
callback
ov.VectorLayer~searchByIncludeCallback 非同步查詢的回呼。
-
searchBySQL(sql, type, callback)
webgl/ov-VectorLayer.js, line 61 -
以SQL條件查詢圖層中的圖素。
Name Type Description sql
String SQL查詢條件。
type
ov.ENUM_VECTOR_ENTITY_TYPE 查詢的圖素類型。
callback
ov.VectorLayer~searchBySQLCallback 非同步查詢的回呼。
-
inherited setAllowHoverEntity(allow)
webgl/ov-Layer.js, line 136 -
設定圖層的圖素是否能Hover。
Name Type Description allow
Boolean 是否能Hover。
-
inherited setAllowSelectEntity(allow)
webgl/ov-Layer.js, line 144 -
設定圖層的圖素是否能被選取。
Name Type Description allow
Boolean 是否能被點選。
-
inherited setDrawSelectedEntityOutline(isDraw)
webgl/ov-Layer.js, line 103 -
設定圖層的圖素是否顯示outline。
Name Type Description isDraw
Boolean 是否顯示。
-
inherited setFadeNearFar(near, far){Boolean}
webgl/ov-Layer.js, line 209 -
設定圖層開始淡出與完全消失的距離。
Name Type Description near
Number 開始淡出的距離。
far
Number 完全消失的距離。
Returns:
Type Description Boolean 設定是否成功,當near > far時,會失敗。 -
inherited setHoverEntityHighlightColor(color)
webgl/ov-Layer.js, line 128 -
設定圖層圖素的Hover高亮顏色。
Name Type Description color
HexColor Hover高亮的顏色。
-
inherited setOffset(x, y, z){Boolean}
webgl/ov-Layer.js, line 155 -
設定圖層的公尺平移量(目前僅支援Acute3D、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 61 -
設定此圖層圖素被點擊時的回呼。
Name Type Description callback
ov.Layer~setOnClickEntityCallback 圖素被點擊時的回呼。
-
inherited setOpacity(opacity)
webgl/ov-Layer.js, line 95 -
設置圖層不透明程度。
Name Type Description opacity
Number 圖層不透明程度(0~1)。
-
inherited setOutlineColor(VisibleColor, HiddenColor)
webgl/ov-Layer.js, line 112 -
設定選取圖層圖素的Outline顏色。
Name Type Description VisibleColor
HexColor outline可視的顏色。
HiddenColor
HexColor outline不可視的顏色。
-
inherited setResolutionScale(resolutionScale){Boolean}
webgl/ov-Layer.js, line 182 -
設定圖層解析度條件的Scale比例。
Name Type Description resolutionScale
Number 解析度條件的Scale比例(初始值1,越大越容易分裂,模型越細緻)。
Returns:
Type Description Boolean 是否設定成功。 -
inherited setRotate(degree){Boolean}
webgl/ov-Layer.js, line 164 -
設定圖層的旋轉量(目前僅支援Acute3D、PointCloud、Model、ModelSet、Pipeline)。
Name Type Description degree
Number 旋轉角度。
Returns:
Type Description Boolean 變換是否成功,某些圖層不支持此操作時返回false。 -
inherited setScale(scale){Boolean}
webgl/ov-Layer.js, line 173 -
設定圖層的縮放量(目前僅支援Acute3D、PointCloud、Model、ModelSet、Pipeline)。
Name Type Description scale
Number 縮放比例。
Returns:
Type Description Boolean 變換是否成功,某些圖層不支持此操作時返回false。 -
inherited setSelectedEntityHighlightColor(color)
webgl/ov-Layer.js, line 120 -
設定圖層圖素的選取高亮顏色。
Name Type Description color
HexColor 選取高亮的顏色。
-
inherited setUseFade(useFade)
webgl/ov-Layer.js, line 199 -
設定圖層是否開啟淡出功能。
Name Type Description useFade
Boolean 淡出開關。
-
inherited setZScale(zScale){Boolean}
webgl/ov-Layer.js, line 191 -
設定圖層的ZScale(ZScale:越小圖層越不會被遮擋)。
Name Type Description zScale
Number ZScale的值。
Returns:
Type Description Boolean 是否設定成功。 -
showName(show)
webgl/ov-VectorLayer.js, line 163 -
設定是否顯示點圖素名稱。
Name Type Description show
Boolean 是否顯示點圖素名稱。
Type Definitions
-
changeMouseClickClusterEntityCallback(id, type)
webgl/ov-VectorLayer.js, line 122 -
Name Type Description id
Number 點擊到的群集圖素ID。
type
ov.ENUM_VECTOR_ENTITY_TYPE 點擊到的群集圖素類型。
-
changeMouseClickPointEntityCallback(id, type)
webgl/ov-VectorLayer.js, line 137 -
Name Type Description id
Number 點擊到的點圖素ID。
type
ov.ENUM_VECTOR_ENTITY_TYPE 點擊到的點圖素類型。
-
getAttrsCallback(attrs)
webgl/ov-VectorLayer.js, line 20 -
Name Type Description attrs
Object | null 結果物件。
- See:
-
getFieldDefineCallback(attrs)
webgl/ov-VectorLayer.js, line 49 -
Name Type Description attrs
Object | null 結果物件。
- See:
-
getGeoCallback(attrs)
webgl/ov-VectorLayer.js, line 35 -
Name Type Description attrs
Object | null 結果物件。
- See:
-
searchByDistanceCallback(attrs)
webgl/ov-VectorLayer.js, line 99 -
Name Type Description attrs
Object | null 結果物件。
- See:
-
searchByIncludeCallback(attrs)
webgl/ov-VectorLayer.js, line 81 -
Name Type Description attrs
Object | null 結果物件。
- See:
-
searchBySQLCallback(attrs)
webgl/ov-VectorLayer.js, line 64 -
Name Type Description attrs
Object | null 結果物件。
- See: