Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
MeteorologicalBureau
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6fd2d9d3
authored
Mar 20, 2020
by
hank
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of gitlab.maxrocky.com:hanjixin/MeteorologicalBureau into develop
parents
6a892db2
25735ecd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
137 additions
and
38 deletions
+137
-38
map/css/main.css
+59
-1
map/img/pop.png
+0
-0
map/index.html
+78
-37
map/js/Map3D.js
+0
-0
No files found.
map/css/main.css
View file @
6fd2d9d3
...
...
@@ -4,7 +4,7 @@
}
.text-shadow
{
text-shadow
:
.1rem
0rem
.5rem
rgba
(
255
,
255
,
255
,
0.4
),
-.1rem
0rem
.5rem
rgba
(
255
,
255
,
255
,
0.4
),
0rem
.1rem
.5rem
rgba
(
255
,
255
,
255
,
0.4
),
0rem
-.1rem
.5rem
rgba
(
255
,
255
,
255
,
0.4
);
text-shadow
:
3px
0
5px
rgba
(
255
,
255
,
255
,
0.4
),
-3px
0
5px
rgba
(
255
,
255
,
255
,
0.4
),
0
3px
5px
rgba
(
255
,
255
,
255
,
0.4
),
0
-3px
5px
rgba
(
255
,
255
,
255
,
0.4
);
}
body
,
html
,
...
...
@@ -98,4 +98,61 @@ body,
position
:
absolute
;
left
:
0
;
top
:
-25%
;
}
/* personpop */
#personpop
{
position
:
fixed
;
z-index
:
999999
;
left
:
10px
;
top
:
10px
;
/* border: 1px solid red; */
}
#personpop
div
{
/* border: 1px solid red; */
}
#box
{
color
:
#fff
;
width
:
390px
;
height
:
390px
;
background
:
url(../img/pop.png)
;
background-size
:
100%
108%
;
background-position
:
center
bottom
;
position
:
relative
;
}
#close
{
position
:
absolute
;
right
:
0
;
top
:
0
;
width
:
80px
;
height
:
40px
;
z-index
:
100
;
}
#title
{
text-align
:
center
;
font-size
:
24px
;
line-height
:
43px
;
margin-bottom
:
10px
;
}
#contant
{
width
:
100%
;
text-align
:
center
;
font-size
:
12px
;
}
#contant
div
.li
{
width
:
80%
;
height
:
40px
;
line-height
:
43px
;
font-size
:
18px
;
color
:
#dfe1e5
;
margin
:
0
auto
;
border-bottom
:
1px
solid
#27384e
;
text-align
:
left
;
clear
:
both
;
}
#contant
div
:last-child
{
border-bottom
:
none
;
}
.li
div
{
width
:
40%
;
float
:
left
;
}
\ No newline at end of file
map/img/
弹框
.png
→
map/img/
pop
.png
View file @
6fd2d9d3
File moved
map/index.html
View file @
6fd2d9d3
...
...
@@ -7,11 +7,28 @@
<title>
MAP
</title>
<link
rel=
"stylesheet"
href=
"css/main.css"
>
<style>
</style>
</head>
<body>
<!-- <div id=personpop>
<div id=box>
<div id=title>阿斯顿</div>
<div id=contant>
<div class=li>
<div>阿斯顿</div>1
</div>
<div class=li>
<div>阿斯顿</div>2
</div>
<div class=li>
<div>阿顿</div>啊实打实的
</div>
</div>
<div id=close onclick="popclose()"></div>
</div>
</div> -->
<div
id=
"container"
></div>
<div
id=
nav
>
<div
class=
"item"
onclick=
"go(0)"
><span
class=
"icon"
></span>
预警信息
</div>
...
...
@@ -23,10 +40,11 @@
</div>
<div
class=
"item"
onclick=
"go(2)"
><span
class=
"icon"
></span>
人员
</div>
<div
class=
"subnav subnav2"
>
<div
onclick=
"go(2,0)"
>
联络人
</div>
<div
onclick=
"go(2,1)"
>
人员2
</div>
<div
onclick=
"go(2,0)"
>
信息员
</div>
<div
onclick=
"go(2,1)"
>
应急责任人
</div>
</div>
</div>
<script
src=
"https://cache.amap.com/lbs/static/es5.min.js"
></script>
<script
src=
"https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"
></script>
<script
src=
"https://webapi.amap.com/maps?v=1.4.15&key=ee7327615de4d673c4e455a772da45fd&plugin=Map3D,AMap.DistrictSearch,ElasticMarker,AMap.MarkerClusterer"
></script>
...
...
@@ -38,32 +56,56 @@
</style>
<script>
var
oldi1
=
0
,
oldi2
=
0
function
go
(
i1
,
i2
){
console
.
log
(
oldi1
,
oldi2
);
console
.
log
(
i1
,
i2
);
if
(
i1
==
oldi1
&&
i2
==
oldi2
){
function
popclose
(){
console
.
log
(
'popclose'
);
map3d
.
map
.
clearInfoWindow
()
}
function
go
(
i1
,
i2
)
{
console
.
log
(
oldi1
,
oldi2
);
console
.
log
(
i1
,
i2
);
if
(
i1
==
oldi1
&&
i2
==
oldi2
)
{
return
false
}
$
(
".item"
).
removeClass
(
"active"
)
$
(
".item"
).
eq
(
i1
).
addClass
(
"active"
)
$
(
".item"
).
removeClass
(
"active"
)
.
removeClass
(
"text-shadow"
)
$
(
".item"
).
eq
(
i1
).
addClass
(
"active
text-shadow
"
)
$
(
".subnav"
).
hide
()
$
(
".subnav"
+
i1
).
show
()
$
(
".subnav"
+
i1
).
find
(
"div"
).
removeClass
(
"active
"
)
if
(
typeof
(
i2
)
!=
'undefined'
)
{
$
(
".subnav"
+
i1
).
find
(
"div"
).
eq
(
i2
).
addClass
(
"active
"
)
$
(
".subnav"
+
i1
).
show
()
$
(
".subnav"
+
i1
).
find
(
"div"
).
removeClass
(
"active"
).
removeClass
(
"text-shadow
"
)
if
(
typeof
(
i2
)
!=
'undefined'
)
{
$
(
".subnav"
+
i1
).
find
(
"div"
).
eq
(
i2
).
addClass
(
"active text-shadow
"
)
}
if
(
i1
==
0
&&
typeof
(
i2
)
==
'undefined'
){
// addPoiByApi('./预警接口.json')
if
(
i1
==
0
&&
typeof
(
i2
)
==
'undefined'
)
{
//预警信息
addPoiByApi
(
'http://123.56.149.208:8091/external/get/early/warn/city/two/list/'
+
urlParams
.
adcode
,
'setWarnPoint'
,
'Single'
)
oldi1
=
i1
,
oldi2
=
i2
}
if
(
i1
==
1
&&
i2
==
0
)
{
//大喇叭
addPoiByApi
(
`http://123.56.149.208:8091/external/get/early/warn/equipment/two?code=
${
urlParams
.
adcode
}
&clientStyle=1`
,
'setEquipmentPoint'
,
'Cluster'
)
oldi1
=
i1
,
oldi2
=
i2
}
if
(
i1
==
2
&&
i2
==
0
){
addPoiByApi
(
'./personal.json'
)
if
(
i1
==
1
&&
i2
==
1
)
{
//显示屏
addPoiByApi
(
`http://123.56.149.208:8091/external/get/early/warn/equipment/two?code=
${
urlParams
.
adcode
}
&clientStyle=2`
,
'setEquipmentPoint'
,
'Single'
)
oldi1
=
i1
,
oldi2
=
i2
}
if
(
i1
==
1
&&
i2
==
1
){
addPoiByApi
(
'./led.json'
,
'Single'
)
if
(
i1
==
1
&&
i2
==
2
)
{
//北斗
addPoiByApi
(
`http://123.56.149.208:8091/external/get/early/warn/setEipment/two?code=
${
urlParams
.
adcode
}
&clientStyle=3`
,
'setEquipmentPoint'
,
'Single'
)
oldi1
=
i1
,
oldi2
=
i2
}
if
(
i1
==
2
&&
i2
==
0
)
{
//信息员
addPoiByApi
(
'http://123.56.149.208:8091/external/get/early/warn/people/two/info/'
+
urlParams
.
adcode
,
'setPersonalPoint'
,
'Cluster'
)
oldi1
=
i1
,
oldi2
=
i2
}
oldi1
=
i1
,
oldi2
=
i2
if
(
i1
==
2
&&
i2
==
1
)
{
//应急责任人
addPoiByApi
(
'http://123.56.149.208:8091/external/get/early/warn/people/two/principal/'
+
urlParams
.
adcode
,
'setPrincipalPoint'
,
'Single'
)
oldi1
=
i1
,
oldi2
=
i2
}
}
// go(i1,i2)
</script>
...
...
@@ -71,44 +113,43 @@
//http://106.120.82.243:8080/qxyj/pageHtml/login.html wis 12379
import
{
Map3D
}
from
'./js/Map3D.js'
;
import
{
GetParams
}
from
'./js/tools.js'
;
var
urlParams
=
GetParams
()
window
.
urlParams
=
GetParams
()
//成都 重庆 天津 北京 上海 大连 三沙 湖北 中国
//350200
//350500
//320300 370100
window
.
map3d
=
new
Map3D
(
urlParams
.
adcode
||
'成都'
,
'container'
,
urlParams
,(
_map3d
)
=>
{
window
.
addPoiByApi
(
'./led.json'
)
go
(
1
,
1
)
});
window
.
review
=
function
(
params
)
{
map3d
.
review
()
}
window
.
delPoi
=
function
(
params
)
{
try
{
map3d
.
map
.
clearInfoWindow
()
map3d
.
delPoi
(
pois
)
window
.
pois
=
[]
}
catch
(
error
)
{
}
}
window
.
addPoiByApi
=
function
(
api
,
type
)
{
window
.
addPoiByApi
=
function
(
api
,
type
,
type1
)
{
console
.
log
(
api
);
window
.
delPoi
()
window
.
review
()
$
.
getJSON
(
api
).
then
(
res
=>
{
var
currentDetailList
=
JSON
.
parse
(
res
).
currentDetailList
.
slice
(
0
,
2000
);
$
.
get
(
api
).
then
(
res
=>
{
var
currentDetailList
=
res
.
data
console
.
log
(
currentDetailList
);
if
(
type
==
'MassMarks'
){
window
.
pois
=
map3d
.
addPoisMassMarks
(
currentDetailList
)
}
else
if
(
type
==
'Single'
){
window
.
pois
=
map3d
.
addPoisSingle
(
currentDetailList
)
if
(
type
1
==
'MassMarks'
){
map3d
.
addPoisMassMarks
(
currentDetailList
,
type
).
then
(
res
=>
window
.
pois
=
res
)
}
else
if
(
type
1
==
'Single'
){
map3d
.
addPoisSingle
(
currentDetailList
,
type
).
then
(
res
=>
window
.
pois
=
res
)
}
else
{
window
.
pois
=
map3d
.
addPoisMarkerClusterer
(
currentDetailList
)
map3d
.
addPoisMarkerClusterer
(
currentDetailList
,
type
).
then
(
res
=>
window
.
pois
=
res
)
}
});
}
// addPoiByApi('./personal.json')
// addPoiByApi('./led.json','Single')
</script>
</body>
...
...
map/js/Map3D.js
View file @
6fd2d9d3
This diff is collapsed.
Click to expand it.
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