基本信息
以下是所在類或對象的基本信息。
類:
esri/views/layers/BuildingComponentSublayerView
繼承: BuildingComponentSublayerView > Accessor
自從:用於 JavaScript 4.17 的 ArcGIS API
用法說明
表示 BuildingComponentSublayer 的子層視圖。子圖層視圖可用於查詢視圖中加載的要素。子層視圖可以通過 BuildingSceneLayerView 上的 sublayerViews 屬性訪問:
// query all sublayers for features that satisfy the sql expression
let query = new Query();
query.where = "FamilyType = 'Landscape'";
view.whenLayerView(buildingSceneLayer).then(function(bslv) {
bslv.sublayerViews.forEach(function(componentSublayerView) {
componentSublayerView.queryFeatures(query).then(function(result) {
console.log(result.features);
});
});
});
BuildingComponentSublayerView 上的查詢是針對已為當前視圖加載的函數執行的。這意味著一旦圖層完成更新,就保證隻有可見的特征可用。當意圖在整個數據集中進行查詢或搜索時,不應使用BuildingComponentSublayerView 上的查詢方法,而應使用BuildingComponentSublayer 上的查詢方法。
可以在特定的子圖層視圖上調用突出顯示方法:
view.whenLayerView(buildingSceneLayer).then(function(bslv) {
// get the sublayer view of the component sublayer with id 1
const sublayerView = bslv.sublayerViews.find(function(sublayerView) {
return sublayerView.sublayer.id === 1;
});
const query = sublayerView.createQuery();
query.spatialRelationship = "contains";
query.geometry = polygonGeometry;
// query sublayer view
sublayerView.queryObjectIds(query).then(function(result) {
sublayerView.highlight(result);
});
});
相關用法
- JavaScript ArcGIS BuildingComponentSublayer.renderer用法及代碼示例
- JavaScript ArcGIS BuildingComponentSublayer.when用法及代碼示例
- JavaScript ArcGIS BuildingComponentSublayer.modelName用法及代碼示例
- JavaScript ArcGIS BuildingFilter用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayer.url用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayer用法及代碼示例
- JavaScript ArcGIS BuildingSublayer.modelName用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayer.minScale用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayer.loadAll用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayer.maxScale用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayer.summaryStatistics用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayer.filters用法及代碼示例
- JavaScript ArcGIS BuildingExplorer.classes用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayer.apiKey用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayerView.sublayerViews用法及代碼示例
- JavaScript ArcGIS BuildingExplorer.container用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayerView.highlight用法及代碼示例
- JavaScript ArcGIS BuildingExplorer.visibleElements用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayerView.when用法及代碼示例
- JavaScript ArcGIS BuildingExplorer.on用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayer.on用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayer.when用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayer.outFields用法及代碼示例
- JavaScript ArcGIS BuildingExplorer.headingLevel用法及代碼示例
- JavaScript ArcGIS BuildingSceneLayer layerview-create-error事件用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 BuildingComponentSublayerView。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。