//环境建工项目信息
document.write('');
var p_points=[];
//const path="http://localhost:8871/v1/env/webgis";
//
//const httpUrls="http://localhost:8871/";
//const linkSysUrls="http://localhost:8000/";
//初始化项目点
function initProjectPoints(){
$.ajax({
type : "post",
async:false,
url : path+"/listProjects?access_token="+access_token,
contentType : "application/json;charset=utf-8",
success : function(data) {
if(data!=null && data.length>0){
p_points=data;
}
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
console.log("ajax请求失败!");
}
});
}
//列表显示所有的项目信息
function getProJectList(){
var content='';
content +='
';
for(var i=0;i'+ p_points[i].name+' | '
+''
+'详情'
+' '
+'定位'
+' '
+'边界'
+'';
}
content +=' | ';
// $(window.frames["projectListIframe"].document).find("#project_tales").html(content);
$("#project_tales").html(content);
}
//飞跃到项目点
function toProjectPointOnMap( lng , lat){
viewer.camera.flyTo({
destination: Cesium.Cartesian3.fromDegrees(lng,lat,3000),
});
}
//飞跃到项目
function toProjectPointOnMap2(id){
var project=getProjectEntity(id);
var lng=project.longitude;
var lat=project.latitude;
viewer.camera.flyTo({
destination: Cesium.Cartesian3.fromDegrees(lng,lat,3000),
});
}
//展示详情
function showProjectDetails( id ){
isProjectDetailsShow=true;
loadEnvProjectTable(id);
$("#projectDetails").show();
$('#projectList').hide();
isProjectListShow = false;
$.timeliner({
startOpen:['#19550828EX', '#19630828EX']
});
$.timeliner({
timelineContainer: '#timelineContainer_2'
});
$('#viewer').viewer({url : "data-original"});
}
//重新复制了上面的方法
function showProjectDetails2( id ){
isProjectDetailsShow=true;
loadEnvProjectTable(id);
$("#projectDetails").show();
$('#projectList').hide();
isProjectListShow = false;
$.timeliner({
startOpen:['#19550828EX', '#19630828EX']
});
$.timeliner({
timelineContainer: '#timelineContainer_2'
});
$('#viewer').viewer({url : "data-original"});
}
function loadEnvProjectTable(id ){
var pj=getProjectEntity(id);
$("#env_project_table").html();
var content="";
content += ''+ '名称'+' | ' +'' +pj.name+' | '+'
'
+''+ '地址'+' | ' +'' +getPjAddr(pj)+' | '+'
'
+''+ '经纬度'+' | ' +'' +pj.longitude +','+pj.latitude+' | '+'
'
+''+ '负责人'+' | ' +'' +'李静文、王文峰'+' | '+'
'
+''+ '详情'+' | ' +''
+'查看更多'
+' | '+'
';
$("#env_project_table").html(content);
}
function getPjAddr(pj){
var content="";
if(pj.province!=null && pj.province !=""&& typeof(pj.province)!= "undefined"){
content+=pj.province;
}
if(pj.city!=null && pj.city!="" && typeof(pj.city)!= "undefined"){
content+=","+pj.city;
}
if(pj.address !=null && pj.address !="" && typeof(pj.address)!= "undefined" ){
content+=","+pj.address;
}
return content;
}
//
function getProjectEntity(id){
for(var i=0;i