常见的拉模工具
- 调用
-
let rule1 = {
-
name: "BLDG_USAGE",
-
value: "工业"
-
};
-
let rule2 = {
-
name: "BLDG_USAGE",
-
value: "商服"
-
};
-
let symbol = cw5.symbolCreator.createPolygonSymbol_3D("#ff1a52", 45, 0.8)
-
switch (type) {
-
case "shp":
-
cw5.filmModelUtils.fromFC("buildingshp", rule1);
-
break;
-
case "shp2":
-
cw5.filmModelUtils.fromFC("buildingshp", rule2, null, null, symbol);
-
break;
-
case "model":
-
cw5.filmModelUtils.fromFC("buildingbuilding");
-
break;
-
}
- filmModelUtils
```javascript
import {cw5} from "../loadMap/loadMap";
export const filmModelUtils = {};
/**
- * 功能: 建筑物拉膜
- * 参数:
- handle 查询图层名称
- rule 查询条件 name:字段名称 value:对应值
- tol 分辨率 不能小于0.1
- color 颜色
- alpha 透明度
*
*/
filmModelUtils.fromFC= function (handle, rule, layerName, tol, symbol ) {
try{
let features=cw5.queryUtils.queryByField(handle,rule).features;
let innerLayerName=layerName||"filmModelUtils"
let __g = cw5.__g;
更多参考 https://xiaozhuanlan.com/topic/1326405789