Merge branch 'master' of http://10.0.41.100:3000/lishenfeng/tsg-web
commit
4e4c1d90c7
|
|
@ -237,7 +237,7 @@ export default class Map3D extends BaseMap {
|
|||
this.layerMgr = new LayerMgr3D(viewer);
|
||||
this.demo = new Demo3D()
|
||||
|
||||
// this.demo.getQxsy(viewer) //倾斜摄影
|
||||
this.demo.getQxsy(viewer) //倾斜摄影
|
||||
this.demo.getDem(viewer) //地形图
|
||||
this.demo.getWxyx(viewer) //卫星影像
|
||||
// this.demo.getGltf(viewer) //模型
|
||||
|
|
|
|||
|
|
@ -93,9 +93,10 @@ export default class LayerMgr {
|
|||
async getQxsy(viewer) {
|
||||
try {
|
||||
let tileset = await Cesium.Cesium3DTileset.fromUrl(
|
||||
'http://res3d.oss-cn-shenzhen.aliyuncs.com/macheng/xiaoyutan/Scene/3DTILE.json',
|
||||
// 'http://res3d.oss-cn-shenzhen.aliyuncs.com/macheng/xiaoyutan/Scene/3DTILE.json',
|
||||
'https://map1.oss-cn-shenzhen.aliyuncs.com/tsg/tiles/tileset.json',
|
||||
{
|
||||
maximumScreenSpaceError: 1, //精细程度越小越精细
|
||||
maximumScreenSpaceError: 20, //精细程度越小越精细
|
||||
maximumMemoryUsage: 1000, //不可设置太高,目标机子空闲内存值以内,防止浏览器过于卡
|
||||
}
|
||||
|
||||
|
|
@ -103,14 +104,14 @@ export default class LayerMgr {
|
|||
viewer.scene.primitives.add(tileset);
|
||||
|
||||
|
||||
const offsetHeight = 15
|
||||
const offsetHeight = 10
|
||||
const boundingSphere = tileset.boundingSphere
|
||||
const cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center)
|
||||
const surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0)
|
||||
const offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, offsetHeight)
|
||||
const translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3())
|
||||
tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation)
|
||||
viewer.flyTo(tileset)
|
||||
// viewer.flyTo(tileset)
|
||||
} catch (error) {
|
||||
console.error(`Error creating tileset: ${error}`);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,6 @@ export default function Page({isHome}) {
|
|||
{
|
||||
syList.map((item)=>
|
||||
<div className={'gcaqjc_bzt_sy_'+item.stationCode} onClick={()=>{
|
||||
debugger
|
||||
setOpenSy(true)
|
||||
setModalData(item)
|
||||
}}>
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@
|
|||
font-size: 10px;
|
||||
color: #00c188;
|
||||
cursor: pointer;
|
||||
left: 0;
|
||||
top: 0;
|
||||
left: -10000px;
|
||||
top: -10000px;
|
||||
span{
|
||||
transform: scaleX(0.8);
|
||||
letter-spacing: -0.8px;
|
||||
|
|
@ -113,8 +113,8 @@
|
|||
font-size: 10px;
|
||||
color: #00c188;
|
||||
cursor: pointer;
|
||||
left: 0;
|
||||
top: 0;
|
||||
left: -10000px;
|
||||
top: -10000px;
|
||||
span{
|
||||
transform: scaleX(0.8);
|
||||
letter-spacing: -0.8px;
|
||||
|
|
@ -138,8 +138,8 @@
|
|||
font-size: 10px;
|
||||
color: #00c188;
|
||||
cursor: pointer;
|
||||
left: 0;
|
||||
top: 0;
|
||||
left: -10000px;
|
||||
top: -10000px;
|
||||
span{
|
||||
transform: scaleX(0.8);
|
||||
letter-spacing: -0.8px;
|
||||
|
|
@ -163,8 +163,8 @@
|
|||
color: #00c188;
|
||||
font-size: 10px;
|
||||
cursor: pointer;
|
||||
left: 0;
|
||||
top: 0;
|
||||
left: -10000px;
|
||||
top: -10000px;
|
||||
}
|
||||
|
||||
//ZB0+130
|
||||
|
|
|
|||
Loading…
Reference in New Issue