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.
 
 

7 lines
2.1 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("exports ../../../core/mathUtils ../../../core/unitUtils ../../../chunks/vec32 ../../../core/libs/gl-matrix-2/factories/vec3f64 ../../../geometry/ellipsoidUtils ../../../geometry/Extent ../../ViewingMode ../environment/atmosphereUtils".split(" "),function(p,n,u,l,q,r,v,w,x){function t(c,b,a,d){a=2/a;c/b>a?(d.far=c,d.near=d.far/b):(d.near=a,d.far=d.near*b);return d}class y{constructor(c,b){this._elevationProvider=c;this._referenceEllipsoid=r.getReferenceEllipsoid(b);this._unitInMeters=u.getMetersPerUnitForSR(b,
this._referenceEllipsoid.metersPerDegree)}compute(c,b,a,d,m){m||={near:0,far:0};var e=c[2]*this._unitInMeters,g=e;d=e-d;var h=this._elevationProvider?.visibleElevationBounds;h&&(e=0<=d?g-this._unitInMeters*h.min:this._unitInMeters*h.max-g);a=null!=a?a:new v({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0});g=Math.max(a.xmax-a.xmin,a.ymax-a.ymin,4*Math.max(a.xmax-a.xmin,a.ymax-a.ymin));l.subtract(f,b,c);k[0]=0<f[0]?a.xmax:a.xmin;k[1]=0<f[1]?a.ymax:a.ymin;k[2]=0<f[2]?g/2:-g/2;l.subtract(k,k,c);l.normalize(f,
f);c=1.1*l.dot(k,f)*this._unitInMeters;b=Math.sqrt(e*(e+2*this._referenceEllipsoid.radius));a=Math.max(a.xmax-a.xmin,a.ymax-a.ymin);h=1E-4*a*this._unitInMeters;e=n.clamp((e-h)/(.001*a*this._unitInMeters-h),0,1);e=Math.min(n.lerp(b,c,e**3),b)*Math.max(Math.log(Math.abs(d)),1);return t(Math.min(e,Math.max(34064E4,g))/this._unitInMeters,2E4,this._unitInMeters,m)}}class z{constructor(c){this._referenceEllipsoid=r.getReferenceEllipsoid(c)}compute(c,b,a,d,m){m||={near:0,far:0};c=l.length(c);b=c-this._referenceEllipsoid.radius;
b=Math.max(Math.abs(b-d),Math.abs(b));d=1.2*n.lerp(Math.sqrt(b*(b+2*(this._referenceEllipsoid.radius+Math.min(0,d)))),c+this._referenceEllipsoid.radius,x.computeInnerAltitudeFade(b));c=n.clamp(2E4-(Math.log(b)-7.983)/9.011*19900,100,2E4);return t(d,c,1,m)}}const k=q.create(),f=q.create();p.createNearFarHeuristic=function(c,b,a){return c===w.ViewingMode.Global?new z(a):new y(b,a)};Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});