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
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("exports ../core/Error ./vec32 ../core/libs/gl-matrix-2/factories/vec3f64 ../geometry/support/aaBoundingRect ../views/3d/support/supportedSpatialReference ../views/3d/terrain/TerrainConst ../views/3d/terrain/TilingScheme".split(" "),function(p,q,k,l,r,A,w,v){function x(a,b,c=0){a=a.extent;return null==a?!1:0===c?r.containsPoint(a,b):r.containsPointWithMargin(a,b,c*Math.min(a[2]-a[0],a[3]-a[1]))}function t(a,b,c,e){k.copy(m,c);m[e]=b[e];e=k.subtract(m,m,b);var d=k.subtract(B,a,b);d=k.dot(d, |
|
e);const f=k.dot(e,e);b=0>=d?b:f<=d?c:k.add(m,b,k.scale(e,e,d/f));a=k.subtract(m,a,b);return Math.PI/2-Math.atan(a[2]/Math.sqrt(a[0]*a[0]+a[1]*a[1]))}function y(a,b,c){a=a.extent;if(null==a)return 0;g[0]=a[0];g[1]=a[1];g[2]=c;h[0]=a[2];h[1]=a[3];h[2]=c;a=c=Infinity;b[0]<g[0]?c=t(b,g,h,0):b[0]>h[0]&&(c=t(b,h,g,0));b[1]<g[1]?a=t(b,g,h,1):b[1]>h[1]&&(a=t(b,h,g,1));return Math.min(c,a)}function z(a,b,c,e){if(null==a)return v.getMissingTileInfoError();e=a.spatialReference;if(e.isGeographic&&!A.isSupportedEarthGCS(e))return new q("tilingscheme:local-unsupported-spatial-reference", |
|
"The tiling scheme spatial reference is not supported in local scenes");var d=v.TilingScheme.checkUnsupported(a);if(null!=d)return d;if(null==c)return new q("tilingscheme:extent-not-exist","The layer does not provide a layer extent.");{var f=a.lods;d=f[0].resolution*2**f[0].level;var u=[d*a.size[0],d*a.size[1]];const C=[a.origin.x,a.origin.y];c=r.fromExtent(c);const n=r.create();v.TilingScheme.computeRowColExtent(c,u,C,n);u=(n[2]-n[0])*(n[3]-n[1]);u>w.maxRootTiles?(f=f[0].scale*2**f[0].level,a=Math.max((c[3]- |
|
c[1])/a.size[1],(c[2]-c[0])/a.size[0])*f/d,d=Math.floor(Math.log(a)/Math.log(10)),a=Math.ceil(a/10**d)*10**d,a=new q("tilingscheme:too-many-root-tiles","Scale of level 0 of the tiling scheme (1:"+Math.floor(f).toLocaleString()+") is too large for the layer's extent. Suggested scale: 1:"+a.toLocaleString()+".",{level0Scale:f,suggestedLevel0Scale:a,requiredNumRootTiles:u,allowedNumRootTiles:w.maxRootTiles})):a=null}return a?a:null==b||e.equals(b)||b.isWGS84&&e.isWebMercator?null:new q("tilingscheme:spatial-reference-mismatch", |
|
"The tiling scheme does not match the spatial reference of the local scene")}const m=l.create(),B=l.create(),g=l.create(),h=l.create();l=Object.freeze(Object.defineProperty({__proto__:null,checkIfTileInfoSupportedForViewSR:z,isInsideExtent:x,tiltToExtentEdge:y},Symbol.toStringTag,{value:"Module"}));p.checkIfTileInfoSupportedForViewSR=z;p.isInsideExtent=x;p.terrainUtilsPlanar=l;p.tiltToExtentEdge=y}); |