@pggis/pg-sdk 5.1.14 → 5.1.15
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/dist/index.js +5 -5
- package/dist/pggis.min.js +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* 盘古地理信息系统 PanGu Gis
|
|
3
3
|
* PanGu Gis For Cesium SDK
|
|
4
4
|
*
|
|
5
|
-
* 版本信息:5.1.
|
|
6
|
-
* 编译日期:2025-10-
|
|
5
|
+
* 版本信息:5.1.15
|
|
6
|
+
* 编译日期:2025-10-24
|
|
7
7
|
* 版权所有:Copyright by PanGu Gis http://www.pggis.com
|
|
8
8
|
* 使用单位:智企华章
|
|
9
9
|
*/
|
|
@@ -250,7 +250,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAAA0CAYAAAAXBNP2AAAACXBIWXMAAA
|
|
|
250
250
|
* @property {string} IMG_PARTICLES - base64编码的粒子图像数据
|
|
251
251
|
* @license MIT
|
|
252
252
|
* @copyright © 2025 Company Name
|
|
253
|
-
*/var $c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjExQTg0NDEyMDEzQjExRUFBNDhBRjhGMUMzOUUyNTU0IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjExQTg0NDEzMDEzQjExRUFBNDhBRjhGMUMzOUUyNTU0Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTFBODQ0MTAwMTNCMTFFQUE0OEFGOEYxQzM5RTI1NTQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTFBODQ0MTEwMTNCMTFFQUE0OEFGOEYxQzM5RTI1NTQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz41vRwAAAAE90lEQVR42uydyW4UMRCG3T2dgYSAEGs4sp44cCJBcGUJbwCvALwWPAI8ABwAiUVwgLBdkEikJEiAGMhkZqhfU1aa1sy0g+yaJPyWSupOpPjz0uVyucrJer2eG2fJ3ZgLAQhAgC0PgN8XIlkqgGLE75oih0WmRVZEvop0rHog18rnRe6IzInsthyCXFt+TuSKyGmRXZZDgK5eFrkv8l7kiUhrxN/JSo3pigSvcNmI1bCh3b5LK2+NqHyvyEF9x3z5HgqRRViOAXhW5JrCoNdei/y20gMYxhmRSyIXRY6JTMT4DENLW+SdyD19x/NajDmwmYIW79Hnn+MA4GJEAAIQgABJbMJB+n5Sl9zWZvR9DABUfkJkVt8fi3zUldAEoKl24Y2S1fPZEmBdZFHkkb4vxTLRQ5djbyUf0ncYrD/UADUB8MZno2Q19yx7gIqIAAQgAAEIQIAtYZT+85LvRnjQCoPKR3rQUgN4Y3ZeK30g8qps0qeeAzDn4TWD9+ySG+BBS90DaGnVg9a2tgnR4il9/jkOACoiAhCAAASIZpAAFl6yulO0JACo/IDrn6CedP1zxOciv6wAYNnAP3RVBeWtJQCWzG8iL/X9g4vkqNzMctzUXtintt2KM/aS+bmQaY90rb8CF6tSKiICEIAABCAAAQiwbfcFIWVCbUcc9bZDLKiYAKj4uOv7Bb+ILLj+8W7PCgC7Jhzv44Qdh9yrru8V61jPgd645gD2io+15RiC5ZA5ENNPmGmDmtrta9YAVEQE2FlrQUM/J6efU8cSAD87ojodBaccS6kgiiErGiq/qe93XT+3oGU5BJnbyKrIUs6BQZoQUEcrQ7CYagiGqeKiMgnXLXsg5uJUm/RQJKy8fGS7PMw6SgVQPrJFGZr0kCfUL/7IFjIzrLGpemBQ0kPbehL6I9vMjUh6oEVEAAIQgAAEIAABdpyj0qcK71YrqGUJANNrv+sHOcAiRpDDM1cTY1BEHk7kqyP/2Ac5vLEEQEG8aDnIoTb5ObZRWg5ywG5o1dX4ClNYxT7IISgJPsXGpLut9MCWU0S5bqkmdAa3LQEwcZDAfkZ3tthQfkwNkVeeD6kiuaUabcp6DpS9YyalrAdQ8bT1EFQVUabarND9fNuyB2gREYAABCAAAQhAAAIQoM770UgBXARCIr/koDogVlzgrWuxemBKd0m4JnBed0+5ZQ9gn3BK5LK+P4y5ewoB8DFiKO91COLFfwVuTCZV1hSoYw1APZCsFIkbN1Haaa87wwiKQe6eT27AEX6esPVVd8/kOOdAz/oz9FE0p+uGIKUeqE5C8xgSKiICEIAABCAAAQhAAAIQgAAEIAABCECA6AA+sbkREyDUUYlKD6ggZwzRkr8tewBhusisv+0in5qE/hFchoZTE0TL4p8sTbtIpyahQ4Ag5fKpSVBmfdDECvQTZjoM0U9N6KgkwH9xY7PXpPiCmq5yuaLVldHIO7jgNi5XfOEhCqNh9udHV/RnC5YAUDTftdV4/ivvwEoRVS9XXPWa1FIT5ird8jpSB+BDN3rO8AaGMnGy0I0QRYTvdk6NkOsucuhGCMAgI8Q0isaHbmAevNMhiD4P6iZhstANGiQE2PEGCRo2NcgAsQDwKnxWFdlT17/duWU1BJmuHz6A5bwbEsCScgh+qAHit3Jr1oooOPExdRBLbeJjSpuwuy30AAH+CDAAPH5ltESNYl4AAAAASUVORK5CYII=";var P_={color:r.Color.ORANGE},Ia=class extends x{constructor(e,i,s,a){super(),this._center=v.parsePosition(e),this._length=i||100,this._topRadius=s||1,this._bottomRadius=a||50,this._delegate=new r.PrimitiveCollection,this._style={...P_},this._state=_.INITIALIZED}get type(){return x.getOverlayType("light-cylinder-primitive")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._updatePrimitives()}get length(){return this._length}set length(e){this._length=e,this._updatePrimitives()}get topRadius(){return this._topRadius}set topRadius(e){this._topRadius=e,this._updatePrimitives()}get bottomRadius(){return this._bottomRadius}set bottomRadius(e){this._bottomRadius=e,this._updatePrimitives()}_computeEllipsePositions(e,i){let s=r.EllipseGeometryLibrary.computeEllipsePositions({center:y.transformWGS84ToCartesian(e),semiMajorAxis:i,semiMinorAxis:i,rotation:0,granularity:.005},!1,!0),a=r.Cartesian3.unpackArray(s.outerPositions);return a.push(a[0]),a}_createCylinderInstance(e,i,s){let a=i.slice(),o=i.length,n=2*o,h=[],c=1/(o-1),d=[],p=[],f=(u,m=0)=>{let E=r.Cartographic.fromCartesian(u);return E.height+=m,r.Cartographic.toCartesian(E)};for(let u=0;u<o;u++){p.push(f(e[u],s)),h.push(u*c,0);let m=u+1,E=(u+1)%o,w=n-m;d.push(w-1,w,u),d.push(u,E,w-1)}for(let u in p)a.push(p[o-u-1]),h.push(1-u*c,1);let g=r.PolygonGeometry.createGeometry(new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(a),perPositionHeight:!0}));return g.indices=d,g.attributes.st.values=h,new r.GeometryInstance({geometry:g})}_getCircleImage(){let e=document.createElement("canvas");e.width=512,e.height=512;let i=e.getContext("2d");return i.fillStyle="rgba(255,255,255,0)",i.strokeStyle="rgba(255, 255, 255,255)",i.setLineDash([50,50]),i.lineWidth=30,i.beginPath(),i.arc(256,256,150,0,Math.PI*2,!0),i.stroke(),i.restore(),e}_getParticlesImage(e){let i=document.createElement("canvas");i.width=64,i.height=256;let s=i.getContext("2d");return s.clearRect(0,0,64,256),s.drawImage(e,0,0),s.drawImage(e,33,0),i}_updatePrimitives(){this._delegate.removeAll();let e=this._center.alt===0,i=this._computeEllipsePositions(this._center,this._topRadius),s=this._computeEllipsePositions(this._center,this._bottomRadius*.7),a=this._computeEllipsePositions(this._center,this._bottomRadius),o={geometryInstances:new r.GeometryInstance({geometry:new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(this._computeEllipsePositions(this._center,this._bottomRadius*2)),perPositionHeight:!e}),asynchronous:!1})},n=e?new r.GroundPrimitive(o):new r.Primitive(o);n.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CircleRingType,{color:this._style.color})});let h=e?new r.GroundPrimitive(o):new r.Primitive(o);h.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});let c=new r.Primitive({geometryInstances:this._createCylinderInstance(i,s,this._length),appearance:new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});e?r.GroundPrimitive.initializeTerrainHeights().then(()=>{this._delegate.add(n),this._delegate.add(h),this._delegate.add(c)}):(this._delegate.add(n),this._delegate.add(h),this._delegate.add(c)),r.Resource.fetchImage({url:$c}).then(d=>{let p=new r.Primitive({geometryInstances:this._createCylinderInstance(i,a,this._length),appearance:new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CylinderParticlesType,{color:this._style.color,image:this._getParticlesImage(d)})}),asynchronous:!1});this._delegate.add(p)})}_mountedHook(){this.center=this._center}update(e){this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(T.merge(this._style,e),this)}destroy(){return r.destroyObject(this)}};x.registerType("light-cylinder-primitive");var ed=Ia;var La=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._modelUrl=i,this._delegate=r.Model.fromGltfAsync({url:i}),this._modelEvent=new Er(this._delegate),this._state=_.INITIALIZED}get type(){return x.getOverlayType("model_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e);let i=y.transformWGS84ToCartesian(this._position);this._delegate.then(s=>{s.modelMatrix=r.Transforms.headingPitchRollToFixedFrame(i,new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))})}get modelUrl(){return this._modelUrl}set modelUrl(e){this._modelUrl=e,this._delegate=r.Model.fromGltfAsync({url:e,...this._style}),this.position=this._position}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(T.merge(this._style,e),this._delegate.then(i=>{T.merge(i,e)}),this)}on(e,i,s){return this._overlayEvent.on(e,i,s||this),this._modelEvent.on(e,i,s||this),this}off(e,i,s){return this._overlayEvent.off(e,i,s||this),this._modelEvent.off(e,i,s||this),this}};x.registerType("model_primitive");var td=La;var id={pixelSize:8,outlineColor:r.Color.BLUE,outlineWidth:2},Da=class extends x{constructor(e){super(),this._position=v.parsePosition(e),this._delegate={position:void 0},this._state=_.INITIALIZED}get type(){return x.getOverlayType("point_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}_mountedHook(){this.position=this._position,T.merge(this._delegate,id,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,T.merge(this._style,e),T.merge(this._delegate,id,this._style),this)}};x.registerType("point_primitive");var rd=Da;var Ra=class extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate={positions:[]},this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_primitive")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get center(){return Oe(this._positions)}get distance(){return ce(this._positions)}_mountedHook(){this.positions=this._positions}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate,e),this)}};x.registerType("polyline_primitive");var sd=Ra;var Oa=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._radius=i,this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("scan_circle_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.geometryInstances.geometry=new r.EllipseGeometry({center:y.transformWGS84ToCartesian(this._position),semiMajorAxis:this._radius,semiMinorAxis:this._radius})}get radius(){return this._radius}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry.semiMajorAxis=this._radius,this._delegate.geometryInstances.geometry.semiMinorAxis=this._radius}_setAppearance(){var e,i;this._style&&(this._delegate.appearance=new r.MaterialAppearance({material:r.Material.fromType("CircleScan",{color:((e=this._style)==null?void 0:e.color)||r.Color.WHITE,speed:((i=this._style)==null?void 0:i.speed)||10})}))}_mountedHook(){this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(T.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("scan_circle_primitive");var ad=Oa;var ka=class extends x{constructor(e,i=1){super(),this._positions=v.parsePositions(e),this._width=i,this._delegate=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("trail_line_primitive")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=new r.PolylineGeometry({positions:y.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}_setAppearance(){var e,i;this._delegate.appearance=new r.PolylineMaterialAppearance({material:r.Material.fromType("PolylineTrail",{color:((e=this._style)==null?void 0:e.color)||new r.Color(1,0,0,.7),speed:((i=this._style)==null?void 0:i.speed)||5})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(T.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("trail_line_primitive");var od=ka;var Na=class extends x{constructor(e,i){super(),this._positions=v.parsePositions(e),this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._video=i,this._state=_.INITIALIZED}get type(){return x.getOverlayType("video_primitive")}get positions(){return this._positions}set positions(e){var i,s,a,o;this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=r.PolygonGeometry.fromPositions({positions:y.transformWGS84ArrayToCartesianArray(this._positions),height:(i=this._style)==null?void 0:i.height,extrudedHeight:(s=this._style)==null?void 0:s.extrudedHeight,closeTop:(a=this._style)==null?void 0:a.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:r.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get video(){return this._video}set video(e){this._video=e,this._setAppearance()}_setAppearance(){this._delegate.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType("Image",{image:this._video})})}_mountedHook(){this.positions=this._positions,this.video=this._video}setStyle(e){var i;return Object.keys(e).length===0?this:(T.merge(this._style,e),(i=this._style)!=null&&i.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}};x.registerType("video_primitive");var nd=Na;var za=class extends x{constructor(e,i=[]){super(),this._positions=v.parsePositions(e),this._holes=i.map(s=>v.parsePositions(s)),this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("water_primitive")}get positions(){return this._positions}set positions(e){var i,s,a,o;this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(n=>new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(n)))),height:(i=this._style)==null?void 0:i.height,extrudedHeight:(s=this._style)==null?void 0:s.extrudedHeight,closeTop:(a=this._style)==null?void 0:a.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:r.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}_setAppearance(){var e,i,s,a,o,n,h,c;this._style&&(this._delegate.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType("Water",{baseWaterColor:((e=this._style)==null?void 0:e.baseWaterColor)||new r.Color(.2,.3,.6,1),blendColor:((i=this._style)==null?void 0:i.blendColor)||new r.Color(0,1,.699,1),specularMap:((s=this._style)==null?void 0:s.specularMap)||r.Material.DefaultImageId,normalMap:((a=this._style)==null?void 0:a.normalMap)||r.Material.DefaultImageId,frequency:((o=this._style)==null?void 0:o.frequency)||1e3,animationSpeed:((n=this._style)==null?void 0:n.animationSpeed)||.01,amplitude:((h=this._style)==null?void 0:h.amplitude)||10,specularIntensity:((c=this._style)==null?void 0:c.specularIntensity)||.5})}))}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var i;return Object.keys(e).length===0?this:(T.merge(this._style,e),(i=this._style)!=null&&i.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("water_primitive");var ld=za;var Fa=class l extends x{constructor(e,i){super(),this._delegate=new r.Entity({billboard:{}}),this._position=v.parsePosition(e),this._icon=i,this._size=[32,32],this._state=_.INITIALIZED}get type(){return x.getOverlayType("billboard")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get icon(){return this._icon}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get size(){return this._size}set size(e){if(!Array.isArray(e))throw new Error("Billboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}static fromEntity(e){var o;let i,s=r.JulianDate.now(),a=y.transformCartesianToWGS84(e.position.getValue(s));return e.billboard&&(i=new l(a,e.billboard.image.getValue(s)),i.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}),i}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,T.merge(this._style,e),T.merge(this._delegate.billboard,e),this)}};x.registerType("billboard");var at=Fa;var Ga=class extends x{constructor(e,i,s,a){super(),this._position=v.parsePosition(e),this._length=i,this._width=s,this._height=a,this._delegate=new r.Entity({box:{dimensions:{x:+this._length,y:+this._width,z:+this._height}}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("box")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get length(){return this._length}set length(e){let i=this._delegate.box.dimensions.getValue();this._length=e||0,i.x=+this._length,this._delegate.box.dimensions.setValue(i)}get width(){return this._width}set width(e){let i=this._delegate.box.dimensions.getValue();this._width=e||0,i.y=+this._width,this._delegate.box.dimensions.setValue(i)}get height(){return this._height}set height(e){let i=this._delegate.box.dimensions.getValue();this._height=e||0,i.z=+this._height,this._delegate.box.dimensions.setValue(i)}_mountedHook(){this.position=this._position}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.width&&delete e.height,T.merge(this._style,e),T.merge(this._delegate.box,e),this)}};x.registerType("box");var hd=Ga;var Ha=class extends x{constructor(e,i){super(),this._delegate=new r.Entity({polygon:{}}),this._center=v.parsePosition(e),this._radius=+i||0,this._rotateAmount=0,this._stRotation=0,this._state=_.INITIALIZED}get type(){return x.getOverlayType("circle")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get radius(){return this._radius}set radius(e){this._radius=+e,this._delegate.polygon.hierarchy=this._computeHierarchy()}get rotateAmount(){return this._rotateAmount}set rotateAmount(e){this._rotateAmount=+e,this._delegate.polygon.stRotation=new r.CallbackProperty(()=>(this._stRotation+=this._rotateAmount,(this._stRotation>=360||this._stRotation<=-360)&&(this._stRotation=0),r.Math.toRadians(this._stRotation)),!1)}_computeHierarchy(){let e=new r.PolygonHierarchy,i=r.EllipseGeometryLibrary.computeEllipsePositions({center:y.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),s=r.Cartesian3.unpackArray(i.outerPositions);return s.push(s[0]),e.positions=s,e}_mountedHook(){this.center=this._center}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this._center),this._delegate.label={...i,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polygon,e),this)}};x.registerType("circle");var ii=Ha;var Wa=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({corridor:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("corridor")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.corridor.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.corridor,e),this)}};x.registerType("corridor");var cd=Wa;var Ba=class extends x{constructor(e,i,s,a){super(),this._position=v.parsePosition(e),this._length=+i||0,this._topRadius=+s||0,this._bottomRadius=+a||0,this._delegate=new r.Entity({cylinder:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("cylinder")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get length(){return this._length}set length(e){this._length=+e||0,this._delegate.cylinder.length=this._length}get topRadius(){return this._topRadius}set topRadius(e){this._topRadius=+e||0,this._delegate.cylinder.topRadius=this._topRadius}get bottomRadius(){return this._bottomRadius}set bottomRadius(e){this._bottomRadius=+e||0,this._delegate.cylinder.bottomRadius=this._bottomRadius}_mountedHook(){this.position=this._position,this.length=this._length,this.topRadius=this._topRadius,this.bottomRadius=this._bottomRadius}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.topRadius&&delete e.bottomRadius,T.merge(this._style,e),T.merge(this._delegate.cylinder,e),this)}};x.registerType("cylinder");var dd=Ba;var Ua=class extends x{constructor(e,i,s){super(),this._position=v.parsePosition(e),this._semiMajorAxis=+i||0,this._semiMinorAxis=+s||0,this._delegate=new r.Entity({ellipse:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("ellipse")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get semiMajorAxis(){return this._semiMajorAxis}set semiMajorAxis(e){this._semiMajorAxis=+e||0,this._delegate.ellipse.semiMajorAxis=this._semiMajorAxis}get semiMinorAxis(){return this._semiMinorAxis}set semiMinorAxis(e){this._semiMinorAxis=+e||0,this._delegate.ellipse.semiMinorAxis=this._semiMinorAxis}_mountedHook(){this.position=this._position,this.semiMajorAxis=this._semiMajorAxis,this.semiMinorAxis=this._semiMinorAxis}setStyle(e){return Object.keys(e).length===0?this:(delete e.semiMajorAxis&&delete e.semiMinorAxis,T.merge(this._style,e),T.merge(this._delegate.ellipse,e),this)}};x.registerType("ellipse");var pd=Ua;var Va=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._radius=i||{x:10,y:10,z:10},this._delegate=new r.Entity({ellipsoid:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("sphere")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get radius(){return this._radius}set radius(e){this._radius=e||{x:10,y:10,z:10},this._delegate.ellipsoid.radii=this._radius}_mountedHook(){this.position=this._position,this.radius=this._radius}setStyle(e){return Object.keys(e).length===0?this:(delete e.radius,T.merge(this._style,e),T.merge(this._delegate.ellipsoid,e),this)}};x.registerType("sphere");var md=Va;var Za=class l extends x{constructor(e,i){super(),this._delegate=new r.Entity({label:{}}),this._position=v.parsePosition(e),this._text=i,this._state=_.INITIALIZED}get type(){return x.getOverlayType("label")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get text(){return this._text}set text(e){this._text=e,this._delegate.label.text=this._text}static fromEntity(e){var o;let i=r.JulianDate.now(),s=y.transformCartesianToWGS84(e.position.getValue(i)),a;return e.billboard&&(a=new l(s,e.name),a.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(i)}),a}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,i){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,T.merge(this._style,e),T.merge(this._delegate.label,e),this)}};x.registerType("label");var ri=Za;var ja=class extends x{constructor(e,i,s,a={}){if(super(),this._position=v.parsePosition(e),this._width=+i||100,this._height=+s||100,a.normal&&typeof a.normal=="string"){let o=String(a.normal).toLocaleUpperCase();a.normal=o==="X"?r.Cartesian3.UNIT_X:o==="Y"?r.Cartesian3.UNIT_Y:r.Cartesian3.UNIT_Z}else a.normal=r.Cartesian3.UNIT_Z;this._normal=a.normal,this._distance=a.distance||0,this._delegate=new r.Entity({plane:{dimensions:{x:this._width,y:this._height},plane:new r.Plane(this._normal,this._distance)}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("plane")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get width(){return this._width}set width(e){let i=this._delegate.plane.dimensions.getValue();this._width=+e||0,i.x=this._width}get height(){return this._height}set height(e){let i=this._delegate.plane.dimensions.getValue();this._height=+e||0,i.y=this._height}get distance(){return this._distance}set distance(e){this._distance=e,this._delegate.plane.plane.distance=e}_mountedHook(){this.position=this._position,this.distance=this._distance}setStyle(e){return Object.keys(e).length===0?this:(delete e.dimensions&&delete["plane"],T.merge(this._style,e),T.merge(this._delegate.plane,e),this)}};x.registerType("plane");var ud=ja;var fd={pixelSize:8,outlineColor:r.Color.BLUE,outlineWidth:2},Ya=class l extends x{constructor(e){super(),this._delegate=new r.Entity({point:{}}),this._position=v.parsePosition(e),this._state=_.INITIALIZED}get type(){return x.getOverlayType("point")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}static fromEntity(e){var o;let i,s=r.JulianDate.now(),a=y.transformCartesianToWGS84(e.position.getValue(s));return i=new l(a),i.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)},i}_mountedHook(){this.position=this._position,T.merge(this._delegate.point,fd,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,T.merge(this._style,e),T.merge(this._delegate.point,fd,this._style),this)}};x.registerType("point");var si=Ya;var qa=class l extends x{constructor(e){super(),this._delegate=new r.Entity({polygon:{}}),this._positions=v.parsePositions(e),this._holes=[],this._state=_.INITIALIZED}get type(){return x.getOverlayType("polygon")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get holes(){return this._holes}set holes(e){e&&e.length&&(this._holes=e.map(i=>v.parsePositions(i)),this._delegate.polygon.hierarchy=this._computeHierarchy())}get center(){return Oe([...this._positions,this._positions[0]])}get area(){return Re(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polygon){let o=y.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(s).positions);i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_computeHierarchy(){let e=new r.PolygonHierarchy;return e.positions=y.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map(i=>new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(i))),e}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...i},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polygon,e),this)}};x.registerType("polygon");var ot=qa;var Xa=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polyline:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polyline.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get center(){return Oe(this._positions)}get distance(){return ce(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...i},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polyline,e),this)}};x.registerType("polyline");var nt=Xa;var Ja=class extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({rectangle:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("rect")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.rectangle.coordinates=r.Rectangle.fromCartesianArray(y.transformWGS84ArrayToCartesianArray(this._positions))}_mountedHook(){this.positions=this._positions}setLabel(e,i){let s=this._delegate.rectangle.coordinates.getValue();return this._delegate.position=r.Cartographic.toCartesian(r.Rectangle.center(s,new r.Cartographic)),this._delegate.label={...i,text:e},this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.rectangle,e),this)}};x.registerType("rect");var ai=Ja;var Qa=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({wall:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("wall")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.wall.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.wall,e),this)}};x.registerType("wall");var _d=Qa;var Ka=class{static getShapeForPipeline(e={}){let i=e.radius||1,s=e.thicknes||i/3,a=Math.ceil(360/(e.slices||60)),o=e.startAngle||0,n=e.endAngle||o+360,h=e.vscale||1,c=e.hscale||1,d=[];for(let p=o;p<=n;p+=a){let f=r.Math.toRadians(p);d.push({x:i*c*Math.cos(f),y:i*h*Math.sin(f)})}for(let p=n;p>=o;p-=a){let f=r.Math.toRadians(p);d.push({x:(i-s)*c*Math.cos(f),y:(i-s)*h*Math.sin(f)})}return d}static getShapeForCircle(e={}){let i=e.radius||1,s=Math.ceil(360/(e.slices||60)),a=e.startAngle||0,o=e.endAngle||a+360,n=e.vscale||1,h=e.hscale||1,c=[];for(let d=a;d<=o;d+=s){let p=r.Math.toRadians(d);c.push({x:i*h*Math.cos(p),y:i*n*Math.sin(p)})}return c}static getShapeForStar(e={}){console.log(e.slices||6);let i=e.radius||1,s=e.thicknes||i/3,a=e.slices||6,o=e.startAngle||0;console.log(a);let n=r.Math.toRadians(o),h=Math.PI/a,c=2*a,d=new Array(c);for(let p=0;p<c;p++){let f=p%2===0?i:s,g=n+p*h;d[p]=new r.Cartesian2(Math.cos(g)*f,Math.sin(g)*f)}return d}},Ne=Ka;var $a=class l extends x{constructor(e={}){super(),this._positions=v.parsePositions(e.positions||[]);let i=e.shape||e.shapePositions;switch(e.radius=e.radius||10,i){case"pipeline":this._shape=Ne.getShapeForPipeline(e);break;case"circle":this._shape=Ne.getShapeForCircle(e);break;case"star":this._shape=Ne.getShapeForStar(e);break;default:this._shape=i;break}this._delegate=new r.Entity({polylineVolume:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_volume")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polylineVolume.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get shape(){return this._shape}set shape(e){this._shape=e||[],this._delegate.polylineVolume.shape=this._shape}static fromEntity(e,i){var o;let s,a=r.JulianDate.now();return e.polyline&&(i.positions=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(a)),s=new l(i),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(a)}),s}_mountedHook(){this.positions=this._positions,this.shape=this._shape}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polylineVolume,e),this)}};x.registerType("polyline_volume");var gd=$a;var eo=class l extends x{constructor(e={}){super(),e.radius=e.radius||10,console.log("PolylineAdapter",e);let i=e.branches;this._centerRadius=0,i==null||i.forEach(s=>{this._centerRadius=Math.max(this._centerRadius,s.radius)}),this._center=v.parsePosition(e.center),this._type=e.type||i.length>2?"multiway":"elbow",this._instances=[],this._type==="multiway"&&i.length>2?i&&i.forEach(s=>{let a={lat:this._center.lat,lng:this._center.lng,alt:this._center.alt+(this._centerRadius-s.radius)};this._instances.push(new r.GeometryInstance({geometry:new r.PolylineVolumeGeometry({polylinePositions:y.transformWGS84ArrayToCartesianArray([a,...s.positions]),shapePositions:Ne.getShapeForPipeline({radius:s.radius}),cornerType:r.CornerType.MITERED,vertexFormat:r.PerInstanceColorAppearance.VERTEX_FORMAT})}))}):this._type==="elbow"&&i.length===2&&this._instances.push(new r.GeometryInstance({geometry:new r.PolylineVolumeGeometry({polylinePositions:y.transformWGS84ArrayToCartesianArray([...i[0].positions.reverse(),this._center,...i[1].positions]),shapePositions:Ne.getShapeForPipeline({radius:this._centerRadius}),cornerType:r.CornerType.MITERED,vertexFormat:r.PerInstanceColorAppearance.VERTEX_FORMAT})})),this._center.alt=this._center.alt+this._centerRadius,this._instances.push(new r.GeometryInstance({geometry:new r.SphereGeometry({radius:this._centerRadius*1.2,stackPartitions:e.slices,slicePartitions:e.slices,vertexFormat:r.VertexFormat.POSITION_AND_NORMAL}),modelMatrix:r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._center)),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(r.Color.RED.withAlpha(.8))}})),this._delegate=new r.Primitive({geometryInstances:this._instances,appearance:new r.PerInstanceColorAppearance({flat:!0,faceForward:!0}),asynchronous:!1}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_adapter")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._delegate.modelMatrix=r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._center))}static fromEntity(e,i){var o;let s,a=r.JulianDate.now();return e.polyline&&(i.positions=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(a)),s=new l(i),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(a)}),s}_mountedHook(){}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),this)}};x.registerType("polyline_adapter");var yd=eo;var to=class extends I{constructor(e,i,s={}){if(!i)throw new Error("GeoJsonLayer\uFF1Athe url invalid");super(e),this._delegate=r.GeoJsonDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("geojson")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}_createBillboard(e){return e.position&&e.billboard?at.fromEntity(e):null}_createPolyline(e){if(e.polyline)return nt.fromEntity(e)}_createPolygon(e){if(e.polygon)return ot.fromEntity(e)}_createModel(e,i){if(e)return qt.fromEntity(e,i)}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(o=>{e.call(i,o)})}),this}toVectorLayer(){let e=new Je(this.id);return this.eachOverlay(i=>{i.billboard?e.addOverlay(this._createBillboard(i)):i.polyline?e.addOverlay(this._createPolyline(i)):i.polygon&&e.addOverlay(this._createPolygon(i))},this),e}toModelLayer(e){let i=new Je(this.id);return this.eachOverlay(s=>{i.addOverlay(this._createModel(s,e))},this),i}};I.registerType("geojson");var Et=to;var io=class extends I{constructor(e,i,s={}){if(!i)throw new Error("GpxLayer: the url is empty");super(e),this._delegate=r.KmlDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("gpx")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(o=>{e.call(i,o)})}),this}};I.registerType("gpx");var vd=io;var M_={radialColor:r.Color.WHITE,radialWidth:2,showRadial:!0,LabelColor:r.Color.YELLOW,weftColor:r.Color.WHITE,weftWidth:2},ro=class extends I{constructor(e,i){super(e),this._options={...M_,...i},this._delegate=new r.CustomDataSource(e),this._state=_.INITIALIZED}get type(){return I.getLayerType("graticule")}_addedHook(){for(let e=0;e<36;e++)this._delegate.entities.add({polyline:{positions:r.Cartesian3.fromDegreesArray([e*10,89.5,e*10,-89.5]),material:this._options.radialColor,width:this._options.radialWidth},show:this._options.showRadial}),this._delegate.entities.add({position:r.Cartesian3.fromDegrees(e*10,0),label:{text:e*10+"\xB0",font:"12px",fillColor:this._options.LabelColor}});for(let e=0;e<18;e++){let i=[];for(let s=0;s<129;s++)i.push(-180+s*(360/128),(e<9?e:-e)*10);this._delegate.entities.add({polyline:{positions:r.Cartesian3.fromDegreesArray(i),material:this._options.weftColor,width:this._options.weftWidth}})}}};I.registerType("graticule");var wd=ro;var so=class extends I{constructor(e){super(e),this._delegate=new r.PrimitiveCollection,this._isGround=!0,this._state=_.INITIALIZED}get type(){return I.getLayerType("ground_primitive")}clear(){return this._delegate&&this._delegate.removeAll(),this._cache={},this._state=_.CLEARED,this}};I.registerType("ground_primitive");var xd=so;var Td=[].indexOf||function(l){for(let e=0,i=this.length;e<i;e++)if(e in this&&this[e]===l)return e;return-1},oi=`attribute vec4 position;
|
|
253
|
+
*/var $c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjExQTg0NDEyMDEzQjExRUFBNDhBRjhGMUMzOUUyNTU0IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjExQTg0NDEzMDEzQjExRUFBNDhBRjhGMUMzOUUyNTU0Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTFBODQ0MTAwMTNCMTFFQUE0OEFGOEYxQzM5RTI1NTQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTFBODQ0MTEwMTNCMTFFQUE0OEFGOEYxQzM5RTI1NTQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz41vRwAAAAE90lEQVR42uydyW4UMRCG3T2dgYSAEGs4sp44cCJBcGUJbwCvALwWPAI8ABwAiUVwgLBdkEikJEiAGMhkZqhfU1aa1sy0g+yaJPyWSupOpPjz0uVyucrJer2eG2fJ3ZgLAQhAgC0PgN8XIlkqgGLE75oih0WmRVZEvop0rHog18rnRe6IzInsthyCXFt+TuSKyGmRXZZDgK5eFrkv8l7kiUhrxN/JSo3pigSvcNmI1bCh3b5LK2+NqHyvyEF9x3z5HgqRRViOAXhW5JrCoNdei/y20gMYxhmRSyIXRY6JTMT4DENLW+SdyD19x/NajDmwmYIW79Hnn+MA4GJEAAIQgABJbMJB+n5Sl9zWZvR9DABUfkJkVt8fi3zUldAEoKl24Y2S1fPZEmBdZFHkkb4vxTLRQ5djbyUf0ncYrD/UADUB8MZno2Q19yx7gIqIAAQgAAEIQIAtYZT+85LvRnjQCoPKR3rQUgN4Y3ZeK30g8qps0qeeAzDn4TWD9+ySG+BBS90DaGnVg9a2tgnR4il9/jkOACoiAhCAAASIZpAAFl6yulO0JACo/IDrn6CedP1zxOciv6wAYNnAP3RVBeWtJQCWzG8iL/X9g4vkqNzMctzUXtintt2KM/aS+bmQaY90rb8CF6tSKiICEIAABCAAAQiwbfcFIWVCbUcc9bZDLKiYAKj4uOv7Bb+ILLj+8W7PCgC7Jhzv44Qdh9yrru8V61jPgd645gD2io+15RiC5ZA5ENNPmGmDmtrta9YAVEQE2FlrQUM/J6efU8cSAD87ojodBaccS6kgiiErGiq/qe93XT+3oGU5BJnbyKrIUs6BQZoQUEcrQ7CYagiGqeKiMgnXLXsg5uJUm/RQJKy8fGS7PMw6SgVQPrJFGZr0kCfUL/7IFjIzrLGpemBQ0kPbehL6I9vMjUh6oEVEAAIQgAAEIAABdpyj0qcK71YrqGUJANNrv+sHOcAiRpDDM1cTY1BEHk7kqyP/2Ac5vLEEQEG8aDnIoTb5ObZRWg5ywG5o1dX4ClNYxT7IISgJPsXGpLut9MCWU0S5bqkmdAa3LQEwcZDAfkZ3tthQfkwNkVeeD6kiuaUabcp6DpS9YyalrAdQ8bT1EFQVUabarND9fNuyB2gREYAABCAAAQhAAAIQoM770UgBXARCIr/koDogVlzgrWuxemBKd0m4JnBed0+5ZQ9gn3BK5LK+P4y5ewoB8DFiKO91COLFfwVuTCZV1hSoYw1APZCsFIkbN1Haaa87wwiKQe6eT27AEX6esPVVd8/kOOdAz/oz9FE0p+uGIKUeqE5C8xgSKiICEIAABCAAAQhAAAIQgAAEIAABCECA6AA+sbkREyDUUYlKD6ggZwzRkr8tewBhusisv+0in5qE/hFchoZTE0TL4p8sTbtIpyahQ4Ag5fKpSVBmfdDECvQTZjoM0U9N6KgkwH9xY7PXpPiCmq5yuaLVldHIO7jgNi5XfOEhCqNh9udHV/RnC5YAUDTftdV4/ivvwEoRVS9XXPWa1FIT5ird8jpSB+BDN3rO8AaGMnGy0I0QRYTvdk6NkOsucuhGCMAgI8Q0isaHbmAevNMhiD4P6iZhstANGiQE2PEGCRo2NcgAsQDwKnxWFdlT17/duWU1BJmuHz6A5bwbEsCScgh+qAHit3Jr1oooOPExdRBLbeJjSpuwuy30AAH+CDAAPH5ltESNYl4AAAAASUVORK5CYII=";var P_={color:r.Color.ORANGE},Ia=class extends x{constructor(e,i,s,a){super(),this._center=v.parsePosition(e),this._length=i||100,this._topRadius=s||1,this._bottomRadius=a||50,this._delegate=new r.PrimitiveCollection,this._style={...P_},this._state=_.INITIALIZED}get type(){return x.getOverlayType("light-cylinder-primitive")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._updatePrimitives()}get length(){return this._length}set length(e){this._length=e,this._updatePrimitives()}get topRadius(){return this._topRadius}set topRadius(e){this._topRadius=e,this._updatePrimitives()}get bottomRadius(){return this._bottomRadius}set bottomRadius(e){this._bottomRadius=e,this._updatePrimitives()}_computeEllipsePositions(e,i){let s=r.EllipseGeometryLibrary.computeEllipsePositions({center:y.transformWGS84ToCartesian(e),semiMajorAxis:i,semiMinorAxis:i,rotation:0,granularity:.005},!1,!0),a=r.Cartesian3.unpackArray(s.outerPositions);return a.push(a[0]),a}_createCylinderInstance(e,i,s){let a=i.slice(),o=i.length,n=2*o,h=[],c=1/(o-1),d=[],p=[],f=(u,m=0)=>{let E=r.Cartographic.fromCartesian(u);return E.height+=m,r.Cartographic.toCartesian(E)};for(let u=0;u<o;u++){p.push(f(e[u],s)),h.push(u*c,0);let m=u+1,E=(u+1)%o,w=n-m;d.push(w-1,w,u),d.push(u,E,w-1)}for(let u in p)a.push(p[o-u-1]),h.push(1-u*c,1);let g=r.PolygonGeometry.createGeometry(new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(a),perPositionHeight:!0}));return g.indices=d,g.attributes.st.values=h,new r.GeometryInstance({geometry:g})}_getCircleImage(){let e=document.createElement("canvas");e.width=512,e.height=512;let i=e.getContext("2d");return i.fillStyle="rgba(255,255,255,0)",i.strokeStyle="rgba(255, 255, 255,255)",i.setLineDash([50,50]),i.lineWidth=30,i.beginPath(),i.arc(256,256,150,0,Math.PI*2,!0),i.stroke(),i.restore(),e}_getParticlesImage(e){let i=document.createElement("canvas");i.width=64,i.height=256;let s=i.getContext("2d");return s.clearRect(0,0,64,256),s.drawImage(e,0,0),s.drawImage(e,33,0),i}_updatePrimitives(){this._delegate.removeAll();let e=this._center.alt===0,i=this._computeEllipsePositions(this._center,this._topRadius),s=this._computeEllipsePositions(this._center,this._bottomRadius*.7),a=this._computeEllipsePositions(this._center,this._bottomRadius),o={geometryInstances:new r.GeometryInstance({geometry:new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(this._computeEllipsePositions(this._center,this._bottomRadius*2)),perPositionHeight:!e}),asynchronous:!1})},n=e?new r.GroundPrimitive(o):new r.Primitive(o);n.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CircleRingType,{color:this._style.color})});let h=e?new r.GroundPrimitive(o):new r.Primitive(o);h.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});let c=new r.Primitive({geometryInstances:this._createCylinderInstance(i,s,this._length),appearance:new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});e?r.GroundPrimitive.initializeTerrainHeights().then(()=>{this._delegate.add(n),this._delegate.add(h),this._delegate.add(c)}):(this._delegate.add(n),this._delegate.add(h),this._delegate.add(c)),r.Resource.fetchImage({url:$c}).then(d=>{let p=new r.Primitive({geometryInstances:this._createCylinderInstance(i,a,this._length),appearance:new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CylinderParticlesType,{color:this._style.color,image:this._getParticlesImage(d)})}),asynchronous:!1});this._delegate.add(p)})}_mountedHook(){this.center=this._center}update(e){this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(T.merge(this._style,e),this)}destroy(){return r.destroyObject(this)}};x.registerType("light-cylinder-primitive");var ed=Ia;var La=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._modelUrl=i,this._delegate=r.Model.fromGltfAsync({url:i}),this._modelEvent=new Er(this._delegate),this._state=_.INITIALIZED}get type(){return x.getOverlayType("model_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e);let i=y.transformWGS84ToCartesian(this._position);this._delegate.then(s=>{s.modelMatrix=r.Transforms.headingPitchRollToFixedFrame(i,new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))})}get modelUrl(){return this._modelUrl}set modelUrl(e){this._modelUrl=e,this._delegate=r.Model.fromGltfAsync({url:e,...this._style}),this.position=this._position}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(T.merge(this._style,e),this._delegate.then(i=>{T.merge(i,e)}),this)}on(e,i,s){return this._overlayEvent.on(e,i,s||this),this._modelEvent.on(e,i,s||this),this}off(e,i,s){return this._overlayEvent.off(e,i,s||this),this._modelEvent.off(e,i,s||this),this}};x.registerType("model_primitive");var td=La;var id={pixelSize:8,outlineColor:r.Color.BLUE,outlineWidth:2},Da=class extends x{constructor(e){super(),this._position=v.parsePosition(e),this._delegate={position:void 0},this._state=_.INITIALIZED}get type(){return x.getOverlayType("point_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}_mountedHook(){this.position=this._position,T.merge(this._delegate,id,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,T.merge(this._style,e),T.merge(this._delegate,id,this._style),this)}};x.registerType("point_primitive");var rd=Da;var Ra=class extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate={positions:[]},this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_primitive")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get center(){return Oe(this._positions)}get distance(){return ce(this._positions)}_mountedHook(){this.positions=this._positions}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate,e),this)}};x.registerType("polyline_primitive");var sd=Ra;var Oa=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._radius=i,this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("scan_circle_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.geometryInstances.geometry=new r.EllipseGeometry({center:y.transformWGS84ToCartesian(this._position),semiMajorAxis:this._radius,semiMinorAxis:this._radius})}get radius(){return this._radius}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry.semiMajorAxis=this._radius,this._delegate.geometryInstances.geometry.semiMinorAxis=this._radius}_setAppearance(){var e,i;this._style&&(this._delegate.appearance=new r.MaterialAppearance({material:r.Material.fromType("CircleScan",{color:((e=this._style)==null?void 0:e.color)||r.Color.WHITE,speed:((i=this._style)==null?void 0:i.speed)||10})}))}_mountedHook(){this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(T.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("scan_circle_primitive");var ad=Oa;var ka=class extends x{constructor(e,i=1){super(),this._positions=v.parsePositions(e),this._width=i,this._delegate=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("trail_line_primitive")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=new r.PolylineGeometry({positions:y.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}_setAppearance(){var e,i;this._delegate.appearance=new r.PolylineMaterialAppearance({material:r.Material.fromType("PolylineTrail",{color:((e=this._style)==null?void 0:e.color)||new r.Color(1,0,0,.7),speed:((i=this._style)==null?void 0:i.speed)||5})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(T.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("trail_line_primitive");var od=ka;var Na=class extends x{constructor(e,i){super(),this._positions=v.parsePositions(e),this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._video=i,this._state=_.INITIALIZED}get type(){return x.getOverlayType("video_primitive")}get positions(){return this._positions}set positions(e){var i,s,a,o;this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=r.PolygonGeometry.fromPositions({positions:y.transformWGS84ArrayToCartesianArray(this._positions),height:(i=this._style)==null?void 0:i.height,extrudedHeight:(s=this._style)==null?void 0:s.extrudedHeight,closeTop:(a=this._style)==null?void 0:a.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:r.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get video(){return this._video}set video(e){this._video=e,this._setAppearance()}_setAppearance(){this._delegate.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType("Image",{image:this._video})})}_mountedHook(){this.positions=this._positions,this.video=this._video}setStyle(e){var i;return Object.keys(e).length===0?this:(T.merge(this._style,e),(i=this._style)!=null&&i.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}};x.registerType("video_primitive");var nd=Na;var za=class extends x{constructor(e,i=[]){super(),this._positions=v.parsePositions(e),this._holes=i.map(s=>v.parsePositions(s)),this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("water_primitive")}get positions(){return this._positions}set positions(e){var i,s,a,o;this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(n=>new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(n)))),height:(i=this._style)==null?void 0:i.height,extrudedHeight:(s=this._style)==null?void 0:s.extrudedHeight,closeTop:(a=this._style)==null?void 0:a.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:r.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}_setAppearance(){var e,i,s,a,o,n,h,c;this._style&&(this._delegate.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType("Water",{baseWaterColor:((e=this._style)==null?void 0:e.baseWaterColor)||new r.Color(.2,.3,.6,1),blendColor:((i=this._style)==null?void 0:i.blendColor)||new r.Color(0,1,.699,1),specularMap:((s=this._style)==null?void 0:s.specularMap)||r.Material.DefaultImageId,normalMap:((a=this._style)==null?void 0:a.normalMap)||r.Material.DefaultImageId,frequency:((o=this._style)==null?void 0:o.frequency)||1e3,animationSpeed:((n=this._style)==null?void 0:n.animationSpeed)||.01,amplitude:((h=this._style)==null?void 0:h.amplitude)||10,specularIntensity:((c=this._style)==null?void 0:c.specularIntensity)||.5})}))}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var i;return Object.keys(e).length===0?this:(T.merge(this._style,e),(i=this._style)!=null&&i.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("water_primitive");var ld=za;var Fa=class l extends x{constructor(e,i){super(),this._delegate=new r.Entity({billboard:{}}),this._position=v.parsePosition(e),this._icon=i,this._size=[32,32],this._state=_.INITIALIZED}get type(){return x.getOverlayType("billboard")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get icon(){return this._icon}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get size(){return this._size}set size(e){if(!Array.isArray(e))throw new Error("Billboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}static fromEntity(e){var o;let i,s=r.JulianDate.now(),a=y.transformCartesianToWGS84(e.position.getValue(s));return e.billboard&&(i=new l(a,e.billboard.image.getValue(s)),i.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}),i}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,T.merge(this._style,e),T.merge(this._delegate.billboard,e),this)}};x.registerType("billboard");var at=Fa;var Ga=class extends x{constructor(e,i,s,a){super(),this._position=v.parsePosition(e),this._length=i,this._width=s,this._height=a,this._delegate=new r.Entity({box:{dimensions:{x:+this._length,y:+this._width,z:+this._height}}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("box")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get length(){return this._length}set length(e){let i=this._delegate.box.dimensions.getValue();this._length=e||0,i.x=+this._length,this._delegate.box.dimensions.setValue(i)}get width(){return this._width}set width(e){let i=this._delegate.box.dimensions.getValue();this._width=e||0,i.y=+this._width,this._delegate.box.dimensions.setValue(i)}get height(){return this._height}set height(e){let i=this._delegate.box.dimensions.getValue();this._height=e||0,i.z=+this._height,this._delegate.box.dimensions.setValue(i)}_mountedHook(){this.position=this._position}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.width&&delete e.height,T.merge(this._style,e),T.merge(this._delegate.box,e),this)}};x.registerType("box");var hd=Ga;var Ha=class extends x{constructor(e,i){super(),this._delegate=new r.Entity({polygon:{}}),this._center=v.parsePosition(e),this._radius=+i||0,this._rotateAmount=0,this._stRotation=0,this._state=_.INITIALIZED}get type(){return x.getOverlayType("circle")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get radius(){return this._radius}set radius(e){this._radius=+e,this._delegate.polygon.hierarchy=this._computeHierarchy()}get rotateAmount(){return this._rotateAmount}set rotateAmount(e){this._rotateAmount=+e,this._delegate.polygon.stRotation=new r.CallbackProperty(()=>(this._stRotation+=this._rotateAmount,(this._stRotation>=360||this._stRotation<=-360)&&(this._stRotation=0),r.Math.toRadians(this._stRotation)),!1)}_computeHierarchy(){let e=new r.PolygonHierarchy,i=r.EllipseGeometryLibrary.computeEllipsePositions({center:y.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),s=r.Cartesian3.unpackArray(i.outerPositions);return s.push(s[0]),e.positions=s,e}_mountedHook(){this.center=this._center}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this._center),this._delegate.label={...i,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polygon,e),this)}};x.registerType("circle");var ii=Ha;var Wa=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({corridor:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("corridor")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.corridor.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.corridor,e),this)}};x.registerType("corridor");var cd=Wa;var Ba=class extends x{constructor(e,i,s,a){super(),this._position=v.parsePosition(e),this._length=+i||0,this._topRadius=+s||0,this._bottomRadius=+a||0,this._delegate=new r.Entity({cylinder:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("cylinder")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get length(){return this._length}set length(e){this._length=+e||0,this._delegate.cylinder.length=this._length}get topRadius(){return this._topRadius}set topRadius(e){this._topRadius=+e||0,this._delegate.cylinder.topRadius=this._topRadius}get bottomRadius(){return this._bottomRadius}set bottomRadius(e){this._bottomRadius=+e||0,this._delegate.cylinder.bottomRadius=this._bottomRadius}_mountedHook(){this.position=this._position,this.length=this._length,this.topRadius=this._topRadius,this.bottomRadius=this._bottomRadius}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.topRadius&&delete e.bottomRadius,T.merge(this._style,e),T.merge(this._delegate.cylinder,e),this)}};x.registerType("cylinder");var dd=Ba;var Ua=class extends x{constructor(e,i,s){super(),this._position=v.parsePosition(e),this._semiMajorAxis=+i||0,this._semiMinorAxis=+s||0,this._delegate=new r.Entity({ellipse:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("ellipse")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get semiMajorAxis(){return this._semiMajorAxis}set semiMajorAxis(e){this._semiMajorAxis=+e||0,this._delegate.ellipse.semiMajorAxis=this._semiMajorAxis}get semiMinorAxis(){return this._semiMinorAxis}set semiMinorAxis(e){this._semiMinorAxis=+e||0,this._delegate.ellipse.semiMinorAxis=this._semiMinorAxis}_mountedHook(){this.position=this._position,this.semiMajorAxis=this._semiMajorAxis,this.semiMinorAxis=this._semiMinorAxis}setStyle(e){return Object.keys(e).length===0?this:(delete e.semiMajorAxis&&delete e.semiMinorAxis,T.merge(this._style,e),T.merge(this._delegate.ellipse,e),this)}};x.registerType("ellipse");var pd=Ua;var Va=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._radius=i||{x:10,y:10,z:10},this._delegate=new r.Entity({ellipsoid:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("sphere")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get radius(){return this._radius}set radius(e){this._radius=e||{x:10,y:10,z:10},this._delegate.ellipsoid.radii=this._radius}_mountedHook(){this.position=this._position,this.radius=this._radius}setStyle(e){return Object.keys(e).length===0?this:(delete e.radius,T.merge(this._style,e),T.merge(this._delegate.ellipsoid,e),this)}};x.registerType("sphere");var md=Va;var Za=class l extends x{constructor(e,i){super(),this._delegate=new r.Entity({label:{}}),this._position=v.parsePosition(e),this._text=i,this._state=_.INITIALIZED}get type(){return x.getOverlayType("label")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get text(){return this._text}set text(e){this._text=e,this._delegate.label.text=this._text}static fromEntity(e){var o;let i=r.JulianDate.now(),s=y.transformCartesianToWGS84(e.position.getValue(i)),a;return e.billboard&&(a=new l(s,e.name),a.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(i)}),a}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,i){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,T.merge(this._style,e),T.merge(this._delegate.label,e),this)}};x.registerType("label");var ri=Za;var ja=class extends x{constructor(e,i,s,a={}){if(super(),this._position=v.parsePosition(e),this._width=+i||100,this._height=+s||100,a.normal&&typeof a.normal=="string"){let o=String(a.normal).toLocaleUpperCase();a.normal=o==="X"?r.Cartesian3.UNIT_X:o==="Y"?r.Cartesian3.UNIT_Y:r.Cartesian3.UNIT_Z}else a.normal=r.Cartesian3.UNIT_Z;this._normal=a.normal,this._distance=a.distance||0,this._delegate=new r.Entity({plane:{dimensions:{x:this._width,y:this._height},plane:new r.Plane(this._normal,this._distance)}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("plane")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get width(){return this._width}set width(e){let i=this._delegate.plane.dimensions.getValue();this._width=+e||0,i.x=this._width}get height(){return this._height}set height(e){let i=this._delegate.plane.dimensions.getValue();this._height=+e||0,i.y=this._height}get distance(){return this._distance}set distance(e){this._distance=e,this._delegate.plane.plane.distance=e}_mountedHook(){this.position=this._position,this.distance=this._distance}setStyle(e){return Object.keys(e).length===0?this:(delete e.dimensions&&delete["plane"],T.merge(this._style,e),T.merge(this._delegate.plane,e),this)}};x.registerType("plane");var ud=ja;var fd={pixelSize:8,outlineColor:r.Color.BLUE,outlineWidth:2},Ya=class l extends x{constructor(e){super(),this._delegate=new r.Entity({point:{}}),this._position=v.parsePosition(e),this._state=_.INITIALIZED}get type(){return x.getOverlayType("point")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}static fromEntity(e){var o;let i,s=r.JulianDate.now(),a=y.transformCartesianToWGS84(e.position.getValue(s));return i=new l(a),i.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)},i}_mountedHook(){this.position=this._position,T.merge(this._delegate.point,fd,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,T.merge(this._style,e),T.merge(this._delegate.point,fd,this._style),this)}};x.registerType("point");var si=Ya;var qa=class l extends x{constructor(e){super(),this._delegate=new r.Entity({polygon:{}}),this._positions=v.parsePositions(e),this._holes=[],this._state=_.INITIALIZED}get type(){return x.getOverlayType("polygon")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get holes(){return this._holes}set holes(e){e&&e.length&&(this._holes=e.map(i=>v.parsePositions(i)),this._delegate.polygon.hierarchy=this._computeHierarchy())}get center(){return Oe([...this._positions,this._positions[0]])}get area(){return Re(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polygon){let o=y.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(s).positions);i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_computeHierarchy(){let e=new r.PolygonHierarchy;return e.positions=y.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map(i=>new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(i))),e}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...i},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polygon,e),this)}};x.registerType("polygon");var ot=qa;var Xa=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polyline:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polyline.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get center(){return Oe(this._positions)}get distance(){return ce(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...i},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polyline,e),this)}};x.registerType("polyline");var nt=Xa;var Ja=class extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({rectangle:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("rect")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.rectangle.coordinates=r.Rectangle.fromCartesianArray(y.transformWGS84ArrayToCartesianArray(this._positions))}_mountedHook(){this.positions=this._positions}setLabel(e,i){let s=this._delegate.rectangle.coordinates.getValue();return this._delegate.position=r.Cartographic.toCartesian(r.Rectangle.center(s,new r.Cartographic)),this._delegate.label={...i,text:e},this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.rectangle,e),this)}};x.registerType("rect");var ai=Ja;var Qa=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({wall:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("wall")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.wall.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.wall,e),this)}};x.registerType("wall");var _d=Qa;var Ka=class{static getShapeForPipeline(e={}){let i=e.radius||1,s=e.thicknes||i/3,a=Math.ceil(360/(e.slices||60)),o=e.startAngle||0,n=e.endAngle||o+360,h=e.vscale||1,c=e.hscale||1,d=[];for(let p=o;p<=n;p+=a){let f=r.Math.toRadians(p);d.push({x:i*c*Math.cos(f),y:i*h*Math.sin(f)})}for(let p=n;p>=o;p-=a){let f=r.Math.toRadians(p);d.push({x:(i-s)*c*Math.cos(f),y:(i-s)*h*Math.sin(f)})}return d}static getShapeForCircle(e={}){let i=e.radius||1,s=Math.ceil(360/(e.slices||60)),a=e.startAngle||0,o=e.endAngle||a+360,n=e.vscale||1,h=e.hscale||1,c=[];for(let d=a;d<=o;d+=s){let p=r.Math.toRadians(d);c.push({x:i*h*Math.cos(p),y:i*n*Math.sin(p)})}return c}static getShapeForStar(e={}){console.log(e.slices||6);let i=e.radius||1,s=e.thicknes||i/3,a=e.slices||6,o=e.startAngle||0;console.log(a);let n=r.Math.toRadians(o),h=Math.PI/a,c=2*a,d=new Array(c);for(let p=0;p<c;p++){let f=p%2===0?i:s,g=n+p*h;d[p]=new r.Cartesian2(Math.cos(g)*f,Math.sin(g)*f)}return d}},Ne=Ka;var $a=class l extends x{constructor(e={}){super(),this._positions=v.parsePositions(e.positions||[]);let i=e.shape||e.shapePositions;switch(e.radius=e.radius||10,i){case"pipeline":this._shape=Ne.getShapeForPipeline(e);break;case"circle":this._shape=Ne.getShapeForCircle(e);break;case"star":this._shape=Ne.getShapeForStar(e);break;default:this._shape=i;break}this._delegate=new r.Entity({polylineVolume:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_volume")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polylineVolume.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get shape(){return this._shape}set shape(e){this._shape=e||[],this._delegate.polylineVolume.shape=this._shape}static fromEntity(e,i){var o;let s,a=r.JulianDate.now();return e.polyline&&(i.positions=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(a)),s=new l(i),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(a)}),s}_mountedHook(){this.positions=this._positions,this.shape=this._shape}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polylineVolume,e),this)}};x.registerType("polyline_volume");var gd=$a;var eo=class l extends x{constructor(e={}){super(),e.radius=e.radius||10,e.alpha=e.alpha||.8,e.color=e.color||r.Color.RED,this._alpha=e.alpha,this._color=e.color.withAlpha(this._alpha),console.log("PolylineAdapter",e);let i=e.branches;this._centerRadius=0,i==null||i.forEach(s=>{this._centerRadius=Math.max(this._centerRadius,s.radius)}),this._center=v.parsePosition(e.center),this._type=e.type||i.length>2?"multiway":"elbow",this._instances=[],this._type==="multiway"&&i.length>2?i&&i.forEach(s=>{let a={lat:this._center.lat,lng:this._center.lng,alt:this._center.alt+(this._centerRadius-s.radius)};this._instances.push(new r.GeometryInstance({geometry:new r.PolylineVolumeGeometry({polylinePositions:y.transformWGS84ArrayToCartesianArray([a,...s.positions]),shapePositions:Ne.getShapeForPipeline({radius:s.radius}),cornerType:r.CornerType.MITERED,vertexFormat:r.PerInstanceColorAppearance.VERTEX_FORMAT}),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(this._color)}}))}):this._type==="elbow"&&i.length===2&&this._instances.push(new r.GeometryInstance({geometry:new r.PolylineVolumeGeometry({polylinePositions:y.transformWGS84ArrayToCartesianArray([...i[0].positions.reverse(),this._center,...i[1].positions]),shapePositions:Ne.getShapeForPipeline({radius:this._centerRadius}),cornerType:r.CornerType.MITERED,vertexFormat:r.PerInstanceColorAppearance.VERTEX_FORMAT}),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(this._color)}})),this._center.alt=this._center.alt+this._centerRadius,this._instances.push(new r.GeometryInstance({geometry:new r.SphereGeometry({radius:this._centerRadius*1.2,stackPartitions:e.slices,slicePartitions:e.slices,vertexFormat:r.VertexFormat.POSITION_AND_NORMAL}),modelMatrix:r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._center)),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(this._color)}})),this._delegate=new r.Primitive({geometryInstances:this._instances,appearance:new r.PerInstanceColorAppearance({flat:!0,faceForward:!0}),asynchronous:!1}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_adapter")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._delegate.modelMatrix=r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._center))}static fromEntity(e,i){var o;let s,a=r.JulianDate.now();return e.polyline&&(i.positions=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(a)),s=new l(i),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(a)}),s}_mountedHook(){}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),e.alpha&&(this._alpha=e.alpha),e.color&&(this._color=e.color.withAlpha(this._alpha),console.log("------------",e.color),this._instances.forEach(i=>{console.log("------------",i.attributes),i.attributes&&i.attributes.color&&(i.attributes.color=r.ColorGeometryInstanceAttribute.fromColor(this._color))})),this)}};x.registerType("polyline_adapter");var yd=eo;var to=class extends I{constructor(e,i,s={}){if(!i)throw new Error("GeoJsonLayer\uFF1Athe url invalid");super(e),this._delegate=r.GeoJsonDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("geojson")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}_createBillboard(e){return e.position&&e.billboard?at.fromEntity(e):null}_createPolyline(e){if(e.polyline)return nt.fromEntity(e)}_createPolygon(e){if(e.polygon)return ot.fromEntity(e)}_createModel(e,i){if(e)return qt.fromEntity(e,i)}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(o=>{e.call(i,o)})}),this}toVectorLayer(){let e=new Je(this.id);return this.eachOverlay(i=>{i.billboard?e.addOverlay(this._createBillboard(i)):i.polyline?e.addOverlay(this._createPolyline(i)):i.polygon&&e.addOverlay(this._createPolygon(i))},this),e}toModelLayer(e){let i=new Je(this.id);return this.eachOverlay(s=>{i.addOverlay(this._createModel(s,e))},this),i}};I.registerType("geojson");var Et=to;var io=class extends I{constructor(e,i,s={}){if(!i)throw new Error("GpxLayer: the url is empty");super(e),this._delegate=r.KmlDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("gpx")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(o=>{e.call(i,o)})}),this}};I.registerType("gpx");var vd=io;var M_={radialColor:r.Color.WHITE,radialWidth:2,showRadial:!0,LabelColor:r.Color.YELLOW,weftColor:r.Color.WHITE,weftWidth:2},ro=class extends I{constructor(e,i){super(e),this._options={...M_,...i},this._delegate=new r.CustomDataSource(e),this._state=_.INITIALIZED}get type(){return I.getLayerType("graticule")}_addedHook(){for(let e=0;e<36;e++)this._delegate.entities.add({polyline:{positions:r.Cartesian3.fromDegreesArray([e*10,89.5,e*10,-89.5]),material:this._options.radialColor,width:this._options.radialWidth},show:this._options.showRadial}),this._delegate.entities.add({position:r.Cartesian3.fromDegrees(e*10,0),label:{text:e*10+"\xB0",font:"12px",fillColor:this._options.LabelColor}});for(let e=0;e<18;e++){let i=[];for(let s=0;s<129;s++)i.push(-180+s*(360/128),(e<9?e:-e)*10);this._delegate.entities.add({polyline:{positions:r.Cartesian3.fromDegreesArray(i),material:this._options.weftColor,width:this._options.weftWidth}})}}};I.registerType("graticule");var wd=ro;var so=class extends I{constructor(e){super(e),this._delegate=new r.PrimitiveCollection,this._isGround=!0,this._state=_.INITIALIZED}get type(){return I.getLayerType("ground_primitive")}clear(){return this._delegate&&this._delegate.removeAll(),this._cache={},this._state=_.CLEARED,this}};I.registerType("ground_primitive");var xd=so;var Td=[].indexOf||function(l){for(let e=0,i=this.length;e<i;e++)if(e in this&&this[e]===l)return e;return-1},oi=`attribute vec4 position;
|
|
254
254
|
varying vec2 texcoord;
|
|
255
255
|
void main(){
|
|
256
256
|
texcoord = position.xy*0.5+0.5;
|
|
@@ -3278,7 +3278,7 @@ void main() {\r
|
|
|
3278
3278
|
%c \u76D8\u53E4\u5730\u7406\u4FE1\u606F\u7CFB\u7EDF
|
|
3279
3279
|
%c PanGu Gis For Cesium SDK
|
|
3280
3280
|
%c \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
3281
|
-
%c \u{1F680} \u7248\u672C: %c5.1.
|
|
3281
|
+
%c \u{1F680} \u7248\u672C: %c5.1.15 - 2025-10-24
|
|
3282
3282
|
%c \u{1F310} EUM\u7248\u672C\uFF1A%c1.131.0
|
|
3283
3283
|
%c \u{1F468}\u200D\u{1F4BB} \u5F00\u53D1\u4F5C\u8005: %cLucas Xu <xulei0857@qq.com>
|
|
3284
3284
|
%c \u{1F4DC} \u6388\u6743\uFF1A%c\u667A\u4F01\u534E\u7AE0-\u6C38\u4E45\u4F7F\u7528\u6B64\u8F6F\u4EF6\u5F53\u524D\u7248\u672C\u3002
|
|
@@ -3287,4 +3287,4 @@ void main() {\r
|
|
|
3287
3287
|
%c \u{1F3E0} \u5B98\u7F51: %chttps://www.pggis.com
|
|
3288
3288
|
|
|
3289
3289
|
%c
|
|
3290
|
-
`,'font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #008AFF; text-align: center;','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #F08519; text-align: center; ','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 16px; font-weight: 600; color: #FFC712; text-align: center;font-style:oblique','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #718096; text-align: center; letter-spacing: 0.5px; padding: 4px 0','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829',"font-family: monospace; font-size: 14px; color: transparent"))};var Au="./libs/pg-sdk/resources/",Mu=Au,bu=!1;Qe("baseUrl",Au);var MH={set baseUrl(l){Mu=l,Qe("baseUrl",l)},get baseUrl(){return Mu}};function bH(l={}){return bu?Promise.resolve():new Promise((e,i)=>{l.baseUrl&&(this.config.baseUrl=l.baseUrl),l.cesium&®isterLib("cesium",l.Cesium),l.echarts&®isterLib("echarts",l.echarts),l.turf&®isterLib("turf",l.turf),bu=!0,Qe("isInitialized",!0),Qe("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)})}var AH="5.1.
|
|
3290
|
+
`,'font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #008AFF; text-align: center;','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #F08519; text-align: center; ','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 16px; font-weight: 600; color: #FFC712; text-align: center;font-style:oblique','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #718096; text-align: center; letter-spacing: 0.5px; padding: 4px 0','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829',"font-family: monospace; font-size: 14px; color: transparent"))};var Au="./libs/pg-sdk/resources/",Mu=Au,bu=!1;Qe("baseUrl",Au);var MH={set baseUrl(l){Mu=l,Qe("baseUrl",l)},get baseUrl(){return Mu}};function bH(l={}){return bu?Promise.resolve():new Promise((e,i)=>{l.baseUrl&&(this.config.baseUrl=l.baseUrl),l.cesium&®isterLib("cesium",l.Cesium),l.echarts&®isterLib("echarts",l.echarts),l.turf&®isterLib("turf",l.turf),bu=!0,Qe("isInitialized",!0),Qe("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)})}var AH="5.1.15";export{wu as Analysis,Ue as AnalysisType,ee as AnimationType,xm as AroundPoint,wm as AroundView,st as AttackArrow,at as Billboard,ei as BillboardPrimitive,jc as BounceBillboardPrimitive,qc as BounceLabelPrimitive,hd as Box,YG as CallbackProperty,he as CameraUtil,pu as CameraVideo,Rd as CameraVideoLayer,RG as Cartesian2,OG as Cartesian3,yu as ChartLayer,ii as Circle,Pp as CircleBlurMaterialProperty,Mp as CircleDiffuseMaterialProperty,bp as CircleFadeMaterialProperty,Ap as CirclePulseMaterialProperty,Tm as CircleScan,Sp as CircleScanMaterialProperty,Ip as CircleSpiralMaterialProperty,Lp as CircleVaryMaterialProperty,Dp as CircleWaveMaterialProperty,qG as ClassificationType,Pe as ClippingDirection,uH as ClippingPlane,fH as ClippingPlaneCollection,_H as ClippingPolygon,gH as ClippingPolygonCollection,Xc as CloudPrimitive,Lc as ClusterLayer,HG as Color,KG as ColorMaterialProperty,Ui as ContourLine,Ce as CoordTransform,cd as Corridor,kc as CustomBillboard,Ch as CustomGeographicTilingScheme,Nc as CustomLabel,Th as CustomMercatorTilingScheme,nH as CustomShader,aH as CustomShaderMode,oH as CustomShaderTranslucencyMode,dd as Cylinder,Dc as CzmlLayer,Jc as DiffuseWallPrimitive,Hc as DivIcon,D as DomUtil,Jt as DoubleArrow,zc as DynamicBillboard,Rc as DynamicLayer,Fc as DynamicModel,W0 as Effect,Qc as ElecEllipsoidPrimitive,pd as Ellipse,hH as Ellipsoid,Rp as EllipsoidElectricMaterialProperty,Op as EllipsoidTrailMaterialProperty,xH as FeatureDetection,Oc as FeatureGridLayer,Qt as FineArrow,Kc as FlowLinePrimitive,Em as Flying,Kt as GatheringPlace,Et as GeoJsonLayer,it as GeoTerrainProvider,Pu as GeoTools,JG as GeographicTilingScheme,xu as GlobeClipping,Pm as GlobeRotate,vd as GpxLayer,wd as GraticuleLayer,xd as GroundPrimitiveLayer,oh as GroundSkyBox,Pd as HeatMapLayer,VG as HeightReference,ZG as HorizontalOrigin,Md as HtmlLayer,Wc as I3S,bd as I3SLayer,$G as ImageMaterialProperty,xh as ImageryLayerFactory,V as ImageryType,UG as JulianDate,jm as KeyboardRoaming,Ad as KmlLayer,ri as Label,Sd as LabelLayer,ti as LabelPrimitive,I as Layer,Ic as LayerGroup,Tt as LayerType,ed as LightCylinderPrimitive,TH as LightingModel,$e as LngLatArray,U as LngLatPoint,zG as Material,Gc as Math,kG as Matrix3,NG as Matrix4,ou as Measure,ge as MeasureType,qt as Model,mH as ModelAnimationLoop,Ze as ModelEventType,Eu as ModelManager,td as ModelPrimitive,B as MouseEventType,we as MouseMode,LG as NearFarScalar,x as Overlay,Z as OverlayType,v as P,v as Parse,ud as Plane,uu as PlaneVideo,Od as PlaneVideoLayer,k0 as Plot,C as PlotUtil,si as Point,rd as PointPrimitive,ot as Polygon,nt as Polyline,yd as PolylineAdapter,rH as PolylineArrowMaterialProperty,eH as PolylineDashMaterialProperty,kp as PolylineFlickerMaterialProperty,Np as PolylineFlowMaterialProperty,tH as PolylineGlowMaterialProperty,zp as PolylineImageTrailMaterialProperty,Fp as PolylineLightingMaterialProperty,Gp as PolylineLightingTrailMaterialProperty,iH as PolylineOutlineMaterialProperty,sd as PolylinePrimitive,Ne as PolylineShape,Hp as PolylineTrailMaterialProperty,gd as PolylineVolume,X as Position,cu as PositionEditor,Wi as PositionEditorType,Id as PrimitiveLayer,Wp as RadarLineMaterialProperty,bm as RadarScan,Bp as RadarSweepMaterialProperty,Up as RadarWaveMaterialProperty,Ld as RasterTileLayer,ai as Rect,WG as Rectangle,cH as Resource,Ym as RoamingController,qm as RoamingPath,li as S3MLayer,ad as ScanCirclePrimitive,z as SceneEventType,FG as SceneMode,BG as ShadowMode,Vi as Shadows,Zi as SightLine,GG as SkyBox,md as Sphere,Dt as SurfacePoint,Sl as SurfacePoints,y as T,$t as TailedAttackArrow,Zt as TdtTerrainProvider,Cu as TerrainClipping,Ac as TerrainFactory,fe as TerrainType,CH as TextureUniform,jt as Thing,re as TileSetEventType,Bc as Tileset,Tu as TilesetClipping,li as TilesetLayer,XG as TilesetStyle,Dd as TopoJsonLayer,Jm as Track,Xm as TrackController,Be as TrackViewMode,od as TrailLinePrimitive,y as Transform,Sc as Underground,lH as UniformType,yH as UrlTemplateImageryProvider,T as Util,AH as VERSION,Je as VectorLayer,jG as VerticalOrigin,nd as VideoPrimitive,Tf as Viewer,ji as Viewshed,_d as Wall,Vp as WallImageTrailMaterialProperty,jp as WallLineTrailMaterialProperty,qp as WallTrailMaterialProperty,Xp as WaterMaterialProperty,ld as WaterPrimitive,j0 as Weather,wH as WebMapServiceImageryProvider,vH as WebMercatorProjection,QG as WebMercatorTilingScheme,zd as WindLayer,MH as config,pH as createElevationBandMaterial,dH as createGooglePhotorealistic3DTileset,ne as getLib,bH as ready,_l as registerLib,sH as writeTextToCanvas};
|
package/dist/pggis.min.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* 盘古地理信息系统 PanGu Gis
|
|
3
3
|
* PanGu Gis For Cesium SDK
|
|
4
4
|
*
|
|
5
|
-
* 版本信息:5.1.
|
|
6
|
-
* 编译日期:2025-10-
|
|
5
|
+
* 版本信息:5.1.15
|
|
6
|
+
* 编译日期:2025-10-24
|
|
7
7
|
* 版权所有:Copyright by PanGu Gis http://www.pggis.com
|
|
8
8
|
* 使用单位:智企华章
|
|
9
9
|
*/
|
|
@@ -16515,7 +16515,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAAA0CAYAAAAXBNP2AAAACXBIWXMAAA
|
|
|
16515
16515
|
* @property {string} IMG_PARTICLES - base64编码的粒子图像数据
|
|
16516
16516
|
* @license MIT
|
|
16517
16517
|
* @copyright © 2025 Company Name
|
|
16518
|
-
*/var Mp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjExQTg0NDEyMDEzQjExRUFBNDhBRjhGMUMzOUUyNTU0IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjExQTg0NDEzMDEzQjExRUFBNDhBRjhGMUMzOUUyNTU0Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTFBODQ0MTAwMTNCMTFFQUE0OEFGOEYxQzM5RTI1NTQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTFBODQ0MTEwMTNCMTFFQUE0OEFGOEYxQzM5RTI1NTQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz41vRwAAAAE90lEQVR42uydyW4UMRCG3T2dgYSAEGs4sp44cCJBcGUJbwCvALwWPAI8ABwAiUVwgLBdkEikJEiAGMhkZqhfU1aa1sy0g+yaJPyWSupOpPjz0uVyucrJer2eG2fJ3ZgLAQhAgC0PgN8XIlkqgGLE75oih0WmRVZEvop0rHog18rnRe6IzInsthyCXFt+TuSKyGmRXZZDgK5eFrkv8l7kiUhrxN/JSo3pigSvcNmI1bCh3b5LK2+NqHyvyEF9x3z5HgqRRViOAXhW5JrCoNdei/y20gMYxhmRSyIXRY6JTMT4DENLW+SdyD19x/NajDmwmYIW79Hnn+MA4GJEAAIQgABJbMJB+n5Sl9zWZvR9DABUfkJkVt8fi3zUldAEoKl24Y2S1fPZEmBdZFHkkb4vxTLRQ5djbyUf0ncYrD/UADUB8MZno2Q19yx7gIqIAAQgAAEIQIAtYZT+85LvRnjQCoPKR3rQUgN4Y3ZeK30g8qps0qeeAzDn4TWD9+ySG+BBS90DaGnVg9a2tgnR4il9/jkOACoiAhCAAASIZpAAFl6yulO0JACo/IDrn6CedP1zxOciv6wAYNnAP3RVBeWtJQCWzG8iL/X9g4vkqNzMctzUXtintt2KM/aS+bmQaY90rb8CF6tSKiICEIAABCAAAQiwbfcFIWVCbUcc9bZDLKiYAKj4uOv7Bb+ILLj+8W7PCgC7Jhzv44Qdh9yrru8V61jPgd645gD2io+15RiC5ZA5ENNPmGmDmtrta9YAVEQE2FlrQUM/J6efU8cSAD87ojodBaccS6kgiiErGiq/qe93XT+3oGU5BJnbyKrIUs6BQZoQUEcrQ7CYagiGqeKiMgnXLXsg5uJUm/RQJKy8fGS7PMw6SgVQPrJFGZr0kCfUL/7IFjIzrLGpemBQ0kPbehL6I9vMjUh6oEVEAAIQgAAEIAABdpyj0qcK71YrqGUJANNrv+sHOcAiRpDDM1cTY1BEHk7kqyP/2Ac5vLEEQEG8aDnIoTb5ObZRWg5ywG5o1dX4ClNYxT7IISgJPsXGpLut9MCWU0S5bqkmdAa3LQEwcZDAfkZ3tthQfkwNkVeeD6kiuaUabcp6DpS9YyalrAdQ8bT1EFQVUabarND9fNuyB2gREYAABCAAAQhAAAIQoM770UgBXARCIr/koDogVlzgrWuxemBKd0m4JnBed0+5ZQ9gn3BK5LK+P4y5ewoB8DFiKO91COLFfwVuTCZV1hSoYw1APZCsFIkbN1Haaa87wwiKQe6eT27AEX6esPVVd8/kOOdAz/oz9FE0p+uGIKUeqE5C8xgSKiICEIAABCAAAQhAAAIQgAAEIAABCECA6AA+sbkREyDUUYlKD6ggZwzRkr8tewBhusisv+0in5qE/hFchoZTE0TL4p8sTbtIpyahQ4Ag5fKpSVBmfdDECvQTZjoM0U9N6KgkwH9xY7PXpPiCmq5yuaLVldHIO7jgNi5XfOEhCqNh9udHV/RnC5YAUDTftdV4/ivvwEoRVS9XXPWa1FIT5ird8jpSB+BDN3rO8AaGMnGy0I0QRYTvdk6NkOsucuhGCMAgI8Q0isaHbmAevNMhiD4P6iZhstANGiQE2PEGCRo2NcgAsQDwKnxWFdlT17/duWU1BJmuHz6A5bwbEsCScgh+qAHit3Jr1oooOPExdRBLbeJjSpuwuy30AAH+CDAAPH5ltESNYl4AAAAASUVORK5CYII=";var R_={color:r.Color.ORANGE},ao=class extends x{constructor(e,i,s,a){super(),this._center=v.parsePosition(e),this._length=i||100,this._topRadius=s||1,this._bottomRadius=a||50,this._delegate=new r.PrimitiveCollection,this._style={...R_},this._state=_.INITIALIZED}get type(){return x.getOverlayType("light-cylinder-primitive")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._updatePrimitives()}get length(){return this._length}set length(e){this._length=e,this._updatePrimitives()}get topRadius(){return this._topRadius}set topRadius(e){this._topRadius=e,this._updatePrimitives()}get bottomRadius(){return this._bottomRadius}set bottomRadius(e){this._bottomRadius=e,this._updatePrimitives()}_computeEllipsePositions(e,i){let s=r.EllipseGeometryLibrary.computeEllipsePositions({center:y.transformWGS84ToCartesian(e),semiMajorAxis:i,semiMinorAxis:i,rotation:0,granularity:.005},!1,!0),a=r.Cartesian3.unpackArray(s.outerPositions);return a.push(a[0]),a}_createCylinderInstance(e,i,s){let a=i.slice(),o=i.length,n=2*o,h=[],c=1/(o-1),d=[],p=[],f=(u,m=0)=>{let E=r.Cartographic.fromCartesian(u);return E.height+=m,r.Cartographic.toCartesian(E)};for(let u=0;u<o;u++){p.push(f(e[u],s)),h.push(u*c,0);let m=u+1,E=(u+1)%o,w=n-m;d.push(w-1,w,u),d.push(u,E,w-1)}for(let u in p)a.push(p[o-u-1]),h.push(1-u*c,1);let g=r.PolygonGeometry.createGeometry(new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(a),perPositionHeight:!0}));return g.indices=d,g.attributes.st.values=h,new r.GeometryInstance({geometry:g})}_getCircleImage(){let e=document.createElement("canvas");e.width=512,e.height=512;let i=e.getContext("2d");return i.fillStyle="rgba(255,255,255,0)",i.strokeStyle="rgba(255, 255, 255,255)",i.setLineDash([50,50]),i.lineWidth=30,i.beginPath(),i.arc(256,256,150,0,Math.PI*2,!0),i.stroke(),i.restore(),e}_getParticlesImage(e){let i=document.createElement("canvas");i.width=64,i.height=256;let s=i.getContext("2d");return s.clearRect(0,0,64,256),s.drawImage(e,0,0),s.drawImage(e,33,0),i}_updatePrimitives(){this._delegate.removeAll();let e=this._center.alt===0,i=this._computeEllipsePositions(this._center,this._topRadius),s=this._computeEllipsePositions(this._center,this._bottomRadius*.7),a=this._computeEllipsePositions(this._center,this._bottomRadius),o={geometryInstances:new r.GeometryInstance({geometry:new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(this._computeEllipsePositions(this._center,this._bottomRadius*2)),perPositionHeight:!e}),asynchronous:!1})},n=e?new r.GroundPrimitive(o):new r.Primitive(o);n.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CircleRingType,{color:this._style.color})});let h=e?new r.GroundPrimitive(o):new r.Primitive(o);h.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});let c=new r.Primitive({geometryInstances:this._createCylinderInstance(i,s,this._length),appearance:new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});e?r.GroundPrimitive.initializeTerrainHeights().then(()=>{this._delegate.add(n),this._delegate.add(h),this._delegate.add(c)}):(this._delegate.add(n),this._delegate.add(h),this._delegate.add(c)),r.Resource.fetchImage({url:Mp}).then(d=>{let p=new r.Primitive({geometryInstances:this._createCylinderInstance(i,a,this._length),appearance:new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CylinderParticlesType,{color:this._style.color,image:this._getParticlesImage(d)})}),asynchronous:!1});this._delegate.add(p)})}_mountedHook(){this.center=this._center}update(e){this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(T.merge(this._style,e),this)}destroy(){return r.destroyObject(this)}};x.registerType("light-cylinder-primitive");var oo=ao;var no=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._modelUrl=i,this._delegate=r.Model.fromGltfAsync({url:i}),this._modelEvent=new br(this._delegate),this._state=_.INITIALIZED}get type(){return x.getOverlayType("model_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e);let i=y.transformWGS84ToCartesian(this._position);this._delegate.then(s=>{s.modelMatrix=r.Transforms.headingPitchRollToFixedFrame(i,new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))})}get modelUrl(){return this._modelUrl}set modelUrl(e){this._modelUrl=e,this._delegate=r.Model.fromGltfAsync({url:e,...this._style}),this.position=this._position}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(T.merge(this._style,e),this._delegate.then(i=>{T.merge(i,e)}),this)}on(e,i,s){return this._overlayEvent.on(e,i,s||this),this._modelEvent.on(e,i,s||this),this}off(e,i,s){return this._overlayEvent.off(e,i,s||this),this._modelEvent.off(e,i,s||this),this}};x.registerType("model_primitive");var lo=no;var bp={pixelSize:8,outlineColor:r.Color.BLUE,outlineWidth:2},ho=class extends x{constructor(e){super(),this._position=v.parsePosition(e),this._delegate={position:void 0},this._state=_.INITIALIZED}get type(){return x.getOverlayType("point_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}_mountedHook(){this.position=this._position,T.merge(this._delegate,bp,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,T.merge(this._style,e),T.merge(this._delegate,bp,this._style),this)}};x.registerType("point_primitive");var co=ho;var po=class extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate={positions:[]},this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_primitive")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get center(){return ke(this._positions)}get distance(){return ce(this._positions)}_mountedHook(){this.positions=this._positions}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate,e),this)}};x.registerType("polyline_primitive");var mo=po;var uo=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._radius=i,this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("scan_circle_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.geometryInstances.geometry=new r.EllipseGeometry({center:y.transformWGS84ToCartesian(this._position),semiMajorAxis:this._radius,semiMinorAxis:this._radius})}get radius(){return this._radius}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry.semiMajorAxis=this._radius,this._delegate.geometryInstances.geometry.semiMinorAxis=this._radius}_setAppearance(){var e,i;this._style&&(this._delegate.appearance=new r.MaterialAppearance({material:r.Material.fromType("CircleScan",{color:((e=this._style)==null?void 0:e.color)||r.Color.WHITE,speed:((i=this._style)==null?void 0:i.speed)||10})}))}_mountedHook(){this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(T.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("scan_circle_primitive");var fo=uo;var _o=class extends x{constructor(e,i=1){super(),this._positions=v.parsePositions(e),this._width=i,this._delegate=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("trail_line_primitive")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=new r.PolylineGeometry({positions:y.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}_setAppearance(){var e,i;this._delegate.appearance=new r.PolylineMaterialAppearance({material:r.Material.fromType("PolylineTrail",{color:((e=this._style)==null?void 0:e.color)||new r.Color(1,0,0,.7),speed:((i=this._style)==null?void 0:i.speed)||5})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(T.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("trail_line_primitive");var go=_o;var yo=class extends x{constructor(e,i){super(),this._positions=v.parsePositions(e),this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._video=i,this._state=_.INITIALIZED}get type(){return x.getOverlayType("video_primitive")}get positions(){return this._positions}set positions(e){var i,s,a,o;this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=r.PolygonGeometry.fromPositions({positions:y.transformWGS84ArrayToCartesianArray(this._positions),height:(i=this._style)==null?void 0:i.height,extrudedHeight:(s=this._style)==null?void 0:s.extrudedHeight,closeTop:(a=this._style)==null?void 0:a.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:r.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get video(){return this._video}set video(e){this._video=e,this._setAppearance()}_setAppearance(){this._delegate.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType("Image",{image:this._video})})}_mountedHook(){this.positions=this._positions,this.video=this._video}setStyle(e){var i;return Object.keys(e).length===0?this:(T.merge(this._style,e),(i=this._style)!=null&&i.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}};x.registerType("video_primitive");var vo=yo;var wo=class extends x{constructor(e,i=[]){super(),this._positions=v.parsePositions(e),this._holes=i.map(s=>v.parsePositions(s)),this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("water_primitive")}get positions(){return this._positions}set positions(e){var i,s,a,o;this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(n=>new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(n)))),height:(i=this._style)==null?void 0:i.height,extrudedHeight:(s=this._style)==null?void 0:s.extrudedHeight,closeTop:(a=this._style)==null?void 0:a.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:r.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}_setAppearance(){var e,i,s,a,o,n,h,c;this._style&&(this._delegate.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType("Water",{baseWaterColor:((e=this._style)==null?void 0:e.baseWaterColor)||new r.Color(.2,.3,.6,1),blendColor:((i=this._style)==null?void 0:i.blendColor)||new r.Color(0,1,.699,1),specularMap:((s=this._style)==null?void 0:s.specularMap)||r.Material.DefaultImageId,normalMap:((a=this._style)==null?void 0:a.normalMap)||r.Material.DefaultImageId,frequency:((o=this._style)==null?void 0:o.frequency)||1e3,animationSpeed:((n=this._style)==null?void 0:n.animationSpeed)||.01,amplitude:((h=this._style)==null?void 0:h.amplitude)||10,specularIntensity:((c=this._style)==null?void 0:c.specularIntensity)||.5})}))}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var i;return Object.keys(e).length===0?this:(T.merge(this._style,e),(i=this._style)!=null&&i.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("water_primitive");var xo=wo;var Co=class l extends x{constructor(e,i){super(),this._delegate=new r.Entity({billboard:{}}),this._position=v.parsePosition(e),this._icon=i,this._size=[32,32],this._state=_.INITIALIZED}get type(){return x.getOverlayType("billboard")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get icon(){return this._icon}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get size(){return this._size}set size(e){if(!Array.isArray(e))throw new Error("Billboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}static fromEntity(e){var o;let i,s=r.JulianDate.now(),a=y.transformCartesianToWGS84(e.position.getValue(s));return e.billboard&&(i=new l(a,e.billboard.image.getValue(s)),i.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}),i}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,T.merge(this._style,e),T.merge(this._delegate.billboard,e),this)}};x.registerType("billboard");var et=Co;var To=class extends x{constructor(e,i,s,a){super(),this._position=v.parsePosition(e),this._length=i,this._width=s,this._height=a,this._delegate=new r.Entity({box:{dimensions:{x:+this._length,y:+this._width,z:+this._height}}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("box")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get length(){return this._length}set length(e){let i=this._delegate.box.dimensions.getValue();this._length=e||0,i.x=+this._length,this._delegate.box.dimensions.setValue(i)}get width(){return this._width}set width(e){let i=this._delegate.box.dimensions.getValue();this._width=e||0,i.y=+this._width,this._delegate.box.dimensions.setValue(i)}get height(){return this._height}set height(e){let i=this._delegate.box.dimensions.getValue();this._height=e||0,i.z=+this._height,this._delegate.box.dimensions.setValue(i)}_mountedHook(){this.position=this._position}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.width&&delete e.height,T.merge(this._style,e),T.merge(this._delegate.box,e),this)}};x.registerType("box");var Eo=To;var Po=class extends x{constructor(e,i){super(),this._delegate=new r.Entity({polygon:{}}),this._center=v.parsePosition(e),this._radius=+i||0,this._rotateAmount=0,this._stRotation=0,this._state=_.INITIALIZED}get type(){return x.getOverlayType("circle")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get radius(){return this._radius}set radius(e){this._radius=+e,this._delegate.polygon.hierarchy=this._computeHierarchy()}get rotateAmount(){return this._rotateAmount}set rotateAmount(e){this._rotateAmount=+e,this._delegate.polygon.stRotation=new r.CallbackProperty(()=>(this._stRotation+=this._rotateAmount,(this._stRotation>=360||this._stRotation<=-360)&&(this._stRotation=0),r.Math.toRadians(this._stRotation)),!1)}_computeHierarchy(){let e=new r.PolygonHierarchy,i=r.EllipseGeometryLibrary.computeEllipsePositions({center:y.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),s=r.Cartesian3.unpackArray(i.outerPositions);return s.push(s[0]),e.positions=s,e}_mountedHook(){this.center=this._center}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this._center),this._delegate.label={...i,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polygon,e),this)}};x.registerType("circle");var Nt=Po;var Mo=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({corridor:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("corridor")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.corridor.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.corridor,e),this)}};x.registerType("corridor");var bo=Mo;var Ao=class extends x{constructor(e,i,s,a){super(),this._position=v.parsePosition(e),this._length=+i||0,this._topRadius=+s||0,this._bottomRadius=+a||0,this._delegate=new r.Entity({cylinder:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("cylinder")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get length(){return this._length}set length(e){this._length=+e||0,this._delegate.cylinder.length=this._length}get topRadius(){return this._topRadius}set topRadius(e){this._topRadius=+e||0,this._delegate.cylinder.topRadius=this._topRadius}get bottomRadius(){return this._bottomRadius}set bottomRadius(e){this._bottomRadius=+e||0,this._delegate.cylinder.bottomRadius=this._bottomRadius}_mountedHook(){this.position=this._position,this.length=this._length,this.topRadius=this._topRadius,this.bottomRadius=this._bottomRadius}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.topRadius&&delete e.bottomRadius,T.merge(this._style,e),T.merge(this._delegate.cylinder,e),this)}};x.registerType("cylinder");var So=Ao;var Io=class extends x{constructor(e,i,s){super(),this._position=v.parsePosition(e),this._semiMajorAxis=+i||0,this._semiMinorAxis=+s||0,this._delegate=new r.Entity({ellipse:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("ellipse")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get semiMajorAxis(){return this._semiMajorAxis}set semiMajorAxis(e){this._semiMajorAxis=+e||0,this._delegate.ellipse.semiMajorAxis=this._semiMajorAxis}get semiMinorAxis(){return this._semiMinorAxis}set semiMinorAxis(e){this._semiMinorAxis=+e||0,this._delegate.ellipse.semiMinorAxis=this._semiMinorAxis}_mountedHook(){this.position=this._position,this.semiMajorAxis=this._semiMajorAxis,this.semiMinorAxis=this._semiMinorAxis}setStyle(e){return Object.keys(e).length===0?this:(delete e.semiMajorAxis&&delete e.semiMinorAxis,T.merge(this._style,e),T.merge(this._delegate.ellipse,e),this)}};x.registerType("ellipse");var Lo=Io;var Do=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._radius=i||{x:10,y:10,z:10},this._delegate=new r.Entity({ellipsoid:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("sphere")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get radius(){return this._radius}set radius(e){this._radius=e||{x:10,y:10,z:10},this._delegate.ellipsoid.radii=this._radius}_mountedHook(){this.position=this._position,this.radius=this._radius}setStyle(e){return Object.keys(e).length===0?this:(delete e.radius,T.merge(this._style,e),T.merge(this._delegate.ellipsoid,e),this)}};x.registerType("sphere");var Ro=Do;var Oo=class l extends x{constructor(e,i){super(),this._delegate=new r.Entity({label:{}}),this._position=v.parsePosition(e),this._text=i,this._state=_.INITIALIZED}get type(){return x.getOverlayType("label")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get text(){return this._text}set text(e){this._text=e,this._delegate.label.text=this._text}static fromEntity(e){var o;let i=r.JulianDate.now(),s=y.transformCartesianToWGS84(e.position.getValue(i)),a;return e.billboard&&(a=new l(s,e.name),a.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(i)}),a}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,i){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,T.merge(this._style,e),T.merge(this._delegate.label,e),this)}};x.registerType("label");var zt=Oo;var ko=class extends x{constructor(e,i,s,a={}){if(super(),this._position=v.parsePosition(e),this._width=+i||100,this._height=+s||100,a.normal&&typeof a.normal=="string"){let o=String(a.normal).toLocaleUpperCase();a.normal=o==="X"?r.Cartesian3.UNIT_X:o==="Y"?r.Cartesian3.UNIT_Y:r.Cartesian3.UNIT_Z}else a.normal=r.Cartesian3.UNIT_Z;this._normal=a.normal,this._distance=a.distance||0,this._delegate=new r.Entity({plane:{dimensions:{x:this._width,y:this._height},plane:new r.Plane(this._normal,this._distance)}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("plane")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get width(){return this._width}set width(e){let i=this._delegate.plane.dimensions.getValue();this._width=+e||0,i.x=this._width}get height(){return this._height}set height(e){let i=this._delegate.plane.dimensions.getValue();this._height=+e||0,i.y=this._height}get distance(){return this._distance}set distance(e){this._distance=e,this._delegate.plane.plane.distance=e}_mountedHook(){this.position=this._position,this.distance=this._distance}setStyle(e){return Object.keys(e).length===0?this:(delete e.dimensions&&delete["plane"],T.merge(this._style,e),T.merge(this._delegate.plane,e),this)}};x.registerType("plane");var No=ko;var Ap={pixelSize:8,outlineColor:r.Color.BLUE,outlineWidth:2},zo=class l extends x{constructor(e){super(),this._delegate=new r.Entity({point:{}}),this._position=v.parsePosition(e),this._state=_.INITIALIZED}get type(){return x.getOverlayType("point")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}static fromEntity(e){var o;let i,s=r.JulianDate.now(),a=y.transformCartesianToWGS84(e.position.getValue(s));return i=new l(a),i.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)},i}_mountedHook(){this.position=this._position,T.merge(this._delegate.point,Ap,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,T.merge(this._style,e),T.merge(this._delegate.point,Ap,this._style),this)}};x.registerType("point");var Ft=zo;var Fo=class l extends x{constructor(e){super(),this._delegate=new r.Entity({polygon:{}}),this._positions=v.parsePositions(e),this._holes=[],this._state=_.INITIALIZED}get type(){return x.getOverlayType("polygon")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get holes(){return this._holes}set holes(e){e&&e.length&&(this._holes=e.map(i=>v.parsePositions(i)),this._delegate.polygon.hierarchy=this._computeHierarchy())}get center(){return ke([...this._positions,this._positions[0]])}get area(){return Oe(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polygon){let o=y.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(s).positions);i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_computeHierarchy(){let e=new r.PolygonHierarchy;return e.positions=y.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map(i=>new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(i))),e}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...i},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polygon,e),this)}};x.registerType("polygon");var tt=Fo;var Go=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polyline:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polyline.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get center(){return ke(this._positions)}get distance(){return ce(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...i},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polyline,e),this)}};x.registerType("polyline");var it=Go;var Ho=class extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({rectangle:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("rect")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.rectangle.coordinates=r.Rectangle.fromCartesianArray(y.transformWGS84ArrayToCartesianArray(this._positions))}_mountedHook(){this.positions=this._positions}setLabel(e,i){let s=this._delegate.rectangle.coordinates.getValue();return this._delegate.position=r.Cartographic.toCartesian(r.Rectangle.center(s,new r.Cartographic)),this._delegate.label={...i,text:e},this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.rectangle,e),this)}};x.registerType("rect");var Gt=Ho;var Wo=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({wall:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("wall")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.wall.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.wall,e),this)}};x.registerType("wall");var Bo=Wo;var Uo=class{static getShapeForPipeline(e={}){let i=e.radius||1,s=e.thicknes||i/3,a=Math.ceil(360/(e.slices||60)),o=e.startAngle||0,n=e.endAngle||o+360,h=e.vscale||1,c=e.hscale||1,d=[];for(let p=o;p<=n;p+=a){let f=r.Math.toRadians(p);d.push({x:i*c*Math.cos(f),y:i*h*Math.sin(f)})}for(let p=n;p>=o;p-=a){let f=r.Math.toRadians(p);d.push({x:(i-s)*c*Math.cos(f),y:(i-s)*h*Math.sin(f)})}return d}static getShapeForCircle(e={}){let i=e.radius||1,s=Math.ceil(360/(e.slices||60)),a=e.startAngle||0,o=e.endAngle||a+360,n=e.vscale||1,h=e.hscale||1,c=[];for(let d=a;d<=o;d+=s){let p=r.Math.toRadians(d);c.push({x:i*h*Math.cos(p),y:i*n*Math.sin(p)})}return c}static getShapeForStar(e={}){console.log(e.slices||6);let i=e.radius||1,s=e.thicknes||i/3,a=e.slices||6,o=e.startAngle||0;console.log(a);let n=r.Math.toRadians(o),h=Math.PI/a,c=2*a,d=new Array(c);for(let p=0;p<c;p++){let f=p%2===0?i:s,g=n+p*h;d[p]=new r.Cartesian2(Math.cos(g)*f,Math.sin(g)*f)}return d}},Pe=Uo;var Vo=class l extends x{constructor(e={}){super(),this._positions=v.parsePositions(e.positions||[]);let i=e.shape||e.shapePositions;switch(e.radius=e.radius||10,i){case"pipeline":this._shape=Pe.getShapeForPipeline(e);break;case"circle":this._shape=Pe.getShapeForCircle(e);break;case"star":this._shape=Pe.getShapeForStar(e);break;default:this._shape=i;break}this._delegate=new r.Entity({polylineVolume:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_volume")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polylineVolume.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get shape(){return this._shape}set shape(e){this._shape=e||[],this._delegate.polylineVolume.shape=this._shape}static fromEntity(e,i){var o;let s,a=r.JulianDate.now();return e.polyline&&(i.positions=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(a)),s=new l(i),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(a)}),s}_mountedHook(){this.positions=this._positions,this.shape=this._shape}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polylineVolume,e),this)}};x.registerType("polyline_volume");var Zo=Vo;var jo=class l extends x{constructor(e={}){super(),e.radius=e.radius||10,console.log("PolylineAdapter",e);let i=e.branches;this._centerRadius=0,i==null||i.forEach(s=>{this._centerRadius=Math.max(this._centerRadius,s.radius)}),this._center=v.parsePosition(e.center),this._type=e.type||i.length>2?"multiway":"elbow",this._instances=[],this._type==="multiway"&&i.length>2?i&&i.forEach(s=>{let a={lat:this._center.lat,lng:this._center.lng,alt:this._center.alt+(this._centerRadius-s.radius)};this._instances.push(new r.GeometryInstance({geometry:new r.PolylineVolumeGeometry({polylinePositions:y.transformWGS84ArrayToCartesianArray([a,...s.positions]),shapePositions:Pe.getShapeForPipeline({radius:s.radius}),cornerType:r.CornerType.MITERED,vertexFormat:r.PerInstanceColorAppearance.VERTEX_FORMAT})}))}):this._type==="elbow"&&i.length===2&&this._instances.push(new r.GeometryInstance({geometry:new r.PolylineVolumeGeometry({polylinePositions:y.transformWGS84ArrayToCartesianArray([...i[0].positions.reverse(),this._center,...i[1].positions]),shapePositions:Pe.getShapeForPipeline({radius:this._centerRadius}),cornerType:r.CornerType.MITERED,vertexFormat:r.PerInstanceColorAppearance.VERTEX_FORMAT})})),this._center.alt=this._center.alt+this._centerRadius,this._instances.push(new r.GeometryInstance({geometry:new r.SphereGeometry({radius:this._centerRadius*1.2,stackPartitions:e.slices,slicePartitions:e.slices,vertexFormat:r.VertexFormat.POSITION_AND_NORMAL}),modelMatrix:r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._center)),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(r.Color.RED.withAlpha(.8))}})),this._delegate=new r.Primitive({geometryInstances:this._instances,appearance:new r.PerInstanceColorAppearance({flat:!0,faceForward:!0}),asynchronous:!1}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_adapter")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._delegate.modelMatrix=r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._center))}static fromEntity(e,i){var o;let s,a=r.JulianDate.now();return e.polyline&&(i.positions=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(a)),s=new l(i),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(a)}),s}_mountedHook(){}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),this)}};x.registerType("polyline_adapter");var Yo=jo;var qo=class extends I{constructor(e,i,s={}){if(!i)throw new Error("GeoJsonLayer\uFF1Athe url invalid");super(e),this._delegate=r.GeoJsonDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("geojson")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}_createBillboard(e){return e.position&&e.billboard?et.fromEntity(e):null}_createPolyline(e){if(e.polyline)return it.fromEntity(e)}_createPolygon(e){if(e.polygon)return tt.fromEntity(e)}_createModel(e,i){if(e)return St.fromEntity(e,i)}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(o=>{e.call(i,o)})}),this}toVectorLayer(){let e=new Ze(this.id);return this.eachOverlay(i=>{i.billboard?e.addOverlay(this._createBillboard(i)):i.polyline?e.addOverlay(this._createPolyline(i)):i.polygon&&e.addOverlay(this._createPolygon(i))},this),e}toModelLayer(e){let i=new Ze(this.id);return this.eachOverlay(s=>{i.addOverlay(this._createModel(s,e))},this),i}};I.registerType("geojson");var ht=qo;var Xo=class extends I{constructor(e,i,s={}){if(!i)throw new Error("GpxLayer: the url is empty");super(e),this._delegate=r.KmlDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("gpx")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(o=>{e.call(i,o)})}),this}};I.registerType("gpx");var Jo=Xo;var O_={radialColor:r.Color.WHITE,radialWidth:2,showRadial:!0,LabelColor:r.Color.YELLOW,weftColor:r.Color.WHITE,weftWidth:2},Qo=class extends I{constructor(e,i){super(e),this._options={...O_,...i},this._delegate=new r.CustomDataSource(e),this._state=_.INITIALIZED}get type(){return I.getLayerType("graticule")}_addedHook(){for(let e=0;e<36;e++)this._delegate.entities.add({polyline:{positions:r.Cartesian3.fromDegreesArray([e*10,89.5,e*10,-89.5]),material:this._options.radialColor,width:this._options.radialWidth},show:this._options.showRadial}),this._delegate.entities.add({position:r.Cartesian3.fromDegrees(e*10,0),label:{text:e*10+"\xB0",font:"12px",fillColor:this._options.LabelColor}});for(let e=0;e<18;e++){let i=[];for(let s=0;s<129;s++)i.push(-180+s*(360/128),(e<9?e:-e)*10);this._delegate.entities.add({polyline:{positions:r.Cartesian3.fromDegreesArray(i),material:this._options.weftColor,width:this._options.weftWidth}})}}};I.registerType("graticule");var Ko=Qo;var $o=class extends I{constructor(e){super(e),this._delegate=new r.PrimitiveCollection,this._isGround=!0,this._state=_.INITIALIZED}get type(){return I.getLayerType("ground_primitive")}clear(){return this._delegate&&this._delegate.removeAll(),this._cache={},this._state=_.CLEARED,this}};I.registerType("ground_primitive");var en=$o;var Ip=[].indexOf||function(l){for(let e=0,i=this.length;e<i;e++)if(e in this&&this[e]===l)return e;return-1},mi=`attribute vec4 position;
|
|
16518
|
+
*/var Mp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjExQTg0NDEyMDEzQjExRUFBNDhBRjhGMUMzOUUyNTU0IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjExQTg0NDEzMDEzQjExRUFBNDhBRjhGMUMzOUUyNTU0Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTFBODQ0MTAwMTNCMTFFQUE0OEFGOEYxQzM5RTI1NTQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTFBODQ0MTEwMTNCMTFFQUE0OEFGOEYxQzM5RTI1NTQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz41vRwAAAAE90lEQVR42uydyW4UMRCG3T2dgYSAEGs4sp44cCJBcGUJbwCvALwWPAI8ABwAiUVwgLBdkEikJEiAGMhkZqhfU1aa1sy0g+yaJPyWSupOpPjz0uVyucrJer2eG2fJ3ZgLAQhAgC0PgN8XIlkqgGLE75oih0WmRVZEvop0rHog18rnRe6IzInsthyCXFt+TuSKyGmRXZZDgK5eFrkv8l7kiUhrxN/JSo3pigSvcNmI1bCh3b5LK2+NqHyvyEF9x3z5HgqRRViOAXhW5JrCoNdei/y20gMYxhmRSyIXRY6JTMT4DENLW+SdyD19x/NajDmwmYIW79Hnn+MA4GJEAAIQgABJbMJB+n5Sl9zWZvR9DABUfkJkVt8fi3zUldAEoKl24Y2S1fPZEmBdZFHkkb4vxTLRQ5djbyUf0ncYrD/UADUB8MZno2Q19yx7gIqIAAQgAAEIQIAtYZT+85LvRnjQCoPKR3rQUgN4Y3ZeK30g8qps0qeeAzDn4TWD9+ySG+BBS90DaGnVg9a2tgnR4il9/jkOACoiAhCAAASIZpAAFl6yulO0JACo/IDrn6CedP1zxOciv6wAYNnAP3RVBeWtJQCWzG8iL/X9g4vkqNzMctzUXtintt2KM/aS+bmQaY90rb8CF6tSKiICEIAABCAAAQiwbfcFIWVCbUcc9bZDLKiYAKj4uOv7Bb+ILLj+8W7PCgC7Jhzv44Qdh9yrru8V61jPgd645gD2io+15RiC5ZA5ENNPmGmDmtrta9YAVEQE2FlrQUM/J6efU8cSAD87ojodBaccS6kgiiErGiq/qe93XT+3oGU5BJnbyKrIUs6BQZoQUEcrQ7CYagiGqeKiMgnXLXsg5uJUm/RQJKy8fGS7PMw6SgVQPrJFGZr0kCfUL/7IFjIzrLGpemBQ0kPbehL6I9vMjUh6oEVEAAIQgAAEIAABdpyj0qcK71YrqGUJANNrv+sHOcAiRpDDM1cTY1BEHk7kqyP/2Ac5vLEEQEG8aDnIoTb5ObZRWg5ywG5o1dX4ClNYxT7IISgJPsXGpLut9MCWU0S5bqkmdAa3LQEwcZDAfkZ3tthQfkwNkVeeD6kiuaUabcp6DpS9YyalrAdQ8bT1EFQVUabarND9fNuyB2gREYAABCAAAQhAAAIQoM770UgBXARCIr/koDogVlzgrWuxemBKd0m4JnBed0+5ZQ9gn3BK5LK+P4y5ewoB8DFiKO91COLFfwVuTCZV1hSoYw1APZCsFIkbN1Haaa87wwiKQe6eT27AEX6esPVVd8/kOOdAz/oz9FE0p+uGIKUeqE5C8xgSKiICEIAABCAAAQhAAAIQgAAEIAABCECA6AA+sbkREyDUUYlKD6ggZwzRkr8tewBhusisv+0in5qE/hFchoZTE0TL4p8sTbtIpyahQ4Ag5fKpSVBmfdDECvQTZjoM0U9N6KgkwH9xY7PXpPiCmq5yuaLVldHIO7jgNi5XfOEhCqNh9udHV/RnC5YAUDTftdV4/ivvwEoRVS9XXPWa1FIT5ird8jpSB+BDN3rO8AaGMnGy0I0QRYTvdk6NkOsucuhGCMAgI8Q0isaHbmAevNMhiD4P6iZhstANGiQE2PEGCRo2NcgAsQDwKnxWFdlT17/duWU1BJmuHz6A5bwbEsCScgh+qAHit3Jr1oooOPExdRBLbeJjSpuwuy30AAH+CDAAPH5ltESNYl4AAAAASUVORK5CYII=";var R_={color:r.Color.ORANGE},ao=class extends x{constructor(e,i,s,a){super(),this._center=v.parsePosition(e),this._length=i||100,this._topRadius=s||1,this._bottomRadius=a||50,this._delegate=new r.PrimitiveCollection,this._style={...R_},this._state=_.INITIALIZED}get type(){return x.getOverlayType("light-cylinder-primitive")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._updatePrimitives()}get length(){return this._length}set length(e){this._length=e,this._updatePrimitives()}get topRadius(){return this._topRadius}set topRadius(e){this._topRadius=e,this._updatePrimitives()}get bottomRadius(){return this._bottomRadius}set bottomRadius(e){this._bottomRadius=e,this._updatePrimitives()}_computeEllipsePositions(e,i){let s=r.EllipseGeometryLibrary.computeEllipsePositions({center:y.transformWGS84ToCartesian(e),semiMajorAxis:i,semiMinorAxis:i,rotation:0,granularity:.005},!1,!0),a=r.Cartesian3.unpackArray(s.outerPositions);return a.push(a[0]),a}_createCylinderInstance(e,i,s){let a=i.slice(),o=i.length,n=2*o,h=[],c=1/(o-1),d=[],p=[],f=(u,m=0)=>{let E=r.Cartographic.fromCartesian(u);return E.height+=m,r.Cartographic.toCartesian(E)};for(let u=0;u<o;u++){p.push(f(e[u],s)),h.push(u*c,0);let m=u+1,E=(u+1)%o,w=n-m;d.push(w-1,w,u),d.push(u,E,w-1)}for(let u in p)a.push(p[o-u-1]),h.push(1-u*c,1);let g=r.PolygonGeometry.createGeometry(new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(a),perPositionHeight:!0}));return g.indices=d,g.attributes.st.values=h,new r.GeometryInstance({geometry:g})}_getCircleImage(){let e=document.createElement("canvas");e.width=512,e.height=512;let i=e.getContext("2d");return i.fillStyle="rgba(255,255,255,0)",i.strokeStyle="rgba(255, 255, 255,255)",i.setLineDash([50,50]),i.lineWidth=30,i.beginPath(),i.arc(256,256,150,0,Math.PI*2,!0),i.stroke(),i.restore(),e}_getParticlesImage(e){let i=document.createElement("canvas");i.width=64,i.height=256;let s=i.getContext("2d");return s.clearRect(0,0,64,256),s.drawImage(e,0,0),s.drawImage(e,33,0),i}_updatePrimitives(){this._delegate.removeAll();let e=this._center.alt===0,i=this._computeEllipsePositions(this._center,this._topRadius),s=this._computeEllipsePositions(this._center,this._bottomRadius*.7),a=this._computeEllipsePositions(this._center,this._bottomRadius),o={geometryInstances:new r.GeometryInstance({geometry:new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(this._computeEllipsePositions(this._center,this._bottomRadius*2)),perPositionHeight:!e}),asynchronous:!1})},n=e?new r.GroundPrimitive(o):new r.Primitive(o);n.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CircleRingType,{color:this._style.color})});let h=e?new r.GroundPrimitive(o):new r.Primitive(o);h.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});let c=new r.Primitive({geometryInstances:this._createCylinderInstance(i,s,this._length),appearance:new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});e?r.GroundPrimitive.initializeTerrainHeights().then(()=>{this._delegate.add(n),this._delegate.add(h),this._delegate.add(c)}):(this._delegate.add(n),this._delegate.add(h),this._delegate.add(c)),r.Resource.fetchImage({url:Mp}).then(d=>{let p=new r.Primitive({geometryInstances:this._createCylinderInstance(i,a,this._length),appearance:new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CylinderParticlesType,{color:this._style.color,image:this._getParticlesImage(d)})}),asynchronous:!1});this._delegate.add(p)})}_mountedHook(){this.center=this._center}update(e){this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(T.merge(this._style,e),this)}destroy(){return r.destroyObject(this)}};x.registerType("light-cylinder-primitive");var oo=ao;var no=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._modelUrl=i,this._delegate=r.Model.fromGltfAsync({url:i}),this._modelEvent=new br(this._delegate),this._state=_.INITIALIZED}get type(){return x.getOverlayType("model_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e);let i=y.transformWGS84ToCartesian(this._position);this._delegate.then(s=>{s.modelMatrix=r.Transforms.headingPitchRollToFixedFrame(i,new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))})}get modelUrl(){return this._modelUrl}set modelUrl(e){this._modelUrl=e,this._delegate=r.Model.fromGltfAsync({url:e,...this._style}),this.position=this._position}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(T.merge(this._style,e),this._delegate.then(i=>{T.merge(i,e)}),this)}on(e,i,s){return this._overlayEvent.on(e,i,s||this),this._modelEvent.on(e,i,s||this),this}off(e,i,s){return this._overlayEvent.off(e,i,s||this),this._modelEvent.off(e,i,s||this),this}};x.registerType("model_primitive");var lo=no;var bp={pixelSize:8,outlineColor:r.Color.BLUE,outlineWidth:2},ho=class extends x{constructor(e){super(),this._position=v.parsePosition(e),this._delegate={position:void 0},this._state=_.INITIALIZED}get type(){return x.getOverlayType("point_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}_mountedHook(){this.position=this._position,T.merge(this._delegate,bp,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,T.merge(this._style,e),T.merge(this._delegate,bp,this._style),this)}};x.registerType("point_primitive");var co=ho;var po=class extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate={positions:[]},this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_primitive")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get center(){return ke(this._positions)}get distance(){return ce(this._positions)}_mountedHook(){this.positions=this._positions}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate,e),this)}};x.registerType("polyline_primitive");var mo=po;var uo=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._radius=i,this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("scan_circle_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.geometryInstances.geometry=new r.EllipseGeometry({center:y.transformWGS84ToCartesian(this._position),semiMajorAxis:this._radius,semiMinorAxis:this._radius})}get radius(){return this._radius}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry.semiMajorAxis=this._radius,this._delegate.geometryInstances.geometry.semiMinorAxis=this._radius}_setAppearance(){var e,i;this._style&&(this._delegate.appearance=new r.MaterialAppearance({material:r.Material.fromType("CircleScan",{color:((e=this._style)==null?void 0:e.color)||r.Color.WHITE,speed:((i=this._style)==null?void 0:i.speed)||10})}))}_mountedHook(){this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(T.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("scan_circle_primitive");var fo=uo;var _o=class extends x{constructor(e,i=1){super(),this._positions=v.parsePositions(e),this._width=i,this._delegate=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("trail_line_primitive")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=new r.PolylineGeometry({positions:y.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}_setAppearance(){var e,i;this._delegate.appearance=new r.PolylineMaterialAppearance({material:r.Material.fromType("PolylineTrail",{color:((e=this._style)==null?void 0:e.color)||new r.Color(1,0,0,.7),speed:((i=this._style)==null?void 0:i.speed)||5})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(T.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("trail_line_primitive");var go=_o;var yo=class extends x{constructor(e,i){super(),this._positions=v.parsePositions(e),this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._video=i,this._state=_.INITIALIZED}get type(){return x.getOverlayType("video_primitive")}get positions(){return this._positions}set positions(e){var i,s,a,o;this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=r.PolygonGeometry.fromPositions({positions:y.transformWGS84ArrayToCartesianArray(this._positions),height:(i=this._style)==null?void 0:i.height,extrudedHeight:(s=this._style)==null?void 0:s.extrudedHeight,closeTop:(a=this._style)==null?void 0:a.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:r.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get video(){return this._video}set video(e){this._video=e,this._setAppearance()}_setAppearance(){this._delegate.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType("Image",{image:this._video})})}_mountedHook(){this.positions=this._positions,this.video=this._video}setStyle(e){var i;return Object.keys(e).length===0?this:(T.merge(this._style,e),(i=this._style)!=null&&i.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}};x.registerType("video_primitive");var vo=yo;var wo=class extends x{constructor(e,i=[]){super(),this._positions=v.parsePositions(e),this._holes=i.map(s=>v.parsePositions(s)),this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("water_primitive")}get positions(){return this._positions}set positions(e){var i,s,a,o;this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(n=>new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(n)))),height:(i=this._style)==null?void 0:i.height,extrudedHeight:(s=this._style)==null?void 0:s.extrudedHeight,closeTop:(a=this._style)==null?void 0:a.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:r.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}_setAppearance(){var e,i,s,a,o,n,h,c;this._style&&(this._delegate.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType("Water",{baseWaterColor:((e=this._style)==null?void 0:e.baseWaterColor)||new r.Color(.2,.3,.6,1),blendColor:((i=this._style)==null?void 0:i.blendColor)||new r.Color(0,1,.699,1),specularMap:((s=this._style)==null?void 0:s.specularMap)||r.Material.DefaultImageId,normalMap:((a=this._style)==null?void 0:a.normalMap)||r.Material.DefaultImageId,frequency:((o=this._style)==null?void 0:o.frequency)||1e3,animationSpeed:((n=this._style)==null?void 0:n.animationSpeed)||.01,amplitude:((h=this._style)==null?void 0:h.amplitude)||10,specularIntensity:((c=this._style)==null?void 0:c.specularIntensity)||.5})}))}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var i;return Object.keys(e).length===0?this:(T.merge(this._style,e),(i=this._style)!=null&&i.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("water_primitive");var xo=wo;var Co=class l extends x{constructor(e,i){super(),this._delegate=new r.Entity({billboard:{}}),this._position=v.parsePosition(e),this._icon=i,this._size=[32,32],this._state=_.INITIALIZED}get type(){return x.getOverlayType("billboard")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get icon(){return this._icon}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get size(){return this._size}set size(e){if(!Array.isArray(e))throw new Error("Billboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}static fromEntity(e){var o;let i,s=r.JulianDate.now(),a=y.transformCartesianToWGS84(e.position.getValue(s));return e.billboard&&(i=new l(a,e.billboard.image.getValue(s)),i.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}),i}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,T.merge(this._style,e),T.merge(this._delegate.billboard,e),this)}};x.registerType("billboard");var et=Co;var To=class extends x{constructor(e,i,s,a){super(),this._position=v.parsePosition(e),this._length=i,this._width=s,this._height=a,this._delegate=new r.Entity({box:{dimensions:{x:+this._length,y:+this._width,z:+this._height}}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("box")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get length(){return this._length}set length(e){let i=this._delegate.box.dimensions.getValue();this._length=e||0,i.x=+this._length,this._delegate.box.dimensions.setValue(i)}get width(){return this._width}set width(e){let i=this._delegate.box.dimensions.getValue();this._width=e||0,i.y=+this._width,this._delegate.box.dimensions.setValue(i)}get height(){return this._height}set height(e){let i=this._delegate.box.dimensions.getValue();this._height=e||0,i.z=+this._height,this._delegate.box.dimensions.setValue(i)}_mountedHook(){this.position=this._position}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.width&&delete e.height,T.merge(this._style,e),T.merge(this._delegate.box,e),this)}};x.registerType("box");var Eo=To;var Po=class extends x{constructor(e,i){super(),this._delegate=new r.Entity({polygon:{}}),this._center=v.parsePosition(e),this._radius=+i||0,this._rotateAmount=0,this._stRotation=0,this._state=_.INITIALIZED}get type(){return x.getOverlayType("circle")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get radius(){return this._radius}set radius(e){this._radius=+e,this._delegate.polygon.hierarchy=this._computeHierarchy()}get rotateAmount(){return this._rotateAmount}set rotateAmount(e){this._rotateAmount=+e,this._delegate.polygon.stRotation=new r.CallbackProperty(()=>(this._stRotation+=this._rotateAmount,(this._stRotation>=360||this._stRotation<=-360)&&(this._stRotation=0),r.Math.toRadians(this._stRotation)),!1)}_computeHierarchy(){let e=new r.PolygonHierarchy,i=r.EllipseGeometryLibrary.computeEllipsePositions({center:y.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),s=r.Cartesian3.unpackArray(i.outerPositions);return s.push(s[0]),e.positions=s,e}_mountedHook(){this.center=this._center}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this._center),this._delegate.label={...i,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polygon,e),this)}};x.registerType("circle");var Nt=Po;var Mo=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({corridor:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("corridor")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.corridor.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.corridor,e),this)}};x.registerType("corridor");var bo=Mo;var Ao=class extends x{constructor(e,i,s,a){super(),this._position=v.parsePosition(e),this._length=+i||0,this._topRadius=+s||0,this._bottomRadius=+a||0,this._delegate=new r.Entity({cylinder:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("cylinder")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get length(){return this._length}set length(e){this._length=+e||0,this._delegate.cylinder.length=this._length}get topRadius(){return this._topRadius}set topRadius(e){this._topRadius=+e||0,this._delegate.cylinder.topRadius=this._topRadius}get bottomRadius(){return this._bottomRadius}set bottomRadius(e){this._bottomRadius=+e||0,this._delegate.cylinder.bottomRadius=this._bottomRadius}_mountedHook(){this.position=this._position,this.length=this._length,this.topRadius=this._topRadius,this.bottomRadius=this._bottomRadius}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.topRadius&&delete e.bottomRadius,T.merge(this._style,e),T.merge(this._delegate.cylinder,e),this)}};x.registerType("cylinder");var So=Ao;var Io=class extends x{constructor(e,i,s){super(),this._position=v.parsePosition(e),this._semiMajorAxis=+i||0,this._semiMinorAxis=+s||0,this._delegate=new r.Entity({ellipse:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("ellipse")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get semiMajorAxis(){return this._semiMajorAxis}set semiMajorAxis(e){this._semiMajorAxis=+e||0,this._delegate.ellipse.semiMajorAxis=this._semiMajorAxis}get semiMinorAxis(){return this._semiMinorAxis}set semiMinorAxis(e){this._semiMinorAxis=+e||0,this._delegate.ellipse.semiMinorAxis=this._semiMinorAxis}_mountedHook(){this.position=this._position,this.semiMajorAxis=this._semiMajorAxis,this.semiMinorAxis=this._semiMinorAxis}setStyle(e){return Object.keys(e).length===0?this:(delete e.semiMajorAxis&&delete e.semiMinorAxis,T.merge(this._style,e),T.merge(this._delegate.ellipse,e),this)}};x.registerType("ellipse");var Lo=Io;var Do=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._radius=i||{x:10,y:10,z:10},this._delegate=new r.Entity({ellipsoid:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("sphere")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get radius(){return this._radius}set radius(e){this._radius=e||{x:10,y:10,z:10},this._delegate.ellipsoid.radii=this._radius}_mountedHook(){this.position=this._position,this.radius=this._radius}setStyle(e){return Object.keys(e).length===0?this:(delete e.radius,T.merge(this._style,e),T.merge(this._delegate.ellipsoid,e),this)}};x.registerType("sphere");var Ro=Do;var Oo=class l extends x{constructor(e,i){super(),this._delegate=new r.Entity({label:{}}),this._position=v.parsePosition(e),this._text=i,this._state=_.INITIALIZED}get type(){return x.getOverlayType("label")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get text(){return this._text}set text(e){this._text=e,this._delegate.label.text=this._text}static fromEntity(e){var o;let i=r.JulianDate.now(),s=y.transformCartesianToWGS84(e.position.getValue(i)),a;return e.billboard&&(a=new l(s,e.name),a.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(i)}),a}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,i){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,T.merge(this._style,e),T.merge(this._delegate.label,e),this)}};x.registerType("label");var zt=Oo;var ko=class extends x{constructor(e,i,s,a={}){if(super(),this._position=v.parsePosition(e),this._width=+i||100,this._height=+s||100,a.normal&&typeof a.normal=="string"){let o=String(a.normal).toLocaleUpperCase();a.normal=o==="X"?r.Cartesian3.UNIT_X:o==="Y"?r.Cartesian3.UNIT_Y:r.Cartesian3.UNIT_Z}else a.normal=r.Cartesian3.UNIT_Z;this._normal=a.normal,this._distance=a.distance||0,this._delegate=new r.Entity({plane:{dimensions:{x:this._width,y:this._height},plane:new r.Plane(this._normal,this._distance)}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("plane")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get width(){return this._width}set width(e){let i=this._delegate.plane.dimensions.getValue();this._width=+e||0,i.x=this._width}get height(){return this._height}set height(e){let i=this._delegate.plane.dimensions.getValue();this._height=+e||0,i.y=this._height}get distance(){return this._distance}set distance(e){this._distance=e,this._delegate.plane.plane.distance=e}_mountedHook(){this.position=this._position,this.distance=this._distance}setStyle(e){return Object.keys(e).length===0?this:(delete e.dimensions&&delete["plane"],T.merge(this._style,e),T.merge(this._delegate.plane,e),this)}};x.registerType("plane");var No=ko;var Ap={pixelSize:8,outlineColor:r.Color.BLUE,outlineWidth:2},zo=class l extends x{constructor(e){super(),this._delegate=new r.Entity({point:{}}),this._position=v.parsePosition(e),this._state=_.INITIALIZED}get type(){return x.getOverlayType("point")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}static fromEntity(e){var o;let i,s=r.JulianDate.now(),a=y.transformCartesianToWGS84(e.position.getValue(s));return i=new l(a),i.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)},i}_mountedHook(){this.position=this._position,T.merge(this._delegate.point,Ap,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,T.merge(this._style,e),T.merge(this._delegate.point,Ap,this._style),this)}};x.registerType("point");var Ft=zo;var Fo=class l extends x{constructor(e){super(),this._delegate=new r.Entity({polygon:{}}),this._positions=v.parsePositions(e),this._holes=[],this._state=_.INITIALIZED}get type(){return x.getOverlayType("polygon")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get holes(){return this._holes}set holes(e){e&&e.length&&(this._holes=e.map(i=>v.parsePositions(i)),this._delegate.polygon.hierarchy=this._computeHierarchy())}get center(){return ke([...this._positions,this._positions[0]])}get area(){return Oe(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polygon){let o=y.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(s).positions);i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_computeHierarchy(){let e=new r.PolygonHierarchy;return e.positions=y.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map(i=>new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(i))),e}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...i},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polygon,e),this)}};x.registerType("polygon");var tt=Fo;var Go=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polyline:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polyline.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get center(){return ke(this._positions)}get distance(){return ce(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...i},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polyline,e),this)}};x.registerType("polyline");var it=Go;var Ho=class extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({rectangle:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("rect")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.rectangle.coordinates=r.Rectangle.fromCartesianArray(y.transformWGS84ArrayToCartesianArray(this._positions))}_mountedHook(){this.positions=this._positions}setLabel(e,i){let s=this._delegate.rectangle.coordinates.getValue();return this._delegate.position=r.Cartographic.toCartesian(r.Rectangle.center(s,new r.Cartographic)),this._delegate.label={...i,text:e},this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.rectangle,e),this)}};x.registerType("rect");var Gt=Ho;var Wo=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({wall:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("wall")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.wall.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.wall,e),this)}};x.registerType("wall");var Bo=Wo;var Uo=class{static getShapeForPipeline(e={}){let i=e.radius||1,s=e.thicknes||i/3,a=Math.ceil(360/(e.slices||60)),o=e.startAngle||0,n=e.endAngle||o+360,h=e.vscale||1,c=e.hscale||1,d=[];for(let p=o;p<=n;p+=a){let f=r.Math.toRadians(p);d.push({x:i*c*Math.cos(f),y:i*h*Math.sin(f)})}for(let p=n;p>=o;p-=a){let f=r.Math.toRadians(p);d.push({x:(i-s)*c*Math.cos(f),y:(i-s)*h*Math.sin(f)})}return d}static getShapeForCircle(e={}){let i=e.radius||1,s=Math.ceil(360/(e.slices||60)),a=e.startAngle||0,o=e.endAngle||a+360,n=e.vscale||1,h=e.hscale||1,c=[];for(let d=a;d<=o;d+=s){let p=r.Math.toRadians(d);c.push({x:i*h*Math.cos(p),y:i*n*Math.sin(p)})}return c}static getShapeForStar(e={}){console.log(e.slices||6);let i=e.radius||1,s=e.thicknes||i/3,a=e.slices||6,o=e.startAngle||0;console.log(a);let n=r.Math.toRadians(o),h=Math.PI/a,c=2*a,d=new Array(c);for(let p=0;p<c;p++){let f=p%2===0?i:s,g=n+p*h;d[p]=new r.Cartesian2(Math.cos(g)*f,Math.sin(g)*f)}return d}},Pe=Uo;var Vo=class l extends x{constructor(e={}){super(),this._positions=v.parsePositions(e.positions||[]);let i=e.shape||e.shapePositions;switch(e.radius=e.radius||10,i){case"pipeline":this._shape=Pe.getShapeForPipeline(e);break;case"circle":this._shape=Pe.getShapeForCircle(e);break;case"star":this._shape=Pe.getShapeForStar(e);break;default:this._shape=i;break}this._delegate=new r.Entity({polylineVolume:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_volume")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polylineVolume.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get shape(){return this._shape}set shape(e){this._shape=e||[],this._delegate.polylineVolume.shape=this._shape}static fromEntity(e,i){var o;let s,a=r.JulianDate.now();return e.polyline&&(i.positions=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(a)),s=new l(i),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(a)}),s}_mountedHook(){this.positions=this._positions,this.shape=this._shape}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polylineVolume,e),this)}};x.registerType("polyline_volume");var Zo=Vo;var jo=class l extends x{constructor(e={}){super(),e.radius=e.radius||10,e.alpha=e.alpha||.8,e.color=e.color||r.Color.RED,this._alpha=e.alpha,this._color=e.color.withAlpha(this._alpha),console.log("PolylineAdapter",e);let i=e.branches;this._centerRadius=0,i==null||i.forEach(s=>{this._centerRadius=Math.max(this._centerRadius,s.radius)}),this._center=v.parsePosition(e.center),this._type=e.type||i.length>2?"multiway":"elbow",this._instances=[],this._type==="multiway"&&i.length>2?i&&i.forEach(s=>{let a={lat:this._center.lat,lng:this._center.lng,alt:this._center.alt+(this._centerRadius-s.radius)};this._instances.push(new r.GeometryInstance({geometry:new r.PolylineVolumeGeometry({polylinePositions:y.transformWGS84ArrayToCartesianArray([a,...s.positions]),shapePositions:Pe.getShapeForPipeline({radius:s.radius}),cornerType:r.CornerType.MITERED,vertexFormat:r.PerInstanceColorAppearance.VERTEX_FORMAT}),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(this._color)}}))}):this._type==="elbow"&&i.length===2&&this._instances.push(new r.GeometryInstance({geometry:new r.PolylineVolumeGeometry({polylinePositions:y.transformWGS84ArrayToCartesianArray([...i[0].positions.reverse(),this._center,...i[1].positions]),shapePositions:Pe.getShapeForPipeline({radius:this._centerRadius}),cornerType:r.CornerType.MITERED,vertexFormat:r.PerInstanceColorAppearance.VERTEX_FORMAT}),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(this._color)}})),this._center.alt=this._center.alt+this._centerRadius,this._instances.push(new r.GeometryInstance({geometry:new r.SphereGeometry({radius:this._centerRadius*1.2,stackPartitions:e.slices,slicePartitions:e.slices,vertexFormat:r.VertexFormat.POSITION_AND_NORMAL}),modelMatrix:r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._center)),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(this._color)}})),this._delegate=new r.Primitive({geometryInstances:this._instances,appearance:new r.PerInstanceColorAppearance({flat:!0,faceForward:!0}),asynchronous:!1}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_adapter")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._delegate.modelMatrix=r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._center))}static fromEntity(e,i){var o;let s,a=r.JulianDate.now();return e.polyline&&(i.positions=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(a)),s=new l(i),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(a)}),s}_mountedHook(){}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),e.alpha&&(this._alpha=e.alpha),e.color&&(this._color=e.color.withAlpha(this._alpha),console.log("------------",e.color),this._instances.forEach(i=>{console.log("------------",i.attributes),i.attributes&&i.attributes.color&&(i.attributes.color=r.ColorGeometryInstanceAttribute.fromColor(this._color))})),this)}};x.registerType("polyline_adapter");var Yo=jo;var qo=class extends I{constructor(e,i,s={}){if(!i)throw new Error("GeoJsonLayer\uFF1Athe url invalid");super(e),this._delegate=r.GeoJsonDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("geojson")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}_createBillboard(e){return e.position&&e.billboard?et.fromEntity(e):null}_createPolyline(e){if(e.polyline)return it.fromEntity(e)}_createPolygon(e){if(e.polygon)return tt.fromEntity(e)}_createModel(e,i){if(e)return St.fromEntity(e,i)}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(o=>{e.call(i,o)})}),this}toVectorLayer(){let e=new Ze(this.id);return this.eachOverlay(i=>{i.billboard?e.addOverlay(this._createBillboard(i)):i.polyline?e.addOverlay(this._createPolyline(i)):i.polygon&&e.addOverlay(this._createPolygon(i))},this),e}toModelLayer(e){let i=new Ze(this.id);return this.eachOverlay(s=>{i.addOverlay(this._createModel(s,e))},this),i}};I.registerType("geojson");var ht=qo;var Xo=class extends I{constructor(e,i,s={}){if(!i)throw new Error("GpxLayer: the url is empty");super(e),this._delegate=r.KmlDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("gpx")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(o=>{e.call(i,o)})}),this}};I.registerType("gpx");var Jo=Xo;var O_={radialColor:r.Color.WHITE,radialWidth:2,showRadial:!0,LabelColor:r.Color.YELLOW,weftColor:r.Color.WHITE,weftWidth:2},Qo=class extends I{constructor(e,i){super(e),this._options={...O_,...i},this._delegate=new r.CustomDataSource(e),this._state=_.INITIALIZED}get type(){return I.getLayerType("graticule")}_addedHook(){for(let e=0;e<36;e++)this._delegate.entities.add({polyline:{positions:r.Cartesian3.fromDegreesArray([e*10,89.5,e*10,-89.5]),material:this._options.radialColor,width:this._options.radialWidth},show:this._options.showRadial}),this._delegate.entities.add({position:r.Cartesian3.fromDegrees(e*10,0),label:{text:e*10+"\xB0",font:"12px",fillColor:this._options.LabelColor}});for(let e=0;e<18;e++){let i=[];for(let s=0;s<129;s++)i.push(-180+s*(360/128),(e<9?e:-e)*10);this._delegate.entities.add({polyline:{positions:r.Cartesian3.fromDegreesArray(i),material:this._options.weftColor,width:this._options.weftWidth}})}}};I.registerType("graticule");var Ko=Qo;var $o=class extends I{constructor(e){super(e),this._delegate=new r.PrimitiveCollection,this._isGround=!0,this._state=_.INITIALIZED}get type(){return I.getLayerType("ground_primitive")}clear(){return this._delegate&&this._delegate.removeAll(),this._cache={},this._state=_.CLEARED,this}};I.registerType("ground_primitive");var en=$o;var Ip=[].indexOf||function(l){for(let e=0,i=this.length;e<i;e++)if(e in this&&this[e]===l)return e;return-1},mi=`attribute vec4 position;
|
|
16519
16519
|
varying vec2 texcoord;
|
|
16520
16520
|
void main(){
|
|
16521
16521
|
texcoord = position.xy*0.5+0.5;
|
|
@@ -19543,7 +19543,7 @@ void main() {\r
|
|
|
19543
19543
|
%c \u76D8\u53E4\u5730\u7406\u4FE1\u606F\u7CFB\u7EDF
|
|
19544
19544
|
%c PanGu Gis For Cesium SDK
|
|
19545
19545
|
%c \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
19546
|
-
%c \u{1F680} \u7248\u672C: %c5.1.
|
|
19546
|
+
%c \u{1F680} \u7248\u672C: %c5.1.15 - 2025-10-24
|
|
19547
19547
|
%c \u{1F310} EUM\u7248\u672C\uFF1A%c1.131.0
|
|
19548
19548
|
%c \u{1F468}\u200D\u{1F4BB} \u5F00\u53D1\u4F5C\u8005: %cLucas Xu <xulei0857@qq.com>
|
|
19549
19549
|
%c \u{1F4DC} \u6388\u6743\uFF1A%c\u667A\u4F01\u534E\u7AE0-\u6C38\u4E45\u4F7F\u7528\u6B64\u8F6F\u4EF6\u5F53\u524D\u7248\u672C\u3002
|
|
@@ -19552,4 +19552,4 @@ void main() {\r
|
|
|
19552
19552
|
%c \u{1F3E0} \u5B98\u7F51: %chttps://www.pggis.com
|
|
19553
19553
|
|
|
19554
19554
|
%c
|
|
19555
|
-
`,'font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #008AFF; text-align: center;','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #F08519; text-align: center; ','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 16px; font-weight: 600; color: #FFC712; text-align: center;font-style:oblique','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #718096; text-align: center; letter-spacing: 0.5px; padding: 4px 0','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829',"font-family: monospace; font-size: 14px; color: transparent"))};var zu="./libs/pg-sdk/resources/",ku=zu,Nu=!1;rt("baseUrl",zu);var oy={set baseUrl(l){ku=l,rt("baseUrl",l)},get baseUrl(){return ku}};function ny(l={}){return Nu?Promise.resolve():new Promise((e,i)=>{l.baseUrl&&(this.config.baseUrl=l.baseUrl),l.cesium&®isterLib("cesium",l.Cesium),l.echarts&®isterLib("echarts",l.echarts),l.turf&®isterLib("turf",l.turf),Nu=!0,rt("isInitialized",!0),rt("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)})}var ly="5.1.
|
|
19555
|
+
`,'font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #008AFF; text-align: center;','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #F08519; text-align: center; ','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 16px; font-weight: 600; color: #FFC712; text-align: center;font-style:oblique','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #718096; text-align: center; letter-spacing: 0.5px; padding: 4px 0','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829',"font-family: monospace; font-size: 14px; color: transparent"))};var zu="./libs/pg-sdk/resources/",ku=zu,Nu=!1;rt("baseUrl",zu);var oy={set baseUrl(l){ku=l,rt("baseUrl",l)},get baseUrl(){return ku}};function ny(l={}){return Nu?Promise.resolve():new Promise((e,i)=>{l.baseUrl&&(this.config.baseUrl=l.baseUrl),l.cesium&®isterLib("cesium",l.Cesium),l.echarts&®isterLib("echarts",l.echarts),l.turf&®isterLib("turf",l.turf),Nu=!0,rt("isInitialized",!0),rt("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)})}var ly="5.1.15";return Zu(hy);})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pggis/pg-sdk",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "盘古 Gis SDK 是基于开源项目 Cesium 进行二次开发的二三维一体的 WebGis 应用框架,该框架优化了部分 Cesium 的使用方式和增添一些通用功能,旨在为开发者快速构建 WebGis 应用。",
|
|
6
6
|
"repository": "https://git.pgio.cn/xulei0857/pg-gis-sdk.git",
|