Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
刘远
/
3d_dc
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
cdb1e393
authored
2020-08-17 09:27:14 +0800
by
jikai
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
111111
1 parent
c1cc48da
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
24 deletions
src/assets/js/map/heightControl.js
src/assets/js/map/shadow.js
src/components/yyAnslysis.vue
src/views/Home.vue
src/assets/js/map/heightControl.js
View file @
cdb1e39
...
...
@@ -54,5 +54,6 @@ export default class heightControl {
}
remove
()
{
objectManage
.
viewer
.
entities
.
removeAll
();
this
.
splice
(
1000
);
}
}
\ No newline at end of file
...
...
src/assets/js/map/shadow.js
View file @
cdb1e39
...
...
@@ -132,7 +132,7 @@ export default class shadow {
extend
:
20
});
}
},
2
0
);
},
50
0
);
}
clear
()
{
this
.
handlerPolygon
.
deactivate
();
...
...
@@ -146,4 +146,10 @@ export default class shadow {
extend
:
0
});
}
remove
()
{
this
.
points
=
[];
this
.
shadowQuery
.
destroy
();
this
.
shadowQuery
=
new
Cesium
.
ShadowQueryPoints
(
objectManage
.
viewer
.
scene
);
this
.
shadowQuery
.
build
();
}
}
\ No newline at end of file
...
...
src/components/yyAnslysis.vue
View file @
cdb1e39
...
...
@@ -87,13 +87,6 @@
components
:
{},
data
()
{
return
{
// isCF: true, // 春分
// isXZ: false, // 夏至
// isQF: false, // 秋分
// isLD: false, // 立冬
// isDZ: false, // 冬至
// keepTqArr: ['isCF', 'isXZ', 'isQF', 'isLD', 'isDZ'],
anslysisTime
:
''
,
timeS
:
30
,
// 时间间隔
time
:
0
*
60
*
60
*
1000
,
// 滑块时间
...
...
@@ -101,12 +94,6 @@
marks
:
{
0
:
'0:00'
,
[
maxW
]:
'23:59'
,
// 50: {
// style: {
// color: '#1989FA'
// },
// label: this.$createElement('strong', '50%')
// }
},
pickerOptions
:
{
// 时间选择器 时间范围限制
selectableRange
:
'00:00:00 - 23:59:59'
...
...
@@ -133,7 +120,7 @@
this
.
shadow
.
sunlight
();
},
stopAnalysis
()
{
this
.
shadow
.
remove
();
},
handleIsXmbj
(
val
)
{
let
self
=
this
;
...
...
src/views/Home.vue
View file @
cdb1e39
...
...
@@ -167,6 +167,7 @@
data
()
{
return
{
viewer
:
undefined
,
flyCircle
:
false
,
isRoller
:
false
,
isReturn
:
false
,
// 复位
enlarge
:
false
,
// 放大
...
...
@@ -226,8 +227,9 @@
objectManage
.
viewer
=
this
.
viewer
;
// layers[0].selectEnabled = false;
// layers[1].selectEnabled = false;
// layers[0].shadowType = 2;
// layers[1].shadowType = 2;
console
.
log
(
layers
);
layers
[
1
].
shadowType
=
2
;
layers
[
2
].
shadowType
=
2
;
scene
.
camera
.
setView
({
destination
:
Cesium
.
Cartesian3
.
fromDegrees
(
116.44621857300415
,
39.899281526734555
,
216.7793905027196
),
orientation
:
{
...
...
@@ -270,10 +272,12 @@
this
.
commons
.
log
(
flag
)
},
isClear
(
flag
)
{
/**
* @param {*} flag 'true 选中清除, falss 反之'
*/
this
.
commons
.
log
(
flag
)
// this.commons.log(flag)
this
.
draw
.
handlerDis
.
clear
();
this
.
draw
.
handlerArea
.
clear
();
this
.
draw
.
handlerHeight
.
clear
();
this
.
viewer
.
scene
.
layers
.
find
(
"build1"
).
clearCustomClipBox
();
this
.
viewer
.
scene
.
layers
.
find
(
"build2"
).
clearCustomClipBox
();
}
// rightFunc
...
...
@@ -314,12 +318,40 @@
this
.
viewer
.
scene
.
multiViewportMode
=
Cesium
.
MultiViewportMode
.
HORIZONTAL
;
}
// 指北
,
EtoNorth
()
{}
,
EtoNorth
()
{
var
handler
=
new
Cesium
.
ScreenSpaceEventHandler
(
this
.
viewer
.
scene
.
canvas
);
handler
.
setInputAction
(
evt
=>
{
var
cartesian
=
this
.
viewer
.
scene
.
pickPosition
(
evt
.
position
);
var
boxOption
=
{
dimensions
:
new
Cesium
.
Cartesian3
(
10
,
10
,
10
),
position
:
cartesian
,
clipMode
:
'only_keep_line'
,
heading
:
0
};
this
.
viewer
.
scene
.
layers
.
find
(
"build1"
).
setCustomClipBox
(
boxOption
);
this
.
viewer
.
scene
.
layers
.
find
(
"build2"
).
setCustomClipBox
(
boxOption
);
},
Cesium
.
ScreenSpaceEventType
.
LEFT_CLICK
);
}
// 顶视
,
EtopSee
()
{}
,
EtopSee
()
{
this
.
viewer
.
camera
.
flyTo
({
destination
:
Cesium
.
Cartesian3
.
fromDegrees
(
116.45821857300415
,
39.915281526734555
,
5000.0
)
});
}
// 环视
,
EroundSee
()
{
// this.viewer.camera.flyCircleLoop = !!this.viewer.camera.flyCircleLoop;
// var handlerPoint = new Cesium.DrawHandler(this.viewer, Cesium.DrawMode.Point);
// handlerPoint.drawEvt.addEventListener(result => {
// // console.log(result.object._position);
// // {x: -2179734.991212225, y: 4379799.834213645, z: 4092420.9926270735}
// this.viewer.camera.flyCircle({x: -2179734.991212225, y: 4379799.834213645, z: 4092420.9926270735});
// });
// handlerPoint.deactivate();
// handlerPoint.activate();
(
this
.
flyCircle
=
!
this
.
flyCircle
)
?
this
.
viewer
.
camera
.
flyCircle
({
x
:
-
2179734.991212225
,
y
:
4379799.834213645
,
z
:
4092420.9926270735
})
:
this
.
viewer
.
camera
.
stopFlyCircle
();
}
// 视域
,
Ehorizon
(
val
)
{
...
...
Please
register
or
sign in
to post a comment