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
450c3075
authored
Mar 20, 2020
by
hanjixin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
map
parent
3b4aa986
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
251 additions
and
52 deletions
+251
-52
map/index.html
+41
-25
map/js/Map3D.js
+210
-27
No files found.
map/index.html
View file @
450c3075
...
...
@@ -40,8 +40,8 @@
</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>
...
...
@@ -76,16 +76,36 @@
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
==
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
==
2
&&
i2
==
0
)
{
addPoiByApi
(
'./personal.json'
)
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
==
1
&&
i2
==
1
)
{
addPoiByApi
(
'./led.json'
,
'Single'
)
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
}
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
}
oldi1
=
i1
,
oldi2
=
i2
}
// go(i1,i2)
</script>
...
...
@@ -93,11 +113,12 @@
//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','Single')
// window.addPoiByApi('./personal.json')
go
(
1
,
1
)
});
window
.
review
=
function
(
params
)
{
...
...
@@ -112,28 +133,23 @@
}
}
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 @
450c3075
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