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.
 
 

8 lines
2.6 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 ../../Color ../../core/handleUtils ../../core/memoize ../../core/reactiveUtils ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ../../layers/support/ElevationQuery ../../support/elevationInfoUtils ./ElevationProfileLine".split(" "),function(d,n,q,r,p,f,c,y,z,t,u,v,w){c=class extends w{constructor(a){super(a);this.type="input";this.color=new n("#00c8c8");this.viewVisualizationEnabled=
!1;this.numSamplesForPreview=50;this.numSamplesPerChunk=500;this.chartFillEnabled=!1;this.chartStrokeOffsetY=-1;this._getQueryElevationDependencies=r.memoize((b,e,g,h,k)=>b?{elevationInfo:b,visibleLayers:e,view:g,stationary:h,spatialReference:k}:null)}get queryElevationDependencies(){const a=this._viewModel?.view;return null==a?null:this._getQueryElevationDependencies(this._elevationInfo,this._visibleLayers,a,a.stationary,a.spatialReference)}get available(){return!this._viewModel?.inputIsSketched}get _elevationInfo(){const a=
this._viewModel?.input;return a?v.getGraphicEffectiveElevationInfo(a):null}get _visibleLayers(){return this._viewModel?.view?.map?.allLayers?.filter(a=>a.visible).toArray()??[]}async queryElevation(a,{noDataValue:b,signal:e}){const g=this.queryElevationDependencies;if(null==g)throw Error("ElevationProfileLineInput: no dependencies");const {view:h,elevationInfo:k,spatialReference:l}=g;if("on-the-ground"===k.mode&&"3d"===h.type&&l){e=await u.GeometryDescriptor.fromGeometry(a).project(l,e);if(!e)return{geometry:a,
noDataValue:b};const x=h.elevationProvider;e.coordinates.forEach(m=>{m.z=x.getElevation(m.x,m.y,0,l,"ground")??0});return{geometry:e.export(),noDataValue:b}}return{geometry:a,noDataValue:b}}attach(a){const b=()=>this._onChange();return q.handlesGroup([super.attach(a),p.watch(()=>this.queryElevationDependencies,b),p.on(()=>a.elevationProvider,"elevation-change",b,{onListenerAdd:b,onListenerRemove:b})])}};d.__decorate([f.property({type:n,nonNullable:!0})],c.prototype,"color",void 0);d.__decorate([f.property()],
c.prototype,"viewVisualizationEnabled",void 0);d.__decorate([f.property()],c.prototype,"queryElevationDependencies",null);d.__decorate([f.property()],c.prototype,"available",null);d.__decorate([f.property()],c.prototype,"_elevationInfo",null);d.__decorate([f.property()],c.prototype,"_visibleLayers",null);return c=d.__decorate([t.subclass("esri.widgets.ElevationProfile.ElevationProfileLineInput")],c)});