(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7f661caa"],{"0584":function(t,a,i){t.exports=i.p+"img/weijiaqiao.0d0a2e7a.jpg"},"0c25":function(t,a,i){t.exports=i.p+"img/luzhou.2588de15.jpg"},3433:function(t,a,i){"use strict";i.r(a);var e=function(){var t=this,a=t._self._c;return a("div",{ref:"canvasBox",style:{width:"100%",height:"100%",overflow:"hidden",position:"relative"}},[a("canvas",{ref:"mapCanvas",style:{width:"100%",height:"100%"}})])},n=[],h=i("40e1");function o(t,a){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);a&&(e=e.filter((function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),i.push.apply(i,e)}return i}function l(t){for(var a=1;an){var o=h*a.width,r=(o-a.height)/2,s=a.minY-r;s<0&&(s=0);a.maxY;t.drawImage(this.cacheCanvas,a.minX,s,a.width,o,0,0,this.width,this.height)}else{var g=a.height/h,m=(g-a.width)/2,c=a.minX-m;t.drawImage(this.cacheCanvas,c,a.minY,g,a.height,0,0,this.width,this.height)}}function d(t){if(!(a.width>t||a.height>t)){var n=a.height/a.width,h=a.width,o=a.height;if(n>1){var l=t/a.height;h=l*a.width,o=t}else{var r=t/a.width;h=t,o=r*a.height}var s=(h-a.width)/2;a.minX-=s;var g=!1;a.minX<0&&(a.minX=0,a.maxX=h,g=!0),g||(a.maxX+=s,a.maxX>i&&(a.maxX=i,a.minX=a.maxX-h));var m=(o-a.height)/2;a.minY-=m,g=!1,a.minY<0&&(a.minY=0,a.maxY=o,g=!0),g||(a.maxY+=m,a.maxY>e&&(a.maxY=e,a.minY=a.maxY-o)),a.width=h,a.height=o}}},renderToCache:function(t){this.cacheCanvas||(this.cacheCanvas=document.createElement("canvas"));var a=this.cacheCanvas,i=this.imageData.width,e=this.imageData.height;a.width=i,a.height=e;var n=a.getContext("2d");n.fillStyle="green",n.fillRect(0,0,i,e),this.canvasImg&&n.drawImage(this.canvasImg,0,0,i,e);var h={minX:i,maxX:0,minY:e,maxY:0};if(0==this.mapLeaderData.length&&0==this.mapPilotData.length&&!this.leader||this.leader&&0==this.mapLeaderData.length)return h.minX=h.minY=0,h.maxX=h.minX+i,h.maxY=h.minY+e,h.width=i,h.height=e,void(this.wrapbox=h);var o=this;function l(t,a){n.lineWidth=2,n.beginPath(),n.strokeStyle=a,t.map((function(t,a){var l=!0;t.forEach((function(t,a){var r=o.longtitude2px(t.longtitude),s=o.latitude2px(t.latitude);r<0||r>i||s<0||s>e||(rh.maxX&&(h.maxX=r),sh.maxY&&(h.maxY=s),l?(n.moveTo(r,s),l=!1):n.lineTo(r,s))})),n.stroke()}))}l(this.mapLeaderData,"#2cfefe"),l(this.mapPilotData,"#3aa1fc"),h.width=h.maxX-h.minX,h.height=h.maxY-h.minY,h.width<4&&h.height<4&&(h.minX=h.minY=0,h.maxX=h.minX+i,h.maxY=h.minY+e,h.width=i,h.height=e),this.wrapbox=h},updateLeader:function(t,a){var i=this;this.mapID=t,this.mapLeaderData=a||[],this.mapPilotData=[];var e=h["a"].filter((function(t){return t.id==i.mapID}));if(this.imageData=e[0],this.imageData){this.initlonlatScale();var n=new Image,o=this;n.onload=function(){o.renderToCache(!0),o.render()},n.src=this.imageData.url,this.canvasImg=n}else alert("找不到场景ID:".concat(this.mapID,"的配置"))},update:function(t,a,i){var e=this;this.mapID=t,this.mapLeaderData=a||[],this.mapPilotData=i||[];var n=h["a"].filter((function(t){return t.id==e.mapID}));if(this.imageData=n[0],this.imageData){this.initlonlatScale();var o=new Image,l=this;o.onload=function(){l.renderToCache(),l.render()},o.src=this.imageData.url,this.canvasImg=o,this.renderToCache()}else alert("找不到场景ID:".concat(this.mapID,"的配置"))},initlonlatScale:function(){var t=this.imageData,a=t.rightTop.lon-t.leftBottom.lon,i=t.rightTop.lat-t.leftBottom.lat;a=t.width/a,i=t.height/i,this.lonlatScale={wScale:a,hScale:i}},formatAllData:function(){var t=this,a=this.origin,i=this.scale,e=this.mapLeaderData,n=this.mapPilotData;e.length>0&&e.map((function(e,n){e.forEach((function(e){var n=t.lonlatToPX(e.longtitude,"lon"),h=t.lonlatToPX(e.latitude,"lat");n=Math.abs(n-a.x)*i.scaleX,h=Math.abs(h-a.y)*i.scaleY,e.x=n,e.y=h}))})),this.leaderCanvasData=e,n.length>0&&(n.map((function(e,n){e.forEach((function(e){var n=t.lonlatToPX(e.longtitude,"lon"),h=t.lonlatToPX(e.latitude,"lat");n=Math.abs(n-a.x)*i.scaleX,h=Math.abs(h-a.y)*i.scaleY,e.x=n,e.y=h}))})),this.pilotCanvasData=n),this.drawLineCanvas()},drawLineCanvas:function(){var t=this.$refs.mapCanvas;t.width=this.width,t.height=this.height,t=t.getContext("2d");var a=this.leaderCanvasData,i=this.pilotCanvasData;0==a.length&&0==i.length?t.drawImage(this.canvasImg,0,0,this.imageData.width,this.imageData.height,0,0,this.width,this.height):t.drawImage(this.canvasImg,this.origin.x,this.origin.y,this.lineCanvas.width,this.lineCanvas.height,0,0,this.width,this.height),t.lineWidth=2,a.length>0&&(t.beginPath(),t.strokeStyle="#2cfefe",a.map((function(a,i){a.map((function(a,i){0==i?t.moveTo(a.x,a.y):t.lineTo(a.x,a.y)}))})),t.stroke()),i.length>0&&(t.beginPath(),t.strokeStyle="#3aa1fc",i.map((function(a,i){a.map((function(a,i){0==i?t.moveTo(a.x,a.y):t.lineTo(a.x,a.y)}))})),t.stroke())},getSortArrData:function(t){var a=-180,i=-180,e=180,n=180;return t.forEach((function(t){t.forEach((function(t){t.longtitude>a&&(a=t.longtitude),t.latitude>i&&(i=t.latitude),t.longtitude