UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 788 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{hasEffectiveFeatureExpressionInfo as t}from"../../../../../support/elevationInfoUtils.js";import{SupportedObjectResult as r}from"../isSupportedObjectUtils.js";function e(t){return o(t).result}function o(e){if(e.graphic&&"graphics"!==e.graphic.layer?.type)return{result:r.GRAPHICS_LAYER_MISSING};if(!e.operations)return{result:r.GEOMETRY_MISSING};if(t(e.elevationInfo))return{result:r.ELEVATION_MODE_UNSUPPORTED};const o=e.operations.data.type,i=e.operations.data.geometry;return"point"===o||"mesh"===o||"polyline"===o||"polygon"===o?{result:r.SUPPORTED,geometry:i}:{result:r.GEOMETRY_TYPE_UNSUPPORTED}}export{e as isSupportedObject};