Commit 75be738c by niuxiaolin

latest

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