UNPKG

@arcgis/core

Version:

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

3 lines (2 loc) 1.44 kB
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */ import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as r}from"../../../chunks/GeometryCursor.js";import{E as t}from"../../../chunks/MultiPathImpl.js";import{j as s,c as n}from"../../../chunks/Geometry.js";import{c as o}from"../../../chunks/Envelope.js";import{az as m}from"../../../chunks/SpatialReference.js";class u{getOperatorType(){return 10010}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,r,t){return new i(e,r,t)}}class i extends r{constructor(e,r,t){super(),this.m_result=null,this.m_geoms=e,this.m_sr=r,this.m_progressTracker=t,this.m_bfirst=!0,this.m_index=-1}tock(){return!0}getRank(){return 1}next(){return this.m_bfirst&&(this.performOperation(),this.m_bfirst=!1),this.m_result?this.m_result.next():null}getGeometryID(){return null!==this.m_result?this.m_result.getGeometryID():-1}performOperation(){const e=new t;for(let t=this.m_geoms.next();null!==t;t=this.m_geoms.next())t.isEmpty()||t.getDimension()<1||s(t.getGeometryType())||(n(t),e.addGeometry(t));if(0===e.getGeometryCount())return;const r=e.getEnvelope2D(this.m_progressTracker),u=o(this.m_sr,r,!0);this.m_result=m(e,u,this.m_progressTracker)}}const c=new u;function a(r,t){const s=c.executeMany(new e(r),t,null);return Array.from(s)}function p(){return c.supportsCurves()}export{a as executeMany,p as supportsCurves};