From 92d5a2511ed8c40cfffc960d7c3556db2e09a485 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 22 Apr 2021 20:34:20 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/jfpt-Vue
---
public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js | 81 +++++++++++++++++++++-------------------
1 files changed, 42 insertions(+), 39 deletions(-)
diff --git a/public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js b/public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js
index 208b075..f95b136 100644
--- a/public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js
+++ b/public/map/widgets/supervisoryMap/FlareClusterLayer_v3.js
@@ -167,7 +167,7 @@
}
}
},
- _mapClick: function (e) {//地图全局点击事件 标记不能点击
+ _mapClick: function (e) { //地图全局点击事件 标记不能点击
// console.log('地图全局点击事件');
if (!e.target) {
@@ -278,7 +278,7 @@
// area: 'auto',
offset: posi,
skin: 'flare',
- closeBtn: 0,//关闭按钮,可通过配置1和2来展示,0关闭
+ closeBtn: 0, //关闭按钮,可通过配置1和2来展示,0关闭
content: [url, 'no'],
resize: false,
scrollbar: false,
@@ -295,7 +295,7 @@
, endy = null;
layero[0].style.position = 'absolute';
- downs = document.onmousedown = () => {//鼠标按下事件
+ downs = document.onmousedown = () => { //鼠标按下事件
// console.log('down');//start
// downs = document.onmousedown = null;
var mx = window.event.clientX//鼠标初始位置
@@ -359,11 +359,11 @@
}
},
- end: function () {//关闭事件
+ end: function () { //关闭事件
}
});
- that.layuiLayer.open({//第二个iframe
+ that.layuiLayer.open({ //第二个iframe
title: '',
type: 2,
shadeClose: true,
@@ -376,13 +376,13 @@
offset: 'r',
skin: 'flare',
isOutAnim: false,
- closeBtn: 0,//关闭按钮,可通过配置1和2来展示,0关闭
+ closeBtn: 0, //关闭按钮,可通过配置1和2来展示,0关闭
content: ['./popup/html/FlareClusterLayer_v3 copy.html'],
resize: false,
scrollbar: false,
// tipsMore: true, //允许多个tipe
// content: num,
- success: function (layero, index) {//成功后添加全局点击关闭
+ success: function (layero, index) { //成功后添加全局点击关闭
// var z = document.onclick = ()=>{
// parent[0].layer.close(index);
// // // parent[0].layer.close(+index + 1);
@@ -396,15 +396,14 @@
})
})
}
- if (mySelf.onceTimeMethod == null) {//防抖.限制时间内点击次数,否则会造成不能正确销毁前一个弹窗
+ if (mySelf.onceTimeMethod == null) { //防抖.限制时间内点击次数,否则会造成不能正确销毁前一个弹窗
var offsetMy = [+evt.screenY - 300 + 'px', +evt.screenX - 172.5 + 'px'];
// console.log(evt.screenY);
fCard(offsetMy, setdata);
mySelf.onceTimeMethod = setTimeout(() => {
mySelf.onceTimeMethod = null;
}, mySelf.onceTime);
- } else {
- };
+ } else {};
@@ -900,12 +899,16 @@
this.singles.push(single);
delete single.graphic;
var symbol;
- console.log(single.onlineStatus, '移动事件');
- if (single.onlineStatus == 1) {
- symbol = new esri.symbol.PictureMarkerSymbol("./images/zx-jingbao.png", 40, 40);
+ if (single.jtype == 1) {
+ symbol = new esri.symbol.PictureMarkerSymbol("./images/yj-jingbao.png", 40, 40);
} else {
- symbol = new esri.symbol.PictureMarkerSymbol("./images/dx-jingbao.png", 40, 40);
+ if (single.onlineStatus == 1) {
+ symbol = new esri.symbol.PictureMarkerSymbol("./images/zx-jingbao.png", 40, 40);
+ } else {
+ symbol = new esri.symbol.PictureMarkerSymbol("./images/dx-jingbao.png", 40, 40);
+ }
}
+
var point = new Point(single[this.xPropertyName], single[this.yPropertyName], this.spatialRef);
var attributes = lang.clone(single);
var graphic = new Graphic(point, symbol, attributes, null);
@@ -998,11 +1001,11 @@
//add a text element for the label to display the count and add to the group
var shapeCenter = this._getShapeCenter(cluster.graphicShape);
var textShape = groupShape.createText({
- x: shapeCenter.x,
- y: shapeCenter.y + (this.textSymbol.font.size / 2 - 2),
- text: cluster.clusterCount,
- align: 'middle'
- })
+ x: shapeCenter.x,
+ y: shapeCenter.y + (this.textSymbol.font.size / 2 - 2),
+ text: cluster.clusterCount,
+ align: 'middle'
+ })
.setFont({
size: this.textSymbol.font.size,
family: this.textSymbol.font.family,
@@ -1126,10 +1129,10 @@
//create a transparent circle that contains the boundary of the flares, this is to make sure the mouse events don't fire moving in between flares
var conCircleRadius = (center.x - (bbox.x - radius - buffer)) + radius; //get the radius of the circle to contain everything
var containerCircle = groupShape.createCircle({
- cx: center.x,
- cy: center.y,
- r: conCircleRadius
- })
+ cx: center.x,
+ cy: center.y,
+ r: conCircleRadius
+ })
//.setStroke({ width: 1, color: "000" })
.setFill(new Color([0, 0, 0, 0]));
containerCircle.rawNode.setAttribute("class", "flare-object cluster-object");
@@ -1430,11 +1433,11 @@
var textShapes = [];
for (var i = 0, len = lines.length; i < len; i++) {
var textShape = tooltipGroup.createText({
- x: xPos,
- y: yPos + (i * 10),
- text: lines[i],
- align: 'middle'
- })
+ x: xPos,
+ y: yPos + (i * 10),
+ text: lines[i],
+ align: 'middle'
+ })
.setFill("#000")
.setFont({
size: 8,
@@ -1448,12 +1451,12 @@
var rectPadding = 2;
var textBox = tooltipGroup.getBoundingBox();
var rectShape = tooltipGroup.createRect({
- x: textBox.x - rectPadding,
- y: textBox.y - rectPadding,
- width: textBox.width + (rectPadding * 2),
- height: textBox.height + (rectPadding * 2),
- r: 0
- })
+ x: textBox.x - rectPadding,
+ y: textBox.y - rectPadding,
+ width: textBox.width + (rectPadding * 2),
+ height: textBox.height + (rectPadding * 2),
+ r: 0
+ })
.setFill(new Color([255, 255, 255, 0.9]))
.setStroke({
color: "#000",
@@ -1589,11 +1592,11 @@
//Have to add the flare text after the flare group animation otherwise Edge just reloads the page and dies for some reason?
if (this.shape.flareText) {
var flareText = this.shape.createText({
- x: this.shape.flareText.location.x,
- y: this.shape.flareText.location.y,
- text: this.shape.flareText.text,
- align: 'middle'
- })
+ x: this.shape.flareText.location.x,
+ y: this.shape.flareText.location.y,
+ text: this.shape.flareText.text,
+ align: 'middle'
+ })
.setFill(layer.textSymbol.color)
.setFont({
size: this.shape.flareText.textSize,
--
Gitblit v1.9.3