Commit 450c3075 by hanjixin

map

parent 3b4aa986
......@@ -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(type1 == 'MassMarks'){
map3d.addPoisMassMarks(currentDetailList,type).then(res=>window.pois = res)
}else if(type1 == '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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment