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.32/esri/copyright.txt for details. */ import{cyclicalDegrees as t}from"./Cyclical.js";import{toUnit as r}from"./quantityUtils.js";import{formatDecimal as e,formatRelativeDecimal as a,formatMetricLength as n,formatMetricRelativeLength as i,formatMetricVerticalLength as u,formatMetricRelativeVerticalLength as c,formatMetricArea as o,formatImperialLength as l,formatImperialRelativeLength as f,formatImperialVerticalLength as m,formatImperialRelativeVerticalLength as b,formatImperialArea as s,formatDMS as v,formatAngleDegrees as p,formatRelativeAngleDegrees as h}from"./unitFormatUtils.js";function g(t,a,n,i=2,u="abbr"){return e(t,r(a,n).value,n,i,u)}function L(t,e,n,i=2,u="abbr"){return a(t,r(e,n).value,n,i,u)}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 i(t,r.value,r.unit,e,a)}function w(t,r,e=2,a="abbr"){return u(t,r.value,r.unit,e,a)}function I(t,r,e=2,a="abbr"){return c(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 l(t,r.value,r.unit,e,a)}function V(t,r,e=2,a="abbr"){return f(t,r.value,r.unit,e,a)}function j(t,r,e=2,a="abbr"){return m(t,r.value,r.unit,e,a)}function D(t,r,e=2,a="abbr"){return b(t,r.value,r.unit,e,a)}function A(t,r,e=2,a="abbr"){return s(t,r.value,r.unit,e,a)}function T(t){return v(t.value,t.unit)}function U(r,e,a,n=t,i=!0){return p(r.value,r.unit,r.rotationType,e,a,n,i)}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};