| | |
| | | var arrowLength;//两点间箭头长度 |
| | | if (distance <= 5) { |
| | | arrowLength = 0; |
| | | } else if (distance > 5 && distance <= 10) { |
| | | } else if (distance > 5 && distance <= 20) { |
| | | arrowLength = 2; |
| | | } else if (distance <= 100) { |
| | | } else if (distance > 20 && distance <= 50) { |
| | | arrowLength = 3; |
| | | } else if (distance > 50 && distance <= 100) { |
| | | arrowLength = 5; |
| | | } else if (distance > 100 && distance <= 200) { |
| | | arrowLength = 10; |
| | |
| | | startPoint, |
| | | endPoint |
| | | ], |
| | | {strokeColor: "#5298FF", strokeWeight: 5, strokeOpacity: 1} |
| | | {strokeColor: "#5298FF", strokeWeight: 4, strokeOpacity: 1} |
| | | ); |
| | | if (i < trackPoints.length - 1 && trackPoints.length > 1) { |
| | | map.addOverlay(polyline);// 画两点间线 |
| | |
| | | if (distance <= 1.9) { |
| | | if (coincidentPoints.indexOf(i) == -1) { |
| | | coincidentPoints.push(i); |
| | | winfowText +='<p id="' + i + '" onclick="openInfo(this)" onmousemove="red(this.id)" onmouseout="black(this.id)">' + "时间:" + sensorInfo[i].时间 + "</p>"; |
| | | } |
| | | coincidentPoints.push(j); |
| | | count++; |
| | |
| | | } |
| | | |
| | | if (coincidentPoints.indexOf(i) > -1) { |
| | | winfowText = '<p id="' + i + '" onclick="openInfo(this)" onmousemove="red(this.id)" onmouseout="black(this.id)">' + "时间:" + sensorInfo[i].时间 + "</p>" + winfowText + "</div>"; |
| | | winfowText = winfowText + "</div>"; |
| | | } else { |
| | | for (var prop in sensorInfo[i]) { |
| | | if (sensorInfo[i].hasOwnProperty(prop)) { |
| | |
| | | var pointArrow1 = map.pixelToPoint(new BMap.Pixel(pixelX1, pixelY1)); |
| | | var pointMiddle = map.pixelToPoint(new BMap.Pixel(poMiddleX, poMiddleY)); |
| | | var Arrow = new BMap.Polyline([pointArrow, pointMiddle, pointArrow1], |
| | | {strokeColor: "#5298FF", strokeWeight: 5, strokeOpacity: 1}); |
| | | {strokeColor: "#5298FF", strokeWeight: 4, strokeOpacity: 1}); |
| | | map.addOverlay(Arrow); |
| | | } |
| | | }; |