From e1186e0c9c1a7a47454b73f9cddcf733dce30b32 Mon Sep 17 00:00:00 2001
From: fuchengshen <men883234@gmail.com>
Date: 星期五, 15 七月 2022 13:42:00 +0800
Subject: [PATCH] 静态数据模式
---
js/new_functions.js | 1542 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 771 insertions(+), 771 deletions(-)
diff --git a/js/new_functions.js b/js/new_functions.js
index 5a0df01..378c030 100644
--- a/js/new_functions.js
+++ b/js/new_functions.js
@@ -20,47 +20,47 @@
var graphicLayer17
// import data from '../data/sites.js'
var get_JSON = {
- ruijin_url:"http://localhost:4500/dataservice/Bdata?bid="
+ ruijin_url:"http://localhost:4500/dataservice/Bdata?bid="
}
// 椤甸潰鍒濆鍖栵紝鍒涘缓妤煎眰鎸夐敭
$(document).ready(function(){
- var btn_box_html = ''
- for(let i=1;i<23;i++){
- btn_box_html += `<button style="margin-right:4px;" class="${i}">F${i}</button>`
- }
- $("#building_btn").append(btn_box_html)
- $.ajax({
- type:'get',
- dataType:'json',
- async:true,
- url:'http://localhost:4500/dataservice/Bdata?bid=get_ruijin_outside&floor_=7',
- success:function(data){
- console.log("e")
- let datas = data.data.data
- console.log(datas)
- for(let i=0;i<datas.length;i++){
- let item = datas[i]
- points17[i] = [item.lon,item.lat]
- }
-
- const graphic_17 = new mars3d.graphic.WallEntity({
- positions:points17,
- style: {
- closure: true,
- diffHeight: 2,
- }
- })
- graphicLayer17.addGraphic(graphic_17)
-
-
- }
- })
-
+ var btn_box_html = ''
+ for(let i=1;i<23;i++){
+ btn_box_html += `<button style="margin-right:4px;" class="${i}">F${i}</button>`
+ }
+ $("#building_btn").append(btn_box_html)
+ $.ajax({
+ type:'get',
+ dataType:'json',
+ async:true,
+ url:'http://localhost:4500/dataservice/Bdata?bid=get_ruijin_outside&floor_=7',
+ success:function(data){
+ console.log("e")
+ let datas = data.data.data
+ console.log(datas)
+ for(let i=0;i<datas.length;i++){
+ let item = datas[i]
+ points17[i] = [item.lon,item.lat]
+ }
+
+ const graphic_17 = new mars3d.graphic.WallEntity({
+ positions:points17,
+ style: {
+ closure: true,
+ diffHeight: 2,
+ }
+ })
+ graphicLayer17.addGraphic(graphic_17)
+
+
+ }
+ })
+
})
-
-
-
-
+
+
+
+
// 璋冭壊鐩樼浉鍏充簨浠�
var current=null
function getEvent(){
@@ -69,788 +69,788 @@
}
func=getEvent.caller;
while(func!=null){
- var arg0=func.arguments[0];
- if(arg0){
- if((arg0.constructor==Event || arg0.constructor ==MouseEvent)||(typeof(arg0)=="object" && arg0.preventDefault && arg0.stopPropagation))
- {
- return arg0;
- }
- }
- func=func.caller;
+ var arg0=func.arguments[0];
+ if(arg0){
+ if((arg0.constructor==Event || arg0.constructor ==MouseEvent)||(typeof(arg0)=="object" && arg0.preventDefault && arg0.stopPropagation))
+ {
+ return arg0;
+ }
+ }
+ func=func.caller;
}
return null;
}
-
+
function doOver() {
var evt=getEvent();
var element=evt.srcElement || evt.target;
var DisColor=document.getElementById("DisColor");
var HexColor=document.getElementById("HexColor");
if ((element.tagName=="TD") && (current!=element)) {
- if (current!=null){
- current.style.backgroundColor = current._background
- }
- element._background = element.style.backgroundColor
- DisColor.style.backgroundColor = rgbToHex(element.style.backgroundColor)
- HexColor.value = rgbToHex(element.style.backgroundColor)
- element.style.backgroundColor = "white"
- current = element
+ if (current!=null){
+ current.style.backgroundColor = current._background
+ }
+ element._background = element.style.backgroundColor
+ DisColor.style.backgroundColor = rgbToHex(element.style.backgroundColor)
+ HexColor.value = rgbToHex(element.style.backgroundColor)
+ element.style.backgroundColor = "white"
+ current = element
}
}
function rgbToHex(aa){
if(aa.indexOf("rgb") != -1){
- aa=aa.replace("rgb(","")
- aa=aa.replace(")","")
- aa=aa.split(",")
- r=parseInt(aa[0]);
- g=parseInt(aa[1]);
- b=parseInt(aa[2]);
- r = r.toString(16);
- if (r.length == 1) { r = '0' + r; }
- g = g.toString(16);
- if (g.length == 1) { g = '0' + g; }
- b = b.toString(16);
- if (b.length == 1) { b = '0' + b; }
- return ("#" + r + g + b).toUpperCase();
+ aa=aa.replace("rgb(","")
+ aa=aa.replace(")","")
+ aa=aa.split(",")
+ r=parseInt(aa[0]);
+ g=parseInt(aa[1]);
+ b=parseInt(aa[2]);
+ r = r.toString(16);
+ if (r.length == 1) { r = '0' + r; }
+ g = g.toString(16);
+ if (g.length == 1) { g = '0' + g; }
+ b = b.toString(16);
+ if (b.length == 1) { b = '0' + b; }
+ return ("#" + r + g + b).toUpperCase();
}else{
- return aa;
+ return aa;
}
}
function showHistoryPathDetail(itemname,itemid,itemfloor) {
-
+
if (mars3d.widget.isActivate("widgets/rruRouterReplay/widget.js")) {
var detailWiget = mars3d.widget.getClass("widgets/rruRouterReplay/widget.js");
detailWiget.reloadData({
- "id":itemid,
- "name":itemname,
- "floor":itemfloor
- });
+ "id":itemid,
+ "name":itemname,
+ "floor":itemfloor
+ });
} else {
mars3d.widget.activate({
uri: "widgets/rruRouterReplay/widget.js",
params: {
- "id":itemid,
- "name":itemname,
- "floor":itemfloor
- }
+ "id":itemid,
+ "name":itemname,
+ "floor":itemfloor
+ }
});
}
}
-
-
-
+
+
+
// 鐟為噾澶фゼ鐨勫垱寤哄拰瀵瑰叾杩涜鐨勬搷浣�
function openFloor(){
- var num = 0;
- var openfl = false;
- var height_list = [];
- // 鍒囨崲妤煎眰棰滆壊
-
- // 璋冭壊鏉匡紝鐢ㄤ簬璋冩暣澶фゼ澶栭儴棰滆壊
-
- // 灞曞紑妤煎眰
- $(".open2").click(function(e){
- for(let i = 1;i<model_list.length;i++){
- if(i<7){
- model_list[i].moveTo({
- position:[model_list[i].options.position[0],model_list[i].options.position[1],model_list[i].options.position[2]+15*i]
- })
- }else{
- model_list[i].moveTo({
- position:[model_list[i].options.position[0],model_list[i].options.position[1],model_list[i].options.position[2]+15*(i-1)]
- })
- }
- }
- })
- // 鍚堝苟妤煎眰
- $(".merge").click(function(){
- for(let i = 1;i<model_list.length;i++){
- model_list[i].moveTo({
- position:[model_list[i].options.position[0],model_list[i].options.position[1],model_list[i].options.position[2]]
- })
- }
- })
- // 鏄剧ず鍏ㄩ儴
- $(".hide_").click(function(){
- console.log(mr_points_list)
- for(let i=0;i<model_list.length;i++){
- model_list[i].show = true
- }
- })
- // 鍒囨崲鎸夐挳锛屾樉绀轰笌闅愯棌璋冭壊鐩�
- $(".change").click(function(){
- $("#color_boxs").toggle();
- })
- // 閫夊彇鎸夐挳锛岀偣鍑绘寜閽樉绀虹浉搴旀ゼ灞�
- var button_button = $("button")
- button_button.click(function(e){
- new_msisdn_list = []
- // console.log(new_msisdn_list,"opacity")
- // 鍏ゼ浠ヤ笅妤煎眰瀵瑰簲鐩稿簲鐨勬寜閽紝鍏眰鏃舵妸浜旀ゼ妤奸《鍜屽叚妤煎悓鏃堕殣钘忥紝鍏ゼ浠ヤ笂鎸夐挳瀵瑰簲鍒版ゼ灞傚姞涓�
- $(this).addClass('red')
- $(this).siblings('button').removeClass('red')
- let floor_ = e.target.className
- // let floor_end = Number(floor_)
- let floor_end = Number(floor_.slice(0,-3))
- for(let i=0;i<mr_points_list.length;i++){
- new_msisdn_list= []
- let floor = Number(mr_points_list[i].options.position[2])/3
- if(floor_end < floor){
- mr_points_list[i].setStyle({
- opacity:0,
- label:{
- opacity:0
- }
- })
- }else{
- mr_points_list[i].setStyle({
- opacity:1,
- label:{
- opacity:1
- }
- })
- }
- new_mr_points_list.push(mr_points_list[i])
- }
-
- if(floor_end<7){
-
- for(let i=1;i<floor_end+1;i++){
- model_list[i].show = true
- }
- for(let j=floor_end;j<model_list.length;j++){
- model_list[j].show = false
- }
-
- }else if(floor_end == 7){
- for(let i=1;i<8;i++){
- model_list[i].show = true
- }
- for(let j=8;j<model_list.length;j++){
- model_list[j].show = false
- }
- }else{
- for(let i=1;i<floor_end+1;i++){
- model_list[i+1].show = true
- }
- for(let j=floor_end;j<model_list.length+1;j++){
- model_list[j+1].show = false
- }
- }
- })
-
-
- var model_lon = 121.462091;
- var model_lat = 31.212238;
- var heading_ = 165
- // 娣诲姞鍖婚櫌澶фゼ妯″瀷
- const graphicLayer = new mars3d.layer.GraphicLayer({
- id: 203,
- pid: 98,
- name: "涓婃捣鐟為噾鍖婚櫌",
- show: true,
- flyTo:false
- })
- map.addLayer(graphicLayer)
- floorGraphic1 = new mars3d.graphic.ModelEntity({
- position: [model_lon, model_lat, 0], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- distanceDisplayCondition_far:100,
- url: "./gltf/Ruijin2/F1.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- popup:`<p>涓�妤�</p>`,
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic2 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 0], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- distanceDisplayCondition_far:100,
- url: "./gltf/Ruijin2/F2.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- popup:`<p>浜屾ゼ</p>`,
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic3 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 0], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- distanceDisplayCondition_far:100,
- url: "./gltf/Ruijin2/F3-5.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- popup:`<p>涓夋ゼ</p>`,
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic4 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 2.8], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- distanceDisplayCondition_far:100,
- url: "./gltf/Ruijin2/F3-5.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- popup:`<p>鍥涙ゼ</p>`,
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic5 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 5.6], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- distanceDisplayCondition_far:100,
- url: "./gltf/Ruijin2/F3-5.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- popup:`<p>浜旀ゼ</p>`,
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic6 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 8.4], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- distanceDisplayCondition_far:100,
- url: "./gltf/Ruijin2/F3-5.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
-
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic7 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 1.8], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/F5-roof.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- popup:`<p>鍏ゼ</p>`,
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic8 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, -1.1], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/F7-16.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- popup:`<p>涓冩ゼ</p>`,
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic9 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 2.1], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/F7-16.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- popup:`<p>鍏ゼ</p>`,
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic10 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 5], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/F7-16.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic11 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 7.9], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/F7-16.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic12 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 10.7], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/F7-16.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic13 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 13.5], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/F7-16.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic14 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 16.3], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/F7-16.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic15 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 19.1], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/F7-16.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic16 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 21.9], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- fill:true,
- // opacity:0.7,
- // color:"#ffffff",
- url: "./gltf/Ruijin2/F7-16.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic17 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 24.7], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/F7-16.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic18 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, -5], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/L17_220303.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic19 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, -2], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/L17_220303.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic20 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 1], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/L17_220303.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic21 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 4], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/L17_220303.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic22 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 7], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/L17_220303.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic23 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, 10], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- url: "./gltf/Ruijin2/L17_220303.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- rotation:{x:0,y:0,z:180}
- })
- floorGraphic24 = new mars3d.graphic.ModelEntity({
-
- position: [model_lon,model_lat, -6.8], // 妤兼爧浣嶇疆
- style: {
- scale:1,
- maximumScale:2,
- url: "./gltf/Ruijin2/F22-roof.gltf",
- heading: heading_,
- color:"#ffff00",
- fill:true
- },
- })
- model_list.push(
- floorGraphic1,
- floorGraphic2,
- floorGraphic3,
- floorGraphic4,
- floorGraphic5,
- floorGraphic6,
- floorGraphic7,
- floorGraphic8,
- floorGraphic9,
- floorGraphic10,
- floorGraphic11,
- floorGraphic12,
- floorGraphic13,
- floorGraphic14,
- floorGraphic15,
- floorGraphic16,
- floorGraphic17,
- floorGraphic18,
- floorGraphic19,
- floorGraphic20,
- floorGraphic21,
- floorGraphic22,
- floorGraphic23,
- floorGraphic24,
- )
-
- for(let i = 0;i<model_list.length;i++){
- graphicLayer.addGraphic(model_list[i])
- }
- if(model_list.length>0){
- var ColorHex=new Array('00','33','66','99','CC','FF')
- var SpColorHex=new Array('FF0000','00FF00','0000FF','FFFF00','00FFFF','FF00FF')
-
-
- var colorTable=''
- for (i=0;i<2;i++) //寰幆2閮ㄥ垎
- {
- for (j=0;j<6;j++) //寰幆6琛�
- {
- colorTable=colorTable+'<tr height=12>'
- for (k=0;k<3;k++)
- {
- for (l=0;l<6;l++)
- {
- colorTable=colorTable+'<td onclick="test_box()" class="color_box" width=11 style="background-color:#'+ColorHex[k+i*3]+ColorHex[l]+ColorHex[j]+'">'
- }
- }
- }
- }
- colorTable='<table id="color_fbox" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="000000" style="cursor:hand;">'
- +colorTable+'</table>';
- colorpanel.innerHTML=colorTable
- }
-
-
+ var num = 0;
+ var openfl = false;
+ var height_list = [];
+ // 鍒囨崲妤煎眰棰滆壊
+
+ // 璋冭壊鏉匡紝鐢ㄤ簬璋冩暣澶фゼ澶栭儴棰滆壊
+
+ // 灞曞紑妤煎眰
+ $(".open2").click(function(e){
+ for(let i = 1;i<model_list.length;i++){
+ if(i<7){
+ model_list[i].moveTo({
+ position:[model_list[i].options.position[0],model_list[i].options.position[1],model_list[i].options.position[2]+15*i]
+ })
+ }else{
+ model_list[i].moveTo({
+ position:[model_list[i].options.position[0],model_list[i].options.position[1],model_list[i].options.position[2]+15*(i-1)]
+ })
+ }
+ }
+ })
+ // 鍚堝苟妤煎眰
+ $(".merge").click(function(){
+ for(let i = 1;i<model_list.length;i++){
+ model_list[i].moveTo({
+ position:[model_list[i].options.position[0],model_list[i].options.position[1],model_list[i].options.position[2]]
+ })
+ }
+ })
+ // 鏄剧ず鍏ㄩ儴
+ $(".hide_").click(function(){
+ console.log(mr_points_list)
+ for(let i=0;i<model_list.length;i++){
+ model_list[i].show = true
+ }
+ })
+ // 鍒囨崲鎸夐挳锛屾樉绀轰笌闅愯棌璋冭壊鐩�
+ $(".change").click(function(){
+ $("#color_boxs").toggle();
+ })
+ // 閫夊彇鎸夐挳锛岀偣鍑绘寜閽樉绀虹浉搴旀ゼ灞�
+ var button_button = $("button")
+ button_button.click(function(e){
+ new_msisdn_list = []
+ // console.log(new_msisdn_list,"opacity")
+ // 鍏ゼ浠ヤ笅妤煎眰瀵瑰簲鐩稿簲鐨勬寜閽紝鍏眰鏃舵妸浜旀ゼ妤奸《鍜屽叚妤煎悓鏃堕殣钘忥紝鍏ゼ浠ヤ笂鎸夐挳瀵瑰簲鍒版ゼ灞傚姞涓�
+ $(this).addClass('red')
+ $(this).siblings('button').removeClass('red')
+ let floor_ = e.target.className
+ // let floor_end = Number(floor_)
+ let floor_end = Number(floor_.slice(0,-3))
+ for(let i=0;i<mr_points_list.length;i++){
+ new_msisdn_list= []
+ let floor = Number(mr_points_list[i].options.position[2])/3
+ if(floor_end < floor){
+ mr_points_list[i].setStyle({
+ opacity:0,
+ label:{
+ opacity:0
+ }
+ })
+ }else{
+ mr_points_list[i].setStyle({
+ opacity:1,
+ label:{
+ opacity:1
+ }
+ })
+ }
+ new_mr_points_list.push(mr_points_list[i])
+ }
+
+ if(floor_end<7){
+
+ for(let i=1;i<floor_end+1;i++){
+ model_list[i].show = true
+ }
+ for(let j=floor_end;j<model_list.length;j++){
+ model_list[j].show = false
+ }
+
+ }else if(floor_end == 7){
+ for(let i=1;i<8;i++){
+ model_list[i].show = true
+ }
+ for(let j=8;j<model_list.length;j++){
+ model_list[j].show = false
+ }
+ }else{
+ for(let i=1;i<floor_end+1;i++){
+ model_list[i+1].show = true
+ }
+ for(let j=floor_end;j<model_list.length+1;j++){
+ model_list[j+1].show = false
+ }
+ }
+ })
+
+
+ var model_lon = 121.462091;
+ var model_lat = 31.212238;
+ var heading_ = 165
+ // 娣诲姞鍖婚櫌澶фゼ妯″瀷
+ const graphicLayer = new mars3d.layer.GraphicLayer({
+ id: 203,
+ pid: 98,
+ name: "涓婃捣鐟為噾鍖婚櫌",
+ show: true,
+ flyTo:false
+ })
+ map.addLayer(graphicLayer)
+ floorGraphic1 = new mars3d.graphic.ModelEntity({
+ position: [model_lon, model_lat, 0], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ distanceDisplayCondition_far:100,
+ url: "./gltf/Ruijin2/F1.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ popup:`<p>涓�妤�</p>`,
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic2 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 0], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ distanceDisplayCondition_far:100,
+ url: "./gltf/Ruijin2/F2.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ popup:`<p>浜屾ゼ</p>`,
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic3 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 0], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ distanceDisplayCondition_far:100,
+ url: "./gltf/Ruijin2/F3-5.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ popup:`<p>涓夋ゼ</p>`,
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic4 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 2.8], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ distanceDisplayCondition_far:100,
+ url: "./gltf/Ruijin2/F3-5.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ popup:`<p>鍥涙ゼ</p>`,
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic5 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 5.6], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ distanceDisplayCondition_far:100,
+ url: "./gltf/Ruijin2/F3-5.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ popup:`<p>浜旀ゼ</p>`,
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic6 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 8.4], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ distanceDisplayCondition_far:100,
+ url: "./gltf/Ruijin2/F3-5.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic7 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 1.8], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/F5-roof.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ popup:`<p>鍏ゼ</p>`,
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic8 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, -1.1], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/F7-16.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ popup:`<p>涓冩ゼ</p>`,
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic9 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 2.1], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/F7-16.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ popup:`<p>鍏ゼ</p>`,
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic10 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 5], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/F7-16.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic11 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 7.9], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/F7-16.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic12 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 10.7], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/F7-16.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic13 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 13.5], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/F7-16.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic14 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 16.3], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/F7-16.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic15 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 19.1], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/F7-16.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic16 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 21.9], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ fill:true,
+ // opacity:0.7,
+ // color:"#ffffff",
+ url: "./gltf/Ruijin2/F7-16.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic17 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 24.7], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/F7-16.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic18 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, -5], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/L17_220303.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic19 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, -2], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/L17_220303.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic20 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 1], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/L17_220303.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic21 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 4], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/L17_220303.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic22 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 7], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/L17_220303.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic23 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, 10], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ url: "./gltf/Ruijin2/L17_220303.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ rotation:{x:0,y:0,z:180}
+ })
+ floorGraphic24 = new mars3d.graphic.ModelEntity({
+
+ position: [model_lon,model_lat, -6.8], // 妤兼爧浣嶇疆
+ style: {
+ scale:1,
+ maximumScale:2,
+ url: "./gltf/Ruijin2/F22-roof.gltf",
+ heading: heading_,
+ color:"#ffff00",
+ fill:true
+ },
+ })
+ model_list.push(
+ floorGraphic1,
+ floorGraphic2,
+ floorGraphic3,
+ floorGraphic4,
+ floorGraphic5,
+ floorGraphic6,
+ floorGraphic7,
+ floorGraphic8,
+ floorGraphic9,
+ floorGraphic10,
+ floorGraphic11,
+ floorGraphic12,
+ floorGraphic13,
+ floorGraphic14,
+ floorGraphic15,
+ floorGraphic16,
+ floorGraphic17,
+ floorGraphic18,
+ floorGraphic19,
+ floorGraphic20,
+ floorGraphic21,
+ floorGraphic22,
+ floorGraphic23,
+ floorGraphic24,
+ )
+
+ for(let i = 0;i<model_list.length;i++){
+ graphicLayer.addGraphic(model_list[i])
+ }
+ if(model_list.length>0){
+ var ColorHex=new Array('00','33','66','99','CC','FF')
+ var SpColorHex=new Array('FF0000','00FF00','0000FF','FFFF00','00FFFF','FF00FF')
+
+
+ var colorTable=''
+ for (i=0;i<2;i++) //寰幆2閮ㄥ垎
+ {
+ for (j=0;j<6;j++) //寰幆6琛�
+ {
+ colorTable=colorTable+'<tr height=12>'
+ for (k=0;k<3;k++)
+ {
+ for (l=0;l<6;l++)
+ {
+ colorTable=colorTable+'<td onclick="test_box()" class="color_box" width=11 style="background-color:#'+ColorHex[k+i*3]+ColorHex[l]+ColorHex[j]+'">'
+ }
+ }
+ }
+ }
+ colorTable='<table id="color_fbox" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="000000" style="cursor:hand;">'
+ +colorTable+'</table>';
+ colorpanel.innerHTML=colorTable
+ }
+
+
}
-
+
// 璁$畻楂樺害
function finalHeight(h){
- let h1 = Number(h)
- let h2 = 0
- let h3 = 0
- let h4 = 0
- let h5 = 0
- if(h1<=4.5){
- h5 = 1
- }else{
- h2 = h1-4.5-1
- h3 = h2/2.8
- h4 = Math.floor(h3)+2
- h5 = h4*3
- }
-
- return h5
+ let h1 = Number(h)
+ let h2 = 0
+ let h3 = 0
+ let h4 = 0
+ let h5 = 0
+ if(h1<=4.5){
+ h5 = 1
+ }else{
+ h2 = h1-4.5-1
+ h3 = h2/2.8
+ h4 = Math.floor(h3)+2
+ h5 = h4*3
+ }
+
+ return h5
}
-
+
// 娣诲姞PCI妯″瀷
function addPciModel(){
- var PCI_position_layer = new mars3d.layer.GraphicLayer({
- pid:99,
- name:'new_PCI',
- show:false
- })
- map.addLayer(PCI_position_layer)
- $.ajax({
- type:'get',
- dataType:'json',
- async:true,
- url:get_JSON.ruijin_url+'get_rru_info',
- success:function(data){
- var datas_2 = []
- let datas = data.data.data
- for(let i=0;i<datas.length;i++){
- datas_2.push(datas[i])
- }
- let rru_end = unique(datas)
- console.log(rru_end,"rru_end")
- for(let i=0;i<rru_end.length;i++){
- let item = datas[i]
- let coneGlow = new mars3d.graphic.CircleEntity({
- position: Cesium.Cartesian3.fromDegrees(Number(item.Longitude),Number(item.Latitude),0),
- style: {
- color:'rgba(255, 254, 253, 1.0)',
- radius: 4,
- diffHeight:Number(item.AntHight)
- },
- popup:`<p>鍚嶇О:${item.SitenameCN}</p>
- <p>鍦板潃:${item.SiteAddress}</p>
- <p>缂栧彿:${item.eNodeBID}</p>
- <p>缁忓害:${item.Longitude}</p>
- <p>绾害:${item.Latitude}</p>
- <p>楂樺害:${item.AntHight}</p>`,
- show:true
- })
- PCI_position_layer.addGraphic(coneGlow)
- }
- for(let i=0;i<datas_2.length;i++){
- let item = datas_2[i]
- for(let j=0;j<rru_end.length;j++){
- if(item.SitenameCN == rru_end[j].SitenameCN||item.SiteAddress === rru_end[j].SiteAddress){
- item.Longitude = rru_end[j].Longitude
- item.Latitude = rru_end[j].Latitude
- item.AntHight = rru_end[j].AntHight
- let num = Number(item.DirectionalAngle)
- let plane_pci
- let h = Number(item.AntHight)
- if(item.frequencyRange == '1.8G'){
- plane_pci = addPCIPlane(item,h-7,num,"#ff0000")
- }else if(item.frequencyRange == '2.1G'){
- plane_pci = addPCIPlane(item,h+7,num,"#00ff00")
- }else{
- plane_pci = addPCIPlane(item,h,num,"#0000ff")
- }
- PCI_position_layer.addGraphic(plane_pci)
- }
- }
- }
-
- },
- error: function (request, textStatus) {
-
- }
- })
+ var PCI_position_layer = new mars3d.layer.GraphicLayer({
+ pid:99,
+ name:'new_PCI',
+ show:false
+ })
+ map.addLayer(PCI_position_layer)
+ $.ajax({
+ type:'get',
+ dataType:'json',
+ async:true,
+ url:get_JSON.ruijin_url+'get_rru_info',
+ success:function(data){
+ var datas_2 = []
+ let datas = data.data.data
+ for(let i=0;i<datas.length;i++){
+ datas_2.push(datas[i])
+ }
+ let rru_end = unique(datas)
+ console.log(rru_end,"rru_end")
+ for(let i=0;i<rru_end.length;i++){
+ let item = datas[i]
+ let coneGlow = new mars3d.graphic.CircleEntity({
+ position: Cesium.Cartesian3.fromDegrees(Number(item.Longitude),Number(item.Latitude),0),
+ style: {
+ color:'rgba(255, 254, 253, 1.0)',
+ radius: 4,
+ diffHeight:Number(item.AntHight)
+ },
+ popup:`<p>鍚嶇О:${item.SitenameCN}</p>
+ <p>鍦板潃:${item.SiteAddress}</p>
+ <p>缂栧彿:${item.eNodeBID}</p>
+ <p>缁忓害:${item.Longitude}</p>
+ <p>绾害:${item.Latitude}</p>
+ <p>楂樺害:${item.AntHight}</p>`,
+ show:true
+ })
+ PCI_position_layer.addGraphic(coneGlow)
+ }
+ for(let i=0;i<datas_2.length;i++){
+ let item = datas_2[i]
+ for(let j=0;j<rru_end.length;j++){
+ if(item.SitenameCN == rru_end[j].SitenameCN||item.SiteAddress === rru_end[j].SiteAddress){
+ item.Longitude = rru_end[j].Longitude
+ item.Latitude = rru_end[j].Latitude
+ item.AntHight = rru_end[j].AntHight
+ let num = Number(item.DirectionalAngle)
+ let plane_pci
+ let h = Number(item.AntHight)
+ if(item.frequencyRange == '1.8G'){
+ plane_pci = addPCIPlane(item,h-7,num,"#ff0000")
+ }else if(item.frequencyRange == '2.1G'){
+ plane_pci = addPCIPlane(item,h+7,num,"#00ff00")
+ }else{
+ plane_pci = addPCIPlane(item,h,num,"#0000ff")
+ }
+ PCI_position_layer.addGraphic(plane_pci)
+ }
+ }
+ }
+
+ },
+ error: function (request, textStatus) {
+
+ }
+ })
}
-
-
+
+
// 灏佽鏂规硶锛屽皢rru_info鑾峰彇鍒扮殑瀹忕珯鏁版嵁鍘婚噸
function unique(arr) {
- for ( var i = 0, len = arr.length; i < len; i++ ) {
- for ( var j = i + 1, len = arr.length; j < len; j++ ) {
- if (arr[i].SitenameCN === arr[j].SitenameCN||arr[i].SiteAddress === arr[j].SiteAddress) {
- arr.splice(j, 1 );
- j --; //姣忓埅闄や竴鍊嬫暩j鐨勫�煎氨娓�1
- len--; // j鍊兼笡灏忔檪len涔熻鐩告噳娓�1锛堟笡灏戝惊鐠版鏁革紝绡�鐪佹�ц兘锛�
- // console.log(j,len)
-
- }
- }
- }
- return arr;
+ for ( var i = 0, len = arr.length; i < len; i++ ) {
+ for ( var j = i + 1, len = arr.length; j < len; j++ ) {
+ if (arr[i].SitenameCN === arr[j].SitenameCN||arr[i].SiteAddress === arr[j].SiteAddress) {
+ arr.splice(j, 1 );
+ j --; //姣忓埅闄や竴鍊嬫暩j鐨勫�煎氨娓�1
+ len--; // j鍊兼笡灏忔檪len涔熻鐩告噳娓�1锛堟笡灏戝惊鐠版鏁革紝绡�鐪佹�ц兘锛�
+ // console.log(j,len)
+
+ }
+ }
+ }
+ return arr;
}
-
+
// 璋冭壊鐩樼綉鏍肩偣鍑讳簨浠讹紝鐐瑰嚮鍒扮殑棰滆壊瀵瑰ぇ妤兼ā鍨嬮鑹茶繘琛屾敼鍙�
function test_box(){
- console.log("鎴戝湪澶栬竟")
- doclick()
- }
+ console.log("鎴戝湪澶栬竟")
+ doclick()
+ }
function doclick(){
- console.log("鎴戝湪閲岄潰")
- var evt=getEvent();
- var element=evt.srcElement || evt.target;
- console.log(element.style.backgroundColor)
- if (element.tagName=="TD"){
- console.log(element)
- var bg=rgbToHex(element.style.backgroundColor);
- for(let i=0;i<model_list.length;i++){
- model_list[i].setStyle({
- color:bg,
- fill:true,
- shadows:Cesium.ShadowMode.ENABLED,
- colorBlendMode:Cesium.ColorBlendMode.HIGHLIGHT,
- colorBlendAmountEnabled : true ,
- colorBlendAmount:0.8
- })
- }
- return bg;
- }
- }
-
-
+ console.log("鎴戝湪閲岄潰")
+ var evt=getEvent();
+ var element=evt.srcElement || evt.target;
+ console.log(element.style.backgroundColor)
+ if (element.tagName=="TD"){
+ console.log(element)
+ var bg=rgbToHex(element.style.backgroundColor);
+ for(let i=0;i<model_list.length;i++){
+ model_list[i].setStyle({
+ color:bg,
+ fill:true,
+ shadows:Cesium.ShadowMode.ENABLED,
+ colorBlendMode:Cesium.ColorBlendMode.HIGHLIGHT,
+ colorBlendAmountEnabled : true ,
+ colorBlendAmount:0.8
+ })
+ }
+ return bg;
+ }
+ }
+
+
// 娣诲姞瀹忕珯澶栫殑PCI锛屼互闈㈢殑褰㈠紡灞曠幇
function addPCIPlane(item,h,heading,color){
- const primitive = new mars3d.graphic.PlaneEntity({
-
- position: [Number(item.Longitude),Number(item.Latitude),h],
- style: {
- plane: new Cesium.Plane(Cesium.Cartesian3.UNIT_X,10.0),
- // plane_normal: ,
- heading:heading,
- dimensions_x: 3.0,
- dimensions_y: 6.0,
- color: color,
- opacity: 0.4,
-
- // 楂樹寒鏃剁殑鏍峰紡锛堥粯璁や负榧犳爣绉诲叆锛屼篃鍙互鎸囧畾type:'click'鍗曞嚮楂樹寒锛夛紝鏋勯�犲悗涔熷彲浠penHighlight銆乧loseHighlight鏂规硶鏉ユ墜鍔ㄨ皟鐢�
- highlight: {
- opacity: 0.9
- },
-
- },
- popup:`<p>PCI:${item.PCI}</p>
- <p>Sitename:${item.SitenameCN}</p>
- <p>淇″彿:${item.frequencyRange}</p>
- <p>???:${item.EARFCN}</p>
- `,
- description:"鏂囧瓧"
- })
- // PCI_position_layer.addGraphic(primitive)
- return primitive
+ const primitive = new mars3d.graphic.PlaneEntity({
+
+ position: [Number(item.Longitude),Number(item.Latitude),h],
+ style: {
+ plane: new Cesium.Plane(Cesium.Cartesian3.UNIT_X,10.0),
+ // plane_normal: ,
+ heading:heading,
+ dimensions_x: 3.0,
+ dimensions_y: 6.0,
+ color: color,
+ opacity: 0.4,
+
+ // 楂樹寒鏃剁殑鏍峰紡锛堥粯璁や负榧犳爣绉诲叆锛屼篃鍙互鎸囧畾type:'click'鍗曞嚮楂樹寒锛夛紝鏋勯�犲悗涔熷彲浠penHighlight銆乧loseHighlight鏂规硶鏉ユ墜鍔ㄨ皟鐢�
+ highlight: {
+ opacity: 0.9
+ },
+
+ },
+ popup:`<p>PCI:${item.PCI}</p>
+ <p>Sitename:${item.SitenameCN}</p>
+ <p>淇″彿:${item.frequencyRange}</p>
+ <p>???:${item.EARFCN}</p>
+ `,
+ description:"鏂囧瓧"
+ })
+ // PCI_position_layer.addGraphic(primitive)
+ return primitive
}
-
-
-
-
+
+
+
+
// 娣诲姞璁惧瀹氫綅鐐�
function addMrPosition(){
- var mr_position_graphic = new mars3d.layer.GraphicLayer({
- pid:90,
- name:'璁惧瀹氫綅',
- show:false
- })
- map.addLayer(mr_position_graphic)
- $.ajax({
- type:'get',
- dataType:'json',
- async:true,
- url:'http://localhost:4500/dataservice/Bdata?bid=get_mr_correted',
- success:function(data){
- let datas = data.data.data
- console.log(data.data.data,"鑾峰彇鏁版嵁")
- for(let i=0;i<datas.length;i++){
- let item = datas[i]
- let height = finalHeight(Number(item.corr_height))
- var map_name_ = new mars3d.graphic.BillboardEntity({
- position: [Number(item.corr_lon), Number(item.corr_lat),height], // 妤兼爧浣嶇疆
- // position:[121.4623922,31.212190342686533,height],
- style: {
- image: 'img/end.png',
- scale:0.5,
- opacity:1,
- scaleByDistance_far:500,
- distanceDisplayCondition_far:500,
- scaleByDistance_farValue:0.5,
- scaleByDistance:true,
- visibleDepth:true,
- hasPixelOffset:false,
- distanceDisplayCondition:true,
- label:{
- text:item.index_,
- color:"#ffff00",
- font_size: 15,
- pixelOffsetY: -20,
- distanceDisplayCondition: true,
- distanceDisplayCondition_far: 1500,
- distanceDisplayCondition_near: 0
- }
- },
- popup:"缂栧彿锛�" +
- item["msisdn"] +
- "<br />鏃堕棿锛�" +
- item["id"] +
- "<br />鍚嶇О锛�" +
- item["name_"] +
- "<br/><p><a href='#' onclick='javascript:showHistoryPathDetail(" + item["msisdn"] + ",\"" + item["name_"] + "\",\"" + item["height"] + "\")' >杞ㄨ抗鏌ヨ</a></p>"
- })
- mr_points_list.push(map_name_)
- mr_position_graphic.addGraphic(map_name_)
- }
-
- }
- })
+ var mr_position_graphic = new mars3d.layer.GraphicLayer({
+ pid:90,
+ name:'璁惧瀹氫綅',
+ show:false
+ })
+ map.addLayer(mr_position_graphic)
+ $.ajax({
+ type:'get',
+ dataType:'json',
+ async:true,
+ url:'http://localhost:4500/dataservice/Bdata?bid=get_mr_correted',
+ success:function(data){
+ let datas = data.data.data
+ console.log(data.data.data,"鑾峰彇鏁版嵁")
+ for(let i=0;i<datas.length;i++){
+ let item = datas[i]
+ let height = finalHeight(Number(item.corr_height))
+ var map_name_ = new mars3d.graphic.BillboardEntity({
+ position: [Number(item.corr_lon), Number(item.corr_lat),height], // 妤兼爧浣嶇疆
+ // position:[121.4623922,31.212190342686533,height],
+ style: {
+ image: 'img/end.png',
+ scale:0.5,
+ opacity:1,
+ scaleByDistance_far:500,
+ distanceDisplayCondition_far:500,
+ scaleByDistance_farValue:0.5,
+ scaleByDistance:true,
+ visibleDepth:true,
+ hasPixelOffset:false,
+ distanceDisplayCondition:true,
+ label:{
+ text:item.index_,
+ color:"#ffff00",
+ font_size: 15,
+ pixelOffsetY: -20,
+ distanceDisplayCondition: true,
+ distanceDisplayCondition_far: 1500,
+ distanceDisplayCondition_near: 0
+ }
+ },
+ popup:"缂栧彿锛�" +
+ item["msisdn"] +
+ "<br />鏃堕棿锛�" +
+ item["id"] +
+ "<br />鍚嶇О锛�" +
+ item["name_"] +
+ "<br/><p><a href='#' onclick='javascript:showHistoryPathDetail(" + item["msisdn"] + ",\"" + item["name_"] + "\",\"" + item["height"] + "\")' >杞ㄨ抗鏌ヨ</a></p>"
+ })
+ mr_points_list.push(map_name_)
+ mr_position_graphic.addGraphic(map_name_)
+ }
+
+ }
+ })
}
function addpoint17(){
- graphicLayer17 = new mars3d.layer.GraphicLayer()
- map.addLayer(graphicLayer17)
-
-
+ graphicLayer17 = new mars3d.layer.GraphicLayer()
+ map.addLayer(graphicLayer17)
+
+
}
-
-
+
+
function addCustomLayers() {
- addPciModel();//PCI浣嶇疆
- openFloor();//鐟為噾澶фゼ
- addMrPosition();//璁惧瀹氫綅鐐�
- addpoint17();
-}
+ addPciModel();//PCI浣嶇疆
+ openFloor();//鐟為噾澶фゼ
+ addMrPosition();//璁惧瀹氫綅鐐�
+ addpoint17();
+}
\ No newline at end of file
--
Gitblit v1.9.1