@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 967 B
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import{WGS84ECEFSpatialReferenceLike as e,SphericalPCPFMarsLike as t,SphericalPCPFMoonLike as s,SphericalECEFSpatialReferenceLike as n}from"./ellipsoidUtils.js";import o from"./SpatialReference.js";import{isWKIDFromMars as i,isWKIDFromMoon as r}from"./support/spatialReferenceUtils.js";const p=new o(n),l=new o(t),f=new o(s),w=new o(e);function a(e){const t=c.get(e);if(t)return t;let s=p;if(e)if(e===l)s=l;else if(e===f)s=f;else{const t=e.wkid,n=e.latestWkid;if(null!=t||null!=n)i(t)||i(n)?s=l:(r(t)||r(n))&&(s=f);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===k?s=l:e===m&&(s=f)}}}return c.set(e,s),s}const c=new Map,k=l.wkt.toUpperCase(),m=f.wkt.toUpperCase();export{p as SphericalECEFSpatialReference,l as SphericalPCPFMars,f as SphericalPCPFMoon,w as WGS84ECEFSpatialReference,a as getSphericalPCPF};