gisviewer-vue3-arcgis 1.0.169 → 1.0.171
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/gis-map/gis-map.vue.d.ts +4 -4
- package/es/src/gis-map/gis-map.vue.mjs +105 -106
- package/es/src/gis-map/index.d.ts +2 -2
- package/es/src/gis-map/style/index.css +26 -0
- package/es/src/gis-map/utils/GreenWaveline.d.ts +68 -0
- package/es/src/gis-map/utils/holo-flow/index.d.ts +3 -2
- package/es/src/gis-map/utils/holo-flow/index.mjs +9 -6
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.mjs +120 -5
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.mjs +2 -120
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +3 -8
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +60 -77
- package/es/style.css +1 -1
- package/lib/src/gis-map/gis-map.vue.d.ts +4 -4
- package/lib/src/gis-map/gis-map.vue.js +1 -1
- package/lib/src/gis-map/index.d.ts +2 -2
- package/lib/src/gis-map/style/index.css +26 -0
- package/lib/src/gis-map/utils/GreenWaveline.d.ts +68 -0
- package/lib/src/gis-map/utils/holo-flow/index.d.ts +3 -2
- package/lib/src/gis-map/utils/holo-flow/index.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +3 -8
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -1
- package/package.json +1 -1
- package/es/_virtual/_plugin-vue_export-helper.mjs +0 -9
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue3.mjs +0 -4
- package/lib/_virtual/_plugin-vue_export-helper.js +0 -1
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue3.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("@arcgis/core/core/reactiveUtils"),d=require("@arcgis/core/geometry"),P=require("@arcgis/core/layers/GraphicsLayer"),w=require("./signal-holo-flow.js");function g(f){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const o in f)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(f,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>f[o]})}}return t.default=f,Object.freeze(t)}const m=g(u);class y extends w.default{constructor(t,o){super(t),this.stopLineLayer=new P,this.watchHandle=null,this.stopLineMap=new Map,this.countdownPanelProps=o,this.view.map.add(this.stopLineLayer)}async initializeLayer(){var p,c;console.time("初始化停止线图层");let t=(c=(p=this.mapConfig.holoFlow)==null?void 0:p.signal)==null?void 0:c.stopLineLayer;if(!t)return;t=this.mapConfig.assetsRoot+"/"+t,(await(await fetch(t)).json()).features.forEach(n=>{const{roadId:s,nodeId:e,angle:i,destinationPoint:a}=n.properties,{coordinates:l}=n.geometry,h=this.stopLineMap.get(e);h?h.set(s,{coord:l,panelPoint:a,angle:i}):this.stopLineMap.set(e,new Map([[s,{coord:l,panelPoint:a,angle:i}]]))}),console.timeEnd("初始化停止线图层")}getPanelScale(){const t=this.view.scale;let o=1;return t<1e3?o=1:t<2e3?o=.8:o=.4,o}async handleSignalData(t){this.watchHandle||(this.watchHandle=m.watch(()=>this.view.extent,()=>{const n=this.getPanelScale();for(const s of this.countdownPanelProps){n!==this.currentPanelScale&&(s.scale=n);const{mapPoint:e}=s,i=this.view.toScreen({type:"point",x:e[0],y:e[1]});s.position.left=i.x,s.position.top=i.y}this.currentPanelScale=n}));const o=t.crossId,r=this.stopLineMap.get(o);if(!r){console.log(`没有找到路口${o}`);return}const p=t.phaseCountDownList,c=new Map;for(const n of p){let s="";for(let l of n.roadIdList)if(l.startsWith("-")&&(l=l.slice(1)),r.has(l)){s=l;break}if(!s){console.log(`没有找到对应的进口道${o}--${s}`);continue}let e=c.get(s);if(e||(e={},c.set(s,e)),!n.direction){console.log(`没有找到对应的方向${o}--${JSON.stringify(n)}`);continue}const i=n.direction.toLowerCase(),a=n.color===1?"red":n.color===2?"yellow":"green";i==="u"?(e.uNumber=n.leftTime,e.uColor=a):i==="l"?(e.lNumber=n.leftTime,e.lColor=a):i==="s"?(e.sNumber=n.leftTime,e.sColor=a):i==="r"&&(e.rNumber=n.leftTime,e.rColor=a)}c.forEach((n,s)=>{const e=r.get(s);if(!e)return;const i=this.countdownPanelProps.find(a=>a.crossId===o&&a.roadId===s);if(i)i.lampStatus=n;else{const a=e.panelPoint,l=this.view.toScreen({type:"point",x:a[0],y:a[1]}),h=this.getPanelRotation(e.coord);this.countdownPanelProps.push({displayMode:"complex",crossId:o,roadId:s,mapPoint:a,stopLine:e.coord,position:{left:l.x,top:l.y},rotation:h,scale:this.getPanelScale(),lampStatus:n})}})}clearSignal(){var t;this.stopLineLayer.removeAll(),this.countdownPanelProps=[],(t=this.watchHandle)==null||t.remove(),this.watchHandle=null}getPanelRotation(t){const o=t[0],r=new d.Point({x:o[0],y:o[1],spatialReference:this.view.spatialReference}),p=this.view.toScreen(r),c=t[t.length-1],n=new d.Point({x:c[0],y:c[1],spatialReference:this.view.spatialReference}),s=this.view.toScreen(n),e=s.x-p.x,i=s.y-p.y;return Math.atan2(i,e)*(180/Math.PI)}}exports.default=y;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=(e,o)=>{const t=e.__vccOpts||e;for(const[r,s]of o)t[r]=s;return t};exports.default=u;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
|