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
b032a3d1
Commit
b032a3d1
authored
Aug 06, 2024
by
jlc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:指定连接类型案例的添加-静态线
parent
3eb7f950
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
124 additions
and
0 deletions
+124
-0
CodeMap.js
src/examples/CodeMap.js
+6
-0
FunctionMap.js
src/examples/FunctionMap.js
+6
-0
specifyConnectionType-function.js
...e/specifyConnectionType/specifyConnectionType-function.js
+0
-0
specifyConnectionType.vue
...s/visible/specifyConnectionType/specifyConnectionType.vue
+112
-0
No files found.
src/examples/CodeMap.js
View file @
b032a3d1
...
@@ -23,6 +23,9 @@ import vueCodeRocketLaunch from '@/examples/movingTarget/rocketLaunch/rocketLaun
...
@@ -23,6 +23,9 @@ import vueCodeRocketLaunch from '@/examples/movingTarget/rocketLaunch/rocketLaun
import
vueCodeRocketLaunchIntoOrbit
from
'@/examples/movingTarget/rocketLaunchIntoOrbit/rocketLaunchIntoOrbit.vue?raw'
import
vueCodeRocketLaunchIntoOrbit
from
'@/examples/movingTarget/rocketLaunchIntoOrbit/rocketLaunchIntoOrbit.vue?raw'
import
vueCodeGetNodes
from
'@/examples/movingTarget/getNodes/getNodes.vue?raw'
import
vueCodeGetNodes
from
'@/examples/movingTarget/getNodes/getNodes.vue?raw'
// 可见性
import
vueCodeSpecifyConnectionType
from
'@/examples/visible/specifyConnectionType/specifyConnectionType.vue?raw'
// 图元
// 图元
import
vueCodePoint
from
'@/examples/graphicElement/point/point.vue?raw'
import
vueCodePoint
from
'@/examples/graphicElement/point/point.vue?raw'
import
vueCodeLine
from
'@/examples/graphicElement/line/line.vue?raw'
import
vueCodeLine
from
'@/examples/graphicElement/line/line.vue?raw'
...
@@ -91,6 +94,9 @@ const vueCodeMap = {
...
@@ -91,6 +94,9 @@ const vueCodeMap = {
火箭发射卫星入轨
:
vueCodeRocketLaunchIntoOrbit
,
火箭发射卫星入轨
:
vueCodeRocketLaunchIntoOrbit
,
获取模型节点数
:
vueCodeGetNodes
,
获取模型节点数
:
vueCodeGetNodes
,
// 可见性
指定连接类型
:
vueCodeSpecifyConnectionType
,
// 图元
// 图元
点
:
vueCodePoint
,
点
:
vueCodePoint
,
线
:
vueCodeLine
,
线
:
vueCodeLine
,
...
...
src/examples/FunctionMap.js
View file @
b032a3d1
...
@@ -23,6 +23,9 @@ import functionCodeRocketLaunch from '@/examples/movingTarget/rocketLaunch/rocke
...
@@ -23,6 +23,9 @@ import functionCodeRocketLaunch from '@/examples/movingTarget/rocketLaunch/rocke
import
functionCodeRocketLaunchIntoOrbit
from
'@/examples/movingTarget/rocketLaunchIntoOrbit/rocketLaunchIntoOrbit-function.js?raw'
import
functionCodeRocketLaunchIntoOrbit
from
'@/examples/movingTarget/rocketLaunchIntoOrbit/rocketLaunchIntoOrbit-function.js?raw'
import
functionCodeGetNodes
from
'@/examples/movingTarget/getNodes/getNodes-function.js?raw'
import
functionCodeGetNodes
from
'@/examples/movingTarget/getNodes/getNodes-function.js?raw'
// 可见性
import
functionCodeSpecifyConnectionType
from
'@/examples/visible/specifyConnectionType/specifyConnectionType-function.js?raw'
// 图元
// 图元
import
functionCodePoint
from
'@/examples/graphicElement/point/point-function.js?raw'
import
functionCodePoint
from
'@/examples/graphicElement/point/point-function.js?raw'
import
functionCodeLine
from
'@/examples/graphicElement/line/line-function.js?raw'
import
functionCodeLine
from
'@/examples/graphicElement/line/line-function.js?raw'
...
@@ -91,6 +94,9 @@ const functionCodeMap = {
...
@@ -91,6 +94,9 @@ const functionCodeMap = {
火箭发射卫星入轨
:
functionCodeRocketLaunchIntoOrbit
,
火箭发射卫星入轨
:
functionCodeRocketLaunchIntoOrbit
,
获取模型节点数
:
functionCodeGetNodes
,
获取模型节点数
:
functionCodeGetNodes
,
// 可见性
指定连接类型
:
functionCodeSpecifyConnectionType
,
// 图元
// 图元
点
:
functionCodePoint
,
点
:
functionCodePoint
,
线
:
functionCodeLine
,
线
:
functionCodeLine
,
...
...
src/examples/visible/specifyConnectionType/specifyConnectionType-function.js
0 → 100644
View file @
b032a3d1
This diff is collapsed.
Click to expand it.
src/examples/visible/specifyConnectionType/specifyConnectionType.vue
0 → 100644
View file @
b032a3d1
<
template
>
<div
id=
"cesiumContainer"
class=
"cesium-container"
></div>
<div>
<button
class=
"btn-class"
@
click=
"createConnections"
>
静态线
</button>
</div>
</
template
>
<
script
setup
>
import
{
onMounted
}
from
'vue'
;
import
{
SpecifyConnectionType
,
Station
}
from
'./function.js'
;
let
viewer
;
let
stationOne
;
let
stationTwo
;
let
stationThree
;
let
satellite
;
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
,
shouldAnimate
:
true
});
let
siteInfoOne
=
{
id
:
'site1'
,
position
:
[
20
,
20
,
250
],
ellipsoid
:
{
radii
:
[
500000
,
500000
,
500000
],
innerRadii
:
[
1
,
1
,
1
],
minimumClock
:
45
,
maximumClock
:
90
,
minimumCone
:
45
,
maximumCone
:
75
,
outline
:
false
,
fill
:
true
,
},
label
:
{
text
:
''
},
};
let
siteInfoTwo
=
{
id
:
'site2'
,
position
:
[
120
,
-
10
,
250
],
ellipsoid
:
{
radii
:
[
500000
,
500000
,
500000
],
innerRadii
:
[
1
,
1
,
1
],
minimumClock
:
45
,
maximumClock
:
90
,
minimumCone
:
45
,
maximumCone
:
75
,
outline
:
false
,
fill
:
true
,
},
label
:
{
text
:
''
},
};
let
siteInfoThree
=
{
id
:
'site3'
,
position
:
[
-
70
,
10
,
250
],
ellipsoid
:
{
radii
:
[
500000
,
500000
,
500000
],
innerRadii
:
[
1
,
1
,
1
],
minimumClock
:
45
,
maximumClock
:
90
,
minimumCone
:
45
,
maximumCone
:
75
,
outline
:
false
,
fill
:
true
,
},
label
:
{
text
:
''
},
};
// 地面测站实例
stationOne
=
new
Station
(
viewer
,
siteInfoOne
.
id
,
siteInfoOne
);
stationTwo
=
new
Station
(
viewer
,
siteInfoTwo
.
id
,
siteInfoTwo
);
stationThree
=
new
Station
(
viewer
,
siteInfoThree
.
id
,
siteInfoThree
);
// 轨道卫星实例
satellite
=
new
SpecifyConnectionType
(
viewer
,
stationOne
,
stationTwo
,
stationThree
);
};
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
);
});
function
createConnections
()
{
satellite
.
toggleStaticLines
();
}
</
script
>
<
style
>
.cesium-container
{
width
:
100%
;
height
:
100vh
;
}
.btn-class
{
position
:
absolute
;
top
:
10px
;
left
:
10px
;
}
</
style
>
\ No newline at end of file
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