terrainUtilsSpherical.js 1.7 KB

12345
  1. /*
  2. All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. See https://js.arcgis.com/4.25/esri/copyright.txt for details.
  4. */
  5. import e from"../core/Error.js";import{isNone as i,isSome as t}from"../core/maybe.js";import{canProjectToWGS84ComparableLonLat as n}from"../geometry/projection.js";import{isMars as r,isMoon as o}from"../geometry/support/spatialReferenceUtils.js";import{getMissingTileInfoError as l,TilingScheme as s}from"../views/3d/terrain/TilingScheme.js";function c(){return!0}function a(){return 0}function m(c,a){if(i(c))return l();const m=c.lods.length-1,h=c.spatialReference,p=n(h)||r(h)||o(h);if(h.isWebMercator){if(!s.makeWebMercatorAuxiliarySphere(m).compatibleWith(c))return new e("tilingscheme:incompatible-global-web-mercator","The tiling scheme is not compatible with the ArcGIS Online Web Mercator tiling scheme")}else{if(!p)return new e("tilingscheme:global-unsupported-spatial-reference","The tiling scheme spatial reference is not supported in global scenes");if(!s.makeGCSWithTileSize(c.spatialReference,c.size[0],m).compatibleWith(c))return c.spatialReference.isWGS84?new e("tilingscheme:incompatible-global-wgs84","The tiling scheme is not compatible with the ArcGIS Online WGS84 tiling scheme"):new e("tilingscheme:incompatible-global","The tiling scheme is not compatible with the ArcGIS Online tiling scheme")}return t(a)&&!c.spatialReference.equals(a)?new e("tilingscheme:spatial-reference-mismatch","The tiling scheme does not match the spatial reference of the global scene"):void 0}const h=Object.freeze(Object.defineProperty({__proto__:null,isInsideExtent:c,tiltToExtentEdge:a,checkIfTileInfoSupportedForViewSR:m},Symbol.toStringTag,{value:"Module"}));export{a,m as c,c as i,h as t};