您好,设置对象颜色:
插件客户端方法是:layer3D.setObjectsColor。
function setcolor(){
初始化一组对象列表 var a= new Array("201","152","155","156");
var b= new Array("151","17","203","70");
var c= new Array("117","116","144","120");
初始化颜色实例 colors1 = new SuperMap.Web.Core.Color(0,255,0,150);
colors2 = new SuperMap.Web.Core.Color(255,0,0,30);
colors3 = new SuperMap.Web.Core.Color(0,0,255,255);
获取指定的三维图层 var layer=scene.get_layer3Ds().get_item("Building@OlympicGreen");
设置三维图层中一组对象的颜色 layer.setObjectsColor(a,colors1); layer.setObjectsColor(b,colors2); layer.setObjectsColor(c,colors3);}
WebGL客户端:
S3MTilesLayer.setObjsColor方法:
Example:
var color = new Cesium.Color(1.0, 0.0, 0.0, 1.0);
var ids = [12, 22, 65, 98];
S3MTilesLayer.setObjsColor(ids, color);