使用的是SuperMap iClient3D 11i(2023) for WebGL/WebGPU版本
是自行写的代码,使用的是viewer.scene.mode = SuperMap3D.SceneMode.SCENE2D;
https://www.supermapol.com/webgl/examples/webgl/editor.html#sceneModeSwitching官网示例二三维转换只有2.5d和3d
所以不太清楚转2d后还要额外设置什么吗?
现在的情况是:使用了viewer.scene.screenSpaceCameraController.zoomFactor = 0.1之后,缩放正常,滚轮滑动带着平移的效果,放大到一定程度就无法继续放大了
撒点设置:
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