@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 935 B
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import"../../../../../core/has.js";import{getGraphicEffectiveElevationMode as e,hasGraphicFeatureExpressionInfo as t}from"../../../../../support/elevationInfoUtils.js";import{SupportedObjectResult as o}from"../isSupportedObjectUtils.js";function r(r){if("graphics"!==r.layer?.type)return o.GRAPHICS_LAYER_MISSING;if(null==r.geometry)return o.GEOMETRY_MISSING;switch(r.geometry.type){case"point":break;case"polygon":case"polyline":case"multipoint":case"extent":case"mesh":return o.SUPPORTED;default:return o.GEOMETRY_TYPE_UNSUPPORTED}const s=null!=r.symbol&&"point-3d"===r.symbol.type&&r.symbol.symbolLayers;if(!s||!s.some((e=>"object"===e.type)))return o.SYMBOL_TYPE_UNSUPPORTED;return"on-the-ground"!==e(r)&&t(r)?o.ELEVATION_MODE_UNSUPPORTED:o.SUPPORTED}export{r as isSupportedGraphic};