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
18f676bb
authored
2020-08-13 17:18:03 +0800
by
刘远
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
2 parents
18edbb69
3f79c517
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
19 deletions
src/assets/js/map/createDraw.js
src/assets/js/map/flood.js
src/assets/js/map/heightControl.js
src/components/tjxAnslysis.vue
src/views/Home.vue
src/assets/js/map/createDraw.js
View file @
18f676b
src/assets/js/map/flood.js
View file @
18f676b
...
...
@@ -19,7 +19,6 @@ export default class flood {
this
.
positions2d
.
push
(
1000.0
);
}
}
return
positions
;
});
}
initHyp
()
{
...
...
src/assets/js/map/heightControl.js
0 → 100644
View file @
18f676b
import
objectManage
from
'./maputils'
;
export
default
class
heightControl
{
constructor
()
{
this
.
handlerPolygon
=
new
Cesium
.
DrawHandler
(
objectManage
.
viewer
,
Cesium
.
DrawMode
.
Polygon
);
this
.
handlerPolygon
.
drawEvt
.
addEventListener
(
result
=>
{
var
array
=
[].
concat
(
result
.
object
.
positions
),
positions
=
[];
var
polygon
=
result
.
object
;
if
(
!
polygon
)
return
;
polygon
.
show
=
false
;
this
.
handlerPolygon
.
polyline
.
show
=
false
;
for
(
var
i
=
0
,
len
=
array
.
length
;
i
<
len
;
i
++
){
var
cartographic
=
Cesium
.
Cartographic
.
fromCartesian
(
array
[
i
]);
var
longitude
=
Cesium
.
Math
.
toDegrees
(
cartographic
.
longitude
);
var
latitude
=
Cesium
.
Math
.
toDegrees
(
cartographic
.
latitude
);
if
(
positions
.
indexOf
(
longitude
)
===-
1
&&
positions
.
indexOf
(
latitude
)
===-
1
){
positions
.
push
(
longitude
);
positions
.
push
(
latitude
);
}
}
this
.
polygon
=
objectManage
.
viewer
.
entities
.
add
({
id
:
'polygonA'
,
polygon
:
{
hierarchy
:
Cesium
.
Cartesian3
.
fromDegreesArray
(
positions
),
height
:
105
,
material
:
new
Cesium
.
Color
(
1
,
1
,
0.20
,
0.5
),
outline
:
true
,
outlineColor
:
Cesium
.
Color
.
RED
}
}).
polygon
;
});
}
}
\ No newline at end of file
src/components/tjxAnslysis.vue
View file @
18f676b
...
...
@@ -41,6 +41,7 @@
</
template
>
<
script
>
import
height
from
"../assets/js/map/heightControl"
;
export
default
{
name
:
'tjxAnslysis'
,
components
:
{},
...
...
@@ -49,16 +50,19 @@
src
:
'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3820738330,1510784229&fm=26&gp=0.jpg'
}
},
mounted
()
{},
mounted
()
{
this
.
height
instanceof
height
||
(
this
.
height
=
new
height
());
},
methods
:
{
closePop
()
{
this
.
$emit
(
'closePop'
,
'tjxAnslysis'
)
},
startAnalysis
()
{
this
.
height
.
handlerPolygon
.
deactivate
();
this
.
height
.
handlerPolygon
.
activate
();
},
stopAnalysis
()
{
this
.
height
.
polygon
.
height
=
50
;
},
}
}
...
...
src/views/Home.vue
View file @
18f676b
...
...
@@ -147,8 +147,6 @@
const
Cesium
=
window
.
Cesium
;
import
{
loadModules
}
from
'esri-loader'
;
export
default
{
components
:
{
TopTitle
,
...
...
@@ -237,21 +235,8 @@
}
});
this
.
loadArcgis
();
},
methods
:
{
loadArcgis
()
{
loadModules
([
'esri/views/MapView'
,
'esri/WebMap'
])
.
then
(([
MapView
,
WebMap
])
=>
{
debugger
})
.
catch
(
err
=>
{
// handle any errors
console
.
error
(
err
);
});
},
searchRoat
(
val
)
{
/**
* @param {*} val '为地名地址道路的输入值'
...
...
Please
register
or
sign in
to post a comment