Commit 75be738c by niuxiaolin

latest

parent 5ecc78f4
......@@ -3,7 +3,7 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --port 4321 --proxy--config proxy.json",
"start": "ng serve --port 8008 --proxy--config proxy.json",
"build": "ng build --prod --build-optimizer && npm run remove-to && npm run create && npm run copy-to ",
"remove-to": "rd /s /q D:\\projects\\supervise\\supervise\\src\\main\\resources\\static",
"create": "mkdir D:\\projects\\supervise\\supervise\\src\\main\\resources\\static",
......
......@@ -29,7 +29,7 @@
<div class="main">
<div class="left">
<fieldset>
<legend (click)="toHighWay()">高速公路:</legend>
<legend (click)="toHighWay()">高速公路</legend>
<div class="proj-info" *ngIf="!highShow">
<label>
......@@ -73,7 +73,7 @@
</fieldset>
<fieldset>
<legend>普通干线:</legend>
<legend>普通干线</legend>
<div class="proj-info" *ngIf="!normalShow">
<label>
......
......@@ -88,7 +88,7 @@ baidu-map{
box-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #4a83b4, 0 0 35px #4a83b4, 0 0 40px #4a83b4, 0 0 50px #4a83b4, 0 0 75px #4a83b4;
border-radius: 14px;
margin-bottom: 1.5em;
margin-bottom: 1.3em;
cursor: pointer;
width: 63px;
}
......@@ -129,7 +129,7 @@ fieldset{
padding: 0.5em;
background: #c1d9ef;
font-weight: bolder;
font-size: larger;
font-size: 19px;
border-radius: 8px;
&:hover{
background: #00daff33;
......
......@@ -481,11 +481,14 @@
var pathSimple = {
render: function (points, context) {
console.log(points)
//@author xiaolin 动线效果添加
render: function (points, cordId,context) {
if(window[cordId]){
clearTimeout(window[cordId]);
}
var index = 1;
var step = 2;
var step = 0.5;
var current = Object.assign({},points[0]);
var movStart = Object.assign({},points[0]);
var next = points[index];
......@@ -516,7 +519,7 @@
context.moveTo(moveStart.x,moveStart.y);
context.strokeStyle = '#fff';
context.fillStyle = '#fff';
context.lineWidth =5;
context.lineWidth =3;
context.lineTo(current.x,current.y);
//context.fillStyle = 'rgba(7,120,249,1)';
// context.fill();
......@@ -547,7 +550,7 @@
next = points[index];
}
// console.log(Math.sqrt(Math.pow((current.x - next.x), 2) + Math.pow((current.y - next.y), 2)))
if (Math.sqrt(Math.pow((current.x - next.x), 2) + Math.pow((current.y - next.y), 2)) > 1) {
if (Math.sqrt(Math.pow((current.x - next.x), 2) + Math.pow((current.y - next.y), 2)) > 0.5) {
drawLine(movStart,current);
current.x += getStep(movStart, next).stepx;
current.y += getStep(movStart, next).stepy;
......@@ -557,7 +560,7 @@
movStart =Object.assign({},points[index - 1]) ;
current =Object.assign({},movStart) ;
}
setTimeout(renderBody, 1);
window[cordId]=setTimeout(renderBody, 1);
}
renderBody();
......@@ -575,6 +578,7 @@
},
draw: function draw(context, data, options) {
var type = data.geometry.type;
var cordId = data.geometry.coordinates[0][0]+":"+data.geometry.coordinates[data.geometry.coordinates.length-1][1]
var coordinates = data.geometry._coordinates || data.geometry.coordinates;
var symbol = options.symbol || 'circle';
switch (type) {
......@@ -608,8 +612,8 @@
break;
case 'LineString':
this.render(coordinates.map(c => ({ x: c[0], y: c[1],r:20 })), context);
this.render(coordinates.map(c => ({ x: c[0], y: c[1],r:20 })),cordId, context);
// for (var j = 0; j < coordinates.length; j++) {
// var x = coordinates[j][0];
......
......@@ -3179,6 +3179,7 @@ window.BMAP_AUTHENTIC_KEY = "KhQqnL3owyAzqjr4zCGbWiiHwPFmKTD6";
return c
}
;function pa(a, b) {
if (/^http/.test(a)) return;//修改 屏蔽ak验证,若调用外部资源直接返回
if (b) {
var c = (1E5 * Math.random()).toFixed(0);
D._rd["_cbk" + c] = function(a) {
......
......@@ -44,8 +44,11 @@
background:transparent!important;
}
.label-panel{
padding:4px;
font-size: 16px;
padding: 4px;
font-size: 16px;
background: #2f5aa51f;
border-radius: 4px;
border: 1px solid wheat;
}
.label-panel2{
display: inline;
......@@ -271,4 +274,5 @@ legend{
}
.tooltiptextx{
color:white;
font-size:15px;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment