@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 1.37 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
import e from"../../core/Error.js";import r from"../../core/Warning.js";const o=["layer","property","renderer","symbol","symbol-layer","url","visual-variable","type","elevation-profile-line","field-configuration-field-format"].map(e=>`${e}:unsupported`),n=new Set(o);function t(e,r,o){if(!e)return;const n=`${e.origin}/${e.layerContainerType||"operational-layers"}`;e?.messages?.push(p("layer",`Layer (${r.title}, ${r.id}) of type '${r.declaredClass}' is not supported in the context of '${n}'${o?`: ${o}`:""}`,{layer:r}))}function i(e,r,o){if(!e)return;const n=`${e.origin}/${e.layerContainerType||"operational-layers"}`;e?.messages?.push(p("property",`Property '${r}' is not supported in the context of '${n}'${o?`: ${o}`:""}`))}function s(e,r,o,n){if(!e)return;const t=`${e.origin}/${e.layerContainerType||"operational-layers"}`;e?.messages?.push(p("symbol",`Symbol '${r.declaredClass}' is not supported in the context of '${t}'${o?`: ${o}`:""}`,n))}function a(o,n,t,i,s){o&&o?.messages?.push(l("warning"===n?r:e,t,i,s))}function p(r,o,n){return l(e,r,o,n)}function l(e,r,o,n){return new e(`${r}:unsupported`,o,n)}export{t as addLayerUnsupportedError,i as addPropertyUnsupportedError,s as addSymbolUnsupportedError,a as addUnsupportedMessage,p as newUnsupportedError,n as webDocUnsupportedErrorSet};