撒点设置:
const markers = uploadData.features.filter(f=>f.geometry.coordinates?.[0] && f.geometry.coordinates?.[1]).map((f,i) => { return { id: "测试" + "_point_" + i, position:new SuperMap3D.Cartesian3.fromDegrees(Number(f.geometry.coordinates[0]), Number(f.geometry.coordinates[1])), point:{ pixelSize: 15, color:new SuperMap3D.Color.fromCssColorString(rgba(255,0,0)), }, label:{ text: "test", font: "normal 17px MicroSoft YaHei", fillColor:new SuperMap3D.Color.fromCssColorString(rgb(255,255,255)), disableDepthTestDistance: Number.POSITIVE_INFINITY, pixelOffset:new SuperMap3D.Cartesian3(0.0,25, 0.0), showBackground:true, backgroundColor:new SuperMap3D.Color.fromCssColorString("rgba(0,0,0,0.7)"), } } });
撒点:
for (let i = 0; i < markers.length; i++) { let dataConfig = entities[i]; let _entity = new SuperMap3D.Entity({...dataConfig,name:"测试"}); viewer.entities.add(_entity); }
切换二三维:
viewer.scene.mode = SuperMap3D.SceneMode.SCENE2D; viewer.scene.mode = SuperMap3D.SceneMode.SCENE3D;
您下载这个链接里的11.2.1的最新版本supermap-iclient3d-for-webgl_webgpu-11.2.1-241113-43764,测试这个版本是正常的
链接地址https://pan.baidu.com/s/1uiIbRUhybeHROs5B5igmqw?pwd=u4up