Custom Gis Application with Arcgis Javascript API with modern layouting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

10 lines
3.4 KiB

// All material copyright Esri, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.30/esri/copyright.txt for details.
//>>built
define("../../../chunks/tslib.es6 ../../../core/Accessor ../../../core/maybe ../../../core/reactiveUtils ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ./AnalysisView3D ./Viewshed/ViewshedAnalysisVisualization ./Viewshed/ViewshedComputedData ./Viewshed/ViewshedTool ../webgl-engine/lib/Viewshed ../../analysis/analysisViewUtils".split(" "),function(d,c,h,f,e,v,w,x,l,m,n,p,q,r,k){c=class extends m.AnalysisView3D(c){constructor(a){super(a);
this.type="viewshed-view-3d";this._placementTask=this.viewshedComputedDataHandles=this.tool=this.analysis=null}get selectedViewshed(){return this.tool?.selectedViewshed}set selectedViewshed(a){const {tool:b}=this;null!=b&&(b.selectedViewshed=a)}get selectedViewshedComputedData(){return this.tool?.selectedViewshedComputedData}initialize(){this._initializeUpdateHandle();this.viewshedComputedDataHandles=f.mapCollection(()=>this.analysis.viewsheds,a=>{const b=new p.ViewshedComputedData({renderCoordsHelper:this.view.renderCoordsHelper,
viewshed:a}),g=Symbol();this.addHandles(f.watch(()=>b.isValid(),(t,u)=>{this.visible&&(t?this._addViewshedsToRenderer(b):u&&this._removeViewshedsFromRenderer(b))},f.initial));return{viewshedComputedData:b,remove:()=>{this.removeHandles(g);this._removeViewshedsFromRenderer(b);b.destroy()}}});this._analysisVisualization=new n.ViewshedAnalysisVisualization({view:this.view,analysisViewData:this,isDecoration:!this.parent});this.addHandles([f.watch(()=>this.visible,a=>{const b=this.viewshedComputedDataHandles.map(g=>
g.viewshedComputedData).filter(g=>g.isValid());a?this._addViewshedsToRenderer(b):this._removeViewshedsFromRenderer(b)}),f.watch(()=>this.view.renderCoordsHelper,a=>{this.viewshedComputedDataHandles.forEach(({viewshedComputedData:b})=>b.renderCoordsHelper=a)}),k.connectAnalysisViewToTool(this,q)])}destroy(){this._placementTask=h.abortMaybe(this._placementTask);k.removeAnalysisViewTool(this);this._analysisVisualization=h.destroyMaybe(this._analysisVisualization);this._removeViewshedsFromRenderer(this.viewshedComputedDataHandles.map(a=>
a.viewshedComputedData))}async createViewsheds(a){this._placementTask=h.abortMaybe(this._placementTask);this._placementTask=k.activateAnalysisViewTool(this,a);null!=this.tool&&this.tool.createViewsheds();return await this._placementTask.promise}_initializeUpdateHandle(){const a=this.view._stage.renderer.plugins.plugins.find(b=>b instanceof r.Viewshed);a&&(this._updateHandleInRenderer=a.updateViewsheds.bind(a))}_addViewshedsToRenderer(a){this._updateHandleInRenderer({adds:a})}_removeViewshedsFromRenderer(a){this._updateHandleInRenderer({removes:a})}};
d.__decorate([e.property({readOnly:!0})],c.prototype,"type",void 0);d.__decorate([e.property({constructOnly:!0,nonNullable:!0})],c.prototype,"analysis",void 0);d.__decorate([e.property()],c.prototype,"tool",void 0);d.__decorate([e.property()],c.prototype,"selectedViewshed",null);d.__decorate([e.property()],c.prototype,"selectedViewshedComputedData",null);d.__decorate([e.property()],c.prototype,"viewshedComputedDataHandles",void 0);d.__decorate([e.property()],c.prototype,"_analysisVisualization",void 0);
d.__decorate([e.property()],c.prototype,"_placementTask",void 0);return c=d.__decorate([l.subclass("esri.views.3d.analysis.ViewshedAnalysisView3D")],c)});