Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cesium-frame
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
jlc
cesium-frame
Commits
2770a838
Commit
2770a838
authored
Aug 05, 2024
by
lyc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新了刻度盘
parent
be9b10a4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
4 deletions
+89
-4
CodeMap.js
src/examples/CodeMap.js
+3
-1
FunctionMap.js
src/examples/FunctionMap.js
+3
-1
scale.js
src/examples/sceneSet/scale/scale.js
+30
-0
scale.vue
src/examples/sceneSet/scale/scale.vue
+47
-0
ElementMap.js
src/views/ElementMap.js
+6
-2
No files found.
src/examples/CodeMap.js
View file @
2770a838
...
...
@@ -41,6 +41,7 @@ import vueCodeRectangularSpaceGrid from '@/examples/sceneSet/rectangularSpaceGri
import
vueCodeEarthCoordinate
from
'@/examples/sceneSet/earthCoordinate/earthCoordinate.vue?raw'
import
vueCodeSkyBox
from
'@/examples/sceneSet/skyBox/skyBox.vue?raw'
import
vueCodeMapx
from
'@/examples/sceneSet/mapx/mapx.vue?raw'
import
vueCodeScale
from
'@/examples/sceneSet/scale/scale.vue?raw'
// 相机
import
vueCodeViewTrack
from
'@/examples/camera/viewTrack/viewTrack.vue?raw'
...
...
@@ -99,12 +100,13 @@ const vueCodeMap = {
场景信息
:
vueCodeSceneInfo
,
场景截图
:
vueCodeSceneScreenshot
,
经纬网络
2
D
:
vueCodeJingweiNetwork2D
,
刻度
盘
:
vueCodeDial
,
时间
盘
:
vueCodeDial
,
圆形空间网格
:
vueCodeCircularSpaceGrid
,
矩形空间网格
:
vueCodeRectangularSpaceGrid
,
地球坐标系
:
vueCodeEarthCoordinate
,
天空盒
:
vueCodeSkyBox
,
鹰眼图
:
vueCodeMapx
,
刻度盘
:
vueCodeScale
,
// 相机
相机缩放
:
vueCodeCameraZoom
,
...
...
src/examples/FunctionMap.js
View file @
2770a838
...
...
@@ -41,6 +41,7 @@ import functionCodeRectangularSpaceGrid from '@/examples/sceneSet/rectangularSpa
import
functionCodeEarthCoordinate
from
'@/examples/sceneSet/earthCoordinate/earthCoordinate-function.js?raw'
import
functionCodeSkyBox
from
'@/examples/sceneSet/skyBox/skyBox-function.js?raw'
import
functionCodeMapx
from
'@/examples/sceneSet/mapx/mapx-function.js?raw'
import
functionCodeScale
from
'@/examples/sceneSet/scale/scale.js?raw'
// 相机
import
functionCodeViewTrack
from
'@/examples/camera/viewTrack/viewTrack-function.js?raw'
...
...
@@ -99,12 +100,13 @@ const functionCodeMap = {
场景信息
:
functionCodeSceneInfo
,
场景截图
:
functionCodeSceneScreenshot
,
经纬网络
2
D
:
functionCodeJingweiNetwork2D
,
刻度
盘
:
functionCodeDial
,
时间
盘
:
functionCodeDial
,
圆形空间网格
:
functionCodeCircularSpaceGrid
,
矩形空间网格
:
functionCodeRectangularSpaceGrid
,
地球坐标系
:
functionCodeEarthCoordinate
,
天空盒
:
functionCodeSkyBox
,
鹰眼图
:
functionCodeMapx
,
刻度盘
:
functionCodeScale
,
// 相机
跟踪视角
:
functionCodeViewTrack
,
...
...
src/examples/sceneSet/scale/scale.js
0 → 100644
View file @
2770a838
export
function
change
(
viewer
,
divisionCount
)
{
for
(
let
i
=
0
;
i
<
divisionCount
;
i
++
)
{
const
angle
=
(
360
/
divisionCount
)
*
i
;
const
startLongitude
=
angle
-
180
;
const
endLongitude
=
startLongitude
+
10
;
viewer
.
entities
.
add
({
polyline
:
{
positions
:
Cesium
.
Cartesian3
.
fromDegreesArrayHeights
([
startLongitude
,
0
,
100000
,
endLongitude
,
0
,
100000
]),
width
:
2
,
material
:
Cesium
.
Color
.
PINK
,
}
});
viewer
.
entities
.
add
({
position
:
Cesium
.
Cartesian3
.
fromDegrees
(
startLongitude
+
5
,
0
,
0
),
label
:
{
text
:
`
${
startLongitude
}
°`
,
font
:
'16px Helvetica'
,
fillColor
:
Cesium
.
Color
.
WHITE
,
pixelOffset
:
new
Cesium
.
Cartesian2
(
0
,
-
10
),
scale
:
0.5
,
}
});
}
}
src/examples/sceneSet/scale/scale.vue
0 → 100644
View file @
2770a838
<
template
>
<div
id=
"cesiumContainer"
class=
"cesium-container"
></div>
</
template
>
<
script
setup
>
import
{
onMounted
}
from
'vue'
;
import
{
change
}
from
'./function'
;
let
viewer
;
onMounted
(()
=>
{
const
script
=
document
.
createElement
(
'script'
);
script
.
src
=
'https://cesium.com/downloads/cesiumjs/releases/1.99/Build/Cesium/Cesium.js'
;
script
.
onload
=
()
=>
{
window
.
Cesium
.
Ion
.
defaultAccessToken
=
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3Njg4ZWU5Yi1iZDhiLTRhYmUtOTRiYS04YjM5NmUwNjVmMDMiLCJpZCI6MjI3MzQ3LCJpYXQiOjE3MjA1MjA4Mjh9.E5XW4LnwgfVAaBC-znaYr61m4yK0-j2qEQhi9qwFFPE'
viewer
=
new
window
.
Cesium
.
Viewer
(
'cesiumContainer'
,
{
infoBox
:
false
,
});
viewer
.
camera
.
changed
.
addEventListener
(()
=>
{
let
alt
=
(
viewer
.
camera
.
positionCartographic
.
height
/
1000
).
toFixed
(
2
);
let
divisionCount
=
alt
>
8000
?
36
:
360
;
viewer
.
entities
.
removeAll
();
change
(
viewer
,
divisionCount
)
})
};
document
.
head
.
appendChild
(
script
);
const
link
=
document
.
createElement
(
'link'
);
link
.
rel
=
'stylesheet'
;
link
.
href
=
'https://cesium.com/downloads/cesiumjs/releases/1.119/Build/Cesium/Widgets/widgets.css'
;
document
.
head
.
appendChild
(
link
);
});
</
script
>
<
style
>
.cesium-container
{
width
:
100%
;
height
:
100vh
;
}
</
style
>
\ No newline at end of file
src/views/ElementMap.js
View file @
2770a838
...
...
@@ -128,8 +128,8 @@ export const elementSceneSetMap = {
title
:
'经纬网络2D'
,
pngUrl
:
'/src/assets/JingweiNetwork2D.png'
},
刻度
盘
:
{
title
:
'
刻度
盘'
,
时间
盘
:
{
title
:
'
时间
盘'
,
pngUrl
:
'/src/assets/Dial.png'
},
圆形空间网格
:
{
...
...
@@ -151,6 +151,10 @@ export const elementSceneSetMap = {
鹰眼图
:
{
title
:
'鹰眼图'
,
pngUrl
:
'/src/assets/Mapx.png'
},
刻度盘
:
{
title
:
'刻度盘'
,
pngUrl
:
'/src/assets/Mapx.png'
}
}
...
...
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