| | |
| | | for (var i = 0; i < gps_node_list1.length; i++) { |
| | | //var zhuangtaia = gps_node_list1[i][4]; |
| | | if ((bm_offView == '1' && gps_node_list1[i][4] == '1') || (bm_offView == '0')) { |
| | | if (current_node_list[gps_node_list1[i][0]] == null) { |
| | | current_node_list[gps_node_list1[i][0]] = new Queue(); |
| | | } |
| | | var point = new BMap.Point(new Number(gps_node_list1[i][1]), new Number(gps_node_list1[i][2])); |
| | | points.push(point); |
| | | gps_node_list.push(gps_node_list1[i]); |
| | | if (current_node_list[gps_node_list1[i][0]] == null) { |
| | | current_node_list[gps_node_list1[i][0]] = new Queue(); |
| | | } |
| | | var point = new BMap.Point(new Number(gps_node_list1[i][1]), new Number(gps_node_list1[i][2])); |
| | | points.push(point); |
| | | gps_node_list.push(gps_node_list1[i]); |
| | | } |
| | | }; |
| | | gps_node_list1 = null |
| | |
| | | } |
| | | |
| | | function baidumm(data) { |
| | | bm.clearOverlays(); |
| | | for (var i = 0; i < gps_node_list.length; i++) { |
| | | //var zhuangtaia = getstatus(gps_node_list[i][0]); |
| | | if (current_node_list[gps_node_list[i][0]].size() > 0) { |
| | | old_mark = current_node_list[gps_node_list[i][0]].front(); |
| | | current_node_list[gps_node_list[i][0]].dequeue(); |
| | | bm.removeOverlay(old_mark);//清除上一个 |
| | | // if (current_node_list[gps_node_list[i][0]].size() > 0) { |
| | | // old_mark = current_node_list[gps_node_list[i][0]].front(); |
| | | // current_node_list[gps_node_list[i][0]].dequeue(); |
| | | // bm.removeOverlay(old_mark);//清除上一个 |
| | | // old_mark = null; |
| | | // } |
| | | marker = new BMap.Marker(data[i], { icon: myIcon }); |
| | | bm.addOverlay(marker); |
| | | current_node_list[gps_node_list[i][0]].enqueue(marker); |
| | | if (bm_viewTagid == "1") { |
| | | var aaaaa = gps_node_list[i][15] + " " + gps_node_list[i][0] |
| | | var tagid = new BMap.Label(aaaaa, { offset: new BMap.Size(20, -30) }); |
| | | tagid.setStyle({ |
| | | color: "#fff", |
| | | fontSize: "14px", |
| | | borderRadius: "5px", |
| | | padding: "5px 5px", |
| | | border: "0", |
| | | backgroundColor: "#32CD32", |
| | | transform: 'translateX(-50%)', |
| | | }); |
| | | marker.setLabel(tagid); //添加label-tagid |
| | | tagid = null; |
| | | } |
| | | //if ((bm_offView == '1' && zhuangtaia == '1') || (bm_offView == '0')) { |
| | | marker = new BMap.Marker(data[i], { icon: myIcon }); |
| | | bm.addOverlay(marker); |
| | | current_node_list[gps_node_list[i][0]].enqueue(marker); |
| | | |
| | | if (bm_viewTagid == "1") { |
| | | var aaaaa = gps_node_list[i][15] + " " + gps_node_list[i][0] |
| | | var tagid = new BMap.Label(aaaaa, { offset: new BMap.Size(20, -30) }); |
| | | tagid.setStyle({ |
| | | color: "#fff", |
| | | fontSize: "14px", |
| | | borderRadius: "5px", |
| | | padding: "5px 5px", |
| | | border: "0", |
| | | backgroundColor: "#32CD32", |
| | | transform: 'translateX(-50%)', |
| | | }); |
| | | marker.setLabel(tagid); //添加label-tagid |
| | | tagid = null; |
| | | } |
| | | if (bm_tagZb == "1") { |
| | | var zuobiao = new BMap.Label(gps_node_list[i][1] + ',' + gps_node_list[i][2], { offset: new BMap.Size(20, +40) }); |
| | | zuobiao.setStyle({ |
| | | transform: 'translateX(-50%)', |
| | | backgroundColor: "0.000000000001", |
| | | border: 'none' |
| | | }); |
| | | marker.setLabel(zuobiao); |
| | | zuobiao = null; |
| | | } |
| | | if (bm_viewPower == "1") { |
| | | var dianliang = new BMap.Label("设备电量" + gps_node_list[i][12], { offset: new BMap.Size(20, +55) }); |
| | | dianliang.setStyle({ |
| | | transform: 'translateX(-50%)', |
| | | backgroundColor: "0.000000000001", |
| | | border: 'none' |
| | | }); |
| | | marker.setLabel(dianliang); |
| | | dianliang = null; |
| | | } |
| | | marker = null; |
| | | //} |
| | | if (bm_tagZb == "1") { |
| | | var zuobiao = new BMap.Label(gps_node_list[i][1] + ',' + gps_node_list[i][2], { offset: new BMap.Size(20, +40) }); |
| | | zuobiao.setStyle({ |
| | | transform: 'translateX(-50%)', |
| | | backgroundColor: "0.000000000001", |
| | | border: 'none' |
| | | }); |
| | | marker.setLabel(zuobiao); |
| | | zuobiao = null; |
| | | } |
| | | if (bm_viewPower == "1") { |
| | | var dianliang = new BMap.Label("设备电量" + gps_node_list[i][12], { offset: new BMap.Size(20, +55) }); |
| | | dianliang.setStyle({ |
| | | transform: 'translateX(-50%)', |
| | | backgroundColor: "0.000000000001", |
| | | border: 'none' |
| | | }); |
| | | marker.setLabel(dianliang); |
| | | dianliang = null; |
| | | } |
| | | } |
| | | gps_node_list = null; |
| | | }; |