UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 2.83 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{cyclicalDegrees as t}from"./Cyclical.js";import{toUnit as r}from"./quantityUtils.js";import{formatAngleDegrees as e,formatDecimal as a,formatMetricLength as n,formatImperialLength as i,formatImperialVerticalLength as u,formatMetricVerticalLength as c,formatMetricArea as o,formatImperialArea as l,formatRelativeDecimal as f,formatMetricRelativeLength as m,formatMetricRelativeVerticalLength as b,formatImperialRelativeLength as s,formatImperialRelativeVerticalLength as v,formatDMS as p,formatRelativeAngleDegrees as h}from"./unitFormatUtils.js";function g(t,e,n,i=2,u="abbr"){return a(t,r(e,n).value,n,i,u)}function L(t,e,a,n=2,i="abbr"){return f(t,r(e,a).value,a,n,i)}function d(t,r,e=2,a="abbr"){return n(t,r.value,r.unit,e,a)}function M(t,r,e=2,a="abbr"){return m(t,r.value,r.unit,e,a)}function w(t,r,e=2,a="abbr"){return c(t,r.value,r.unit,e,a)}function I(t,r,e=2,a="abbr"){return b(t,r.value,r.unit,e,a)}function R(t,r,e=2,a="abbr"){return o(t,r.value,r.unit,e,a)}function y(t,r,e=2,a="abbr"){return i(t,r.value,r.unit,e,a)}function V(t,r,e=2,a="abbr"){return s(t,r.value,r.unit,e,a)}function j(t,r,e=2,a="abbr"){return u(t,r.value,r.unit,e,a)}function D(t,r,e=2,a="abbr"){return v(t,r.value,r.unit,e,a)}function A(t,r,e=2,a="abbr"){return l(t,r.value,r.unit,e,a)}function T(t){return p(t.value,t.unit)}function U(r,a,n,i=t,u=!0){return e(r.value,r.unit,r.rotationType,a,n,i,u)}function q(t,r,e){return h(t.value,t.unit,t.rotationType,r,e??void 0)}function x(t,r,e,a,n="abbr"){switch(a=a??2,e){case"imperial":return y(t,r,a,n);case"metric":return d(t,r,a,n);default:return g(t,r,e,a,n)}}function C(t,r,e,a=2,n="abbr"){switch(e){case"imperial":return V(t,r,a,n);case"metric":return M(t,r,a,n);default:return L(t,r,e,a,n)}}function F(t,r,e,a=2,n="abbr"){switch(e){case"imperial":return j(t,r,a,n);case"metric":return w(t,r,a,n);default:return g(t,r,e,a,n)}}function S(t,r,e,a=2,n="abbr"){switch(e){case"imperial":return D(t,r,a,n);case"metric":return I(t,r,a,n);default:return L(t,r,e,a,n)}}function k(t,r,e,a=2,n="abbr"){switch(e){case"imperial":return A(t,r,a,n);case"metric":return R(t,r,a,n);default:return g(t,r,e,a,n)}}export{U as formatAngle,k as formatArea,T as formatDMS,g as formatDecimal,A as formatImperialArea,y as formatImperialLength,V as formatImperialRelativeLength,D as formatImperialRelativeVerticalLength,j as formatImperialVerticalLength,x as formatLength,R as formatMetricArea,d as formatMetricLength,M as formatMetricRelativeLength,I as formatMetricRelativeVerticalLength,w as formatMetricVerticalLength,q as formatRelativeAngle,L as formatRelativeDecimal,C as formatRelativeLength,S as formatRelativeVerticalLength,F as formatVerticalLength};