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
61999aec
Commit
61999aec
authored
Jul 24, 2024
by
jlc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:线案例的添加
parent
3a5d5a93
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
5 deletions
+53
-5
Line.png
src/assets/Line.png
+0
-0
CodeMap.js
src/examples/CodeMap.js
+3
-1
FunctionMap.js
src/examples/FunctionMap.js
+3
-1
line-function.js
src/examples/line-function.js
+26
-0
line.vue
src/examples/line.vue
+18
-0
ElementMap.js
src/views/ElementMap.js
+3
-3
No files found.
src/assets/Line.png
0 → 100644
View file @
61999aec
889 KB
src/examples/CodeMap.js
View file @
61999aec
import
vueCodePoint
from
'@/examples/point.vue?raw'
import
vueCodePoint
from
'@/examples/point.vue?raw'
import
vueCodeLine
from
'@/examples/line.vue?raw'
import
vueCodeMultiLine
from
'@/examples/multiLine.vue?raw'
import
vueCodeMultiLine
from
'@/examples/multiLine.vue?raw'
import
vueCodePlane
from
'@/examples/plane.vue?raw'
import
vueCodePlane
from
'@/examples/plane.vue?raw'
...
@@ -9,7 +10,8 @@ import vueCodeWaterSurface from '@/examples/waterSurface.vue?raw'
...
@@ -9,7 +10,8 @@ import vueCodeWaterSurface from '@/examples/waterSurface.vue?raw'
const
vueCodeMap
=
{
const
vueCodeMap
=
{
点
:
vueCodePoint
,
点
:
vueCodePoint
,
多线
:
vueCodeMultiLine
,
线
:
vueCodeLine
,
多颜色线
:
vueCodeMultiLine
,
多面
:
vueCodePlane
,
多面
:
vueCodePlane
,
雨
:
vueCodeRain
,
雨
:
vueCodeRain
,
...
...
src/examples/FunctionMap.js
View file @
61999aec
import
functionCodePoint
from
'@/examples/point-function.js?raw'
import
functionCodePoint
from
'@/examples/point-function.js?raw'
import
functionCodeLine
from
'@/examples/line-function.js?raw'
import
functionCodeMultiLine
from
'@/examples/multiLine-function.js?raw'
import
functionCodeMultiLine
from
'@/examples/multiLine-function.js?raw'
import
functionCodePlane
from
'@/examples/plane-function.js?raw'
import
functionCodePlane
from
'@/examples/plane-function.js?raw'
...
@@ -9,7 +10,8 @@ import functionCodeWaterSurface from '@/examples/waterSurface-function.js?raw'
...
@@ -9,7 +10,8 @@ import functionCodeWaterSurface from '@/examples/waterSurface-function.js?raw'
const
functionCodeMap
=
{
const
functionCodeMap
=
{
点
:
functionCodePoint
,
点
:
functionCodePoint
,
多线
:
functionCodeMultiLine
,
线
:
functionCodeLine
,
多颜色线
:
functionCodeMultiLine
,
多面
:
functionCodePlane
,
多面
:
functionCodePlane
,
雨
:
functionCodeRain
,
雨
:
functionCodeRain
,
...
...
src/examples/line-function.js
0 → 100644
View file @
61999aec
export
function
addLine
()
{
const
script
=
document
.
createElement
(
'script'
);
script
.
src
=
'https://cesium.com/downloads/cesiumjs/releases/1.119/Build/Cesium/Cesium.js'
;
script
.
onload
=
()
=>
{
window
.
Cesium
.
Ion
.
defaultAccessToken
=
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI3Njg4ZWU5Yi1iZDhiLTRhYmUtOTRiYS04YjM5NmUwNjVmMDMiLCJpZCI6MjI3MzQ3LCJpYXQiOjE3MjA1MjA4Mjh9.E5XW4LnwgfVAaBC-znaYr61m4yK0-j2qEQhi9qwFFPE'
const
viewer
=
new
window
.
Cesium
.
Viewer
(
'cesiumContainer'
,
{
infoBox
:
false
,
});
const
line
=
viewer
.
entities
.
add
({
polyline
:
{
positions
:
Cesium
.
Cartesian3
.
fromDegreesArray
([
120
,
30
,
121
,
30
]),
// 线的起始和结束经纬度
material
:
Cesium
.
Color
.
YELLOW
,
// 线的颜色
width
:
5
}
})
viewer
.
zoomTo
(
line
)
};
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
);
}
src/examples/line.vue
0 → 100644
View file @
61999aec
<
template
>
<div
id=
"cesiumContainer"
class=
"cesium-container"
></div>
</
template
>
<
script
setup
>
import
{
onMounted
}
from
'vue'
;
import
{
addLine
}
from
'./function'
;
onMounted
(()
=>
{
addLine
()
});
</
script
>
<
style
>
.cesium-container
{
width
:
100%
;
height
:
100vh
;
}
</
style
>
\ No newline at end of file
src/views/ElementMap.js
View file @
61999aec
...
@@ -5,10 +5,10 @@ export const elementGraphicMap = {
...
@@ -5,10 +5,10 @@ export const elementGraphicMap = {
},
},
线
:
{
线
:
{
title
:
'线'
,
title
:
'线'
,
pngUrl
:
'/src/assets/
Point
.png'
pngUrl
:
'/src/assets/
Line
.png'
},
},
多线
:
{
多
颜色
线
:
{
title
:
'多线'
,
title
:
'多
颜色
线'
,
pngUrl
:
'/src/assets/MultiLine.png'
pngUrl
:
'/src/assets/MultiLine.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