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
ee37d160
authored
2020-08-19 09:28:04 +0800
by
jikai
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
11111111
1 parent
346061cb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
50 deletions
src/assets/js/map/flood.js
src/components/arcgisMap.vue
src/components/ymAnslysis.vue
src/views/Home.vue
src/assets/js/map/flood.js
View file @
ee37d16
...
...
@@ -73,15 +73,14 @@ export default class flood {
116.44515353439972
,
39.90683243165845
,
10
,
116.4437677267605
,
39.9069642145195
,
10
]);
let
geometry
=
new
Cesium
.
PolygonGeometry
({
polygonHierarchy
:
new
Cesium
.
PolygonHierarchy
(
Cesium
.
Cartesian3
.
fromDegreesArrayHeights
(
this
.
positions2d
)),
extrudedHeight
:
targetHeight
,
height
:
waterHeight
,
vertexFormat
:
Cesium
.
EllipsoidSurfaceAppearance
.
VERTEX_FORMAT
});
this
.
river
=
new
Cesium
.
Primitive
({
geometryInstances
:
new
Cesium
.
GeometryInstance
({
geometry
:
new
Cesium
.
PolygonGeometry
({
polygonHierarchy
:
new
Cesium
.
PolygonHierarchy
(
Cesium
.
Cartesian3
.
fromDegreesArrayHeights
(
this
.
positions2d
)),
extrudedHeight
:
targetHeight
,
height
:
waterHeight
,
vertexFormat
:
Cesium
.
EllipsoidSurfaceAppearance
.
VERTEX_FORMAT
})
}),
geometryInstances
:
new
Cesium
.
GeometryInstance
({
geometry
}),
appearance
:
new
Cesium
.
EllipsoidSurfaceAppearance
({
aboveGround
:
true
,
material
:
new
Cesium
.
Material
({
...
...
src/components/arcgisMap.vue
View file @
ee37d16
<
template
>
<div>
<div
id=
"arcgisMap"
></div>
</div>
</
template
>
<
script
>
...
...
@@ -12,42 +10,10 @@
return
{}
},
mounted
()
{
loadModules
([
"esri/Map"
,
"esri/views/MapView"
,
"esri/layers/WebTileLayer"
,
"esri/geometry/Extent"
,
"dojo/domReady!"
]).
then
(([
Map
,
MapView
,
WebTileLayer
,
Extent
])
=>
{
this
.
$parent
.
mapView
=
new
MapView
({
container
:
"arcgisMap"
,
map
:
new
Map
({
basemap
:
{
baseLayers
:
[
new
WebTileLayer
({
urlTemplate
:
"http://mt{subDomain}.google.cn/vt/lyrs=s&hl=zh-CN&gl=CN&x={col}&y={row}&z={level}&s=Gali"
,
subDomains
:
[
"0"
,
"1"
,
"2"
]
}),
new
WebTileLayer
({
urlTemplate
:
"http://mt{subDomain}.google.cn/vt/imgtp=png32&lyrs=h@207000000&hl=zh-CN&gl=cn&x={col}&y={row}&z={level}&s=Galil"
,
subDomains
:
[
"0"
,
"1"
,
"2"
]
})
]
}
}),
extent
:
new
Extent
({
xmin
:
413417
,
ymin
:
3715140
,
xmax
:
665512
,
ymax
:
3902165
,
spatialReference
:
4545
}),
zoom
:
5
});
});
},
methods
:
{
}
}
</
script
>
...
...
src/components/ymAnslysis.vue
View file @
ee37d16
...
...
@@ -42,7 +42,7 @@
</div>
<div
class=
"func-input"
>
<span>
当前水位
</span>
<span
style=
"margin-left: 36px;"
>
1263.7
米
</span>
<span
style=
"margin-left: 36px;"
>
{{
swsd
}}
米
</span>
</div>
<div
class=
"func-btn"
>
<div
class=
"btn-wrapper add-bg"
@
click=
"startAnalysis"
>
...
...
src/views/Home.vue
View file @
ee37d16
<
template
>
<div
class=
"home"
>
<div
class=
"home"
v-loading
.
fullscreen
.
lock=
"isFullscreenLoading"
>
<div
class=
"top"
>
<TopTitle></TopTitle>
</div>
...
...
@@ -93,7 +93,8 @@
<!--
<threeMap
ref=
"threeMap"
></threeMap>
<arcgisMap
ref=
"arcgisMap"
></arcgisMap>
-->
<component
:is=
"map"
></component>
<!-- 动态组件-->
<component
:is=
"map"
ref=
"maps"
></component>
<!-- 动态组件-->
<div
id=
"arcgisMap"
ref=
"arcgisMap"
></div>
</div>
</
template
>
...
...
@@ -178,8 +179,8 @@
'area'
,
'marker'
,
'rollerShutter'
,
'splitScreen'
,
'toNorth'
,
'topSee'
,
'roundSee'
,
'horizon'
,
'allSee'
,
'ymAnslysis'
,
'tjxAnslysis'
,
'yyAnslysis'
,
'visualField'
,
'kgAnalusis'
],
addProjectMsg
:
false
,
// 建设项目信息表
isFullscreenLoading
:
false
,
// 全屏loading
}
},
mounted
()
{
...
...
@@ -190,10 +191,51 @@
this
.
commons
.
log
(
val
)
},
is2D
(
flag
)
{
this
.
map
=
flag
?
'arcgisMap'
:
'threeMap'
;
this
.
map
=
flag
?
''
:
'threeMap'
;
this
.
isFullscreenLoading
=
true
;
loadModules
([
"esri/Map"
,
"esri/Basemap"
,
"esri/views/MapView"
,
"esri/layers/TileLayer"
,
"esri/layers/WebTileLayer"
,
"esri/geometry/Extent"
,
"dojo/domReady!"
]).
then
(([
Map
,
Basemap
,
MapView
,
TileLayer
,
WebTileLayer
,
Extent
])
=>
{
if
(
!
this
.
mapView
)
{
this
.
mapView
=
new
MapView
({
map
:
new
Map
({
basemap
:
new
Basemap
({
baseLayers
:
[
new
WebTileLayer
({
urlTemplate
:
"http://mt{subDomain}.google.cn/vt/lyrs=s&hl=zh-CN&gl=CN&x={col}&y={row}&z={level}&s=Gali"
,
subDomains
:
[
"0"
,
"1"
,
"2"
]
}),
new
WebTileLayer
({
urlTemplate
:
"http://mt{subDomain}.google.cn/vt/imgtp=png32&lyrs=h@207000000&hl=zh-CN&gl=cn&x={col}&y={row}&z={level}&s=Galil"
,
subDomains
:
[
"0"
,
"1"
,
"2"
]
})
]
})
}),
container
:
"arcgisMap"
,
center
:
[
117.73289858455101
,
36.255126757404966
],
zoom
:
9
,
});
this
.
mapView
.
when
(()
=>
{
this
.
isFullscreenLoading
=
false
;
},
function
(
error
){
console
.
log
(
"The view's resources failed to load: "
,
error
);
});
return
;
}
this
.
isFullscreenLoading
=
false
;
this
.
mapView
.
destroy
();
this
.
mapView
=
undefined
;
});
},
isCamera
(
flag
)
{
this
.
commons
.
log
(
flag
)
//
this.commons.log(flag)
},
isLayer
(
flag
)
{
this
.
commons
.
log
(
flag
)
...
...
Please
register
or
sign in
to post a comment