Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JINRUN-DP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xinzhedeai
JINRUN-DP
Commits
8a1ca47b
Commit
8a1ca47b
authored
Nov 17, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:相机仰视角调整
parent
4581e2b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
32 deletions
+2
-32
index.vue
src/views/index.vue
+2
-32
No files found.
src/views/index.vue
View file @
8a1ca47b
...
@@ -92,9 +92,6 @@ export default {
...
@@ -92,9 +92,6 @@ export default {
// 隐藏Cesium logo
// 隐藏Cesium logo
this
.
viewer
.
_cesiumWidget
.
_creditContainer
.
style
.
display
=
"
none
"
;
this
.
viewer
.
_cesiumWidget
.
_creditContainer
.
style
.
display
=
"
none
"
;
// var tilesetpath =
// "http://localhost:8080/Apps/assets/media/rushanruibo/tileset.json";
const
VUE_APP_GIS
=
const
VUE_APP_GIS
=
"
http://192.168.2.11:8080/Apps/assets/media/gaoquyingji
"
;
"
http://192.168.2.11:8080/Apps/assets/media/gaoquyingji
"
;
try
{
try
{
...
@@ -103,29 +100,12 @@ export default {
...
@@ -103,29 +100,12 @@ export default {
);
);
this
.
viewer
.
scene
.
primitives
.
add
(
tileset
);
this
.
viewer
.
scene
.
primitives
.
add
(
tileset
);
console
.
log
(
"
倾斜摄影模型加载成功
"
,
tileset
);
console
.
log
(
"
倾斜摄影模型加载成功
tileset
"
,
tileset
);
if
(
tileset
)
{
if
(
tileset
)
{
this
.
tileset
=
tileset
;
this
.
tileset
=
tileset
;
this
.
locateToTileset
();
this
.
locateToTileset
();
}
}
// tileset.allTilesLoaded.addEventListener(() => {
// this.tileset = tileset;
// console.log("All tiles are loaded");
// this.locateToTileset();
// });
// // // 监听模型加载完成事件
// tileset.readyPromise
// .then(() => {
// this.locateToTileset();
// })
// .catch((error) => {
// console.error("定位到模型失败:", error);
// });
console
.
log
(
"
tileset
"
,
this
.
tileset
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
`加载倾斜摄影模型失败:
${
error
}
`
);
console
.
error
(
`加载倾斜摄影模型失败:
${
error
}
`
);
}
}
...
@@ -180,7 +160,7 @@ export default {
...
@@ -180,7 +160,7 @@ export default {
// 计算相机看向模型中心的方向
// 计算相机看向模型中心的方向
const
heading
=
Cesium
.
Math
.
toRadians
(
0
);
// 方向角
const
heading
=
Cesium
.
Math
.
toRadians
(
0
);
// 方向角
const
pitch
=
Cesium
.
Math
.
toRadians
(
-
6
0
);
// 俯仰角 - 负数表示向下看
const
pitch
=
Cesium
.
Math
.
toRadians
(
-
9
0
);
// 俯仰角 - 负数表示向下看
const
roll
=
Cesium
.
Math
.
toRadians
(
0
);
// 翻滚角
const
roll
=
Cesium
.
Math
.
toRadians
(
0
);
// 翻滚角
// 使用flyTo方法平滑过渡到目标位置
// 使用flyTo方法平滑过渡到目标位置
...
@@ -196,16 +176,6 @@ export default {
...
@@ -196,16 +176,6 @@ export default {
console
.
log
(
"
相机已成功定位到模型上方
"
);
console
.
log
(
"
相机已成功定位到模型上方
"
);
},
},
});
});
// 或者使用lookAt方法直接看向模型中心
// this.viewer.camera.lookAt(
// center,
// new Cesium.HeadingPitchRange(
// heading,
// pitch,
// distance
// )
// );
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
"
定位到模型上方失败:
"
,
error
);
console
.
error
(
"
定位到模型上方失败:
"
,
error
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment