UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 800 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import{validateLabelingInfo as e}from"../../../../../../layers/support/labelingInfo.js";import{getServiceGeometryType as s}from"../../layerAdapters/geometryUtils.js";import{createSymbolMeshSchemas as a}from"./symbols/SymbolSchema.js";async function l(a,l,r){const n=l.labelsVisible&&l.labelingInfo||[],i=s(l),m=e(n,i);return{type:"label",classes:await Promise.all(m.map(((e,s)=>o(a,e,s,r))))}}async function o(e,s,l,o){const r=await a(s,{path:`${l}`,schemaOptions:e,uniforms:o});return{maxScale:s.maxScale,minScale:s.minScale,expression:s.labelExpressionInfo?.expression??s.labelExpression,where:s.where,meshes:r}}export{l as createLabelMatcherSchema};