@arcgis/core 4.34.0-next.86 → 4.34.0-next.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Basemap.js +1 -1
- package/Ground.js +1 -1
- package/Map.js +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineGround.d.ts +4 -0
- package/analysis/ElevationProfile/{ElevationProfileGroundLine.js → ElevationProfileLineGround.js} +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineInput.d.ts +4 -0
- package/analysis/ElevationProfile/{ElevationProfileInputLine.js → ElevationProfileLineInput.js} +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +4 -0
- package/analysis/ElevationProfile/{ElevationProfileQueryLine.js → ElevationProfileLineQuery.js} +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +4 -0
- package/analysis/ElevationProfile/{ElevationProfileSceneLine.js → ElevationProfileLineScene.js} +1 -1
- package/analysis/ElevationProfile/elevationProfileLineTypes.js +1 -1
- package/analysis/ElevationProfileAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0074f1836d7ff69ff6ec.js +1 -0
- package/assets/esri/core/workers/chunks/03ef19f0753d68770444.js +1 -0
- package/assets/esri/core/workers/chunks/{4a06ab00d095f63598b5.js → 09c2004126f4a5242b85.js} +1 -1
- package/assets/esri/core/workers/chunks/0f05425954578ac796ec.js +1 -0
- package/assets/esri/core/workers/chunks/109149c378aa4c5f8526.js +1 -0
- package/assets/esri/core/workers/chunks/{8307f635a5c0c4a95825.js → 143503f6eb270c4683f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c36cef0b58b87a1f17f.js → 177840d5f0076c0de46b.js} +4 -4
- package/assets/esri/core/workers/chunks/1c1b0cc91fe9cb3fec61.js +1 -0
- package/assets/esri/core/workers/chunks/1fc6311d4f0d27e88737.js +1 -0
- package/assets/esri/core/workers/chunks/257fd65786feb5951b90.js +1 -0
- package/assets/esri/core/workers/chunks/2dc88379ee94fabdaf52.js +1 -0
- package/assets/esri/core/workers/chunks/366db86914a63e6d0c68.js +1 -0
- package/assets/esri/core/workers/chunks/481c2b01e2fe92249698.js +1 -0
- package/assets/esri/core/workers/chunks/639d856cd217914dfe1f.js +1 -0
- package/assets/esri/core/workers/chunks/7540b34e743a23e67729.js +1 -0
- package/assets/esri/core/workers/chunks/7be11a3ef1f49245089f.js +1 -0
- package/assets/esri/core/workers/chunks/819a8bc1f0a694017ee6.js +1 -0
- package/assets/esri/core/workers/chunks/{1537b02e674f8ef77f4a.js → 8d63b42aea32ce2e5d09.js} +1 -1
- package/assets/esri/core/workers/chunks/8de11aab65d91e7f1a4d.js +1 -0
- package/assets/esri/core/workers/chunks/9386a0ebff78b6303ed2.js +1 -0
- package/assets/esri/core/workers/chunks/{4d47187bc0821413492d.js → 95bae3c275f1483eb7ed.js} +1 -1
- package/assets/esri/core/workers/chunks/b09b34f64a6bc2b49e0a.js +1 -0
- package/assets/esri/core/workers/chunks/b0a03b6edbcf6e933431.js +1 -0
- package/assets/esri/core/workers/chunks/b8997ae5893afa0298d1.js +1 -0
- package/assets/esri/core/workers/chunks/c0ae186620b68d43b338.js +1 -0
- package/assets/esri/core/workers/chunks/{9d7a22746dae1451deaf.js → c6cae8471c5d4ae40c65.js} +1 -1
- package/assets/esri/core/workers/chunks/db5a985ccc6b7d0ad855.js +1 -0
- package/assets/esri/core/workers/chunks/f3ee035fa7bf638c8e60.js +1 -0
- package/assets/esri/core/workers/chunks/fc5ac54aab66562c8463.js +1 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis.json +1 -0
- package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
- package/config.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +133 -127
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/support/FieldConfiguration.js +1 -1
- package/layers/support/fieldConfigUtils.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/package.json +2 -2
- package/portal/schemas/definitions.js +1 -1
- package/support/basemapEnsureType.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/featureServiceUtils.js +1 -1
- package/views/2d/layers/features/schema/SourceSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFeatureLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/AFeatureTileLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/FeatureDrillDownTileLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/FeaturePagedTileLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/FeatureSnapshotLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
- package/views/3d/GroundView3D.js +5 -0
- package/views/3d/analysis/ElevationProfile/{ElevationProfileSceneLineComputation.js → ElevationProfileLineSceneComputation.js} +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementConfiguration.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
- package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/DrapedSubView3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/MemoryController.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/popupHitTest.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileChart.js +1 -1
- package/views/analysis/ElevationProfile/{ElevationProfileGroundLineComputation.js → ElevationProfileLineGroundComputation.js} +1 -1
- package/views/analysis/ElevationProfile/{ElevationProfileInputLineComputation.js → ElevationProfileLineInputComputation.js} +1 -1
- package/views/analysis/ElevationProfile/{ElevationProfileQueryLineComputation.js → ElevationProfileLineQueryComputation.js} +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/widgets/Editor/Upload.js +1 -1
- package/widgets/Editor/components/Notices.js +1 -1
- package/widgets/Editor/modelUploadUtils.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
- package/analysis/ElevationProfile/ElevationProfileGroundLine.d.ts +0 -4
- package/analysis/ElevationProfile/ElevationProfileInputLine.d.ts +0 -4
- package/analysis/ElevationProfile/ElevationProfileQueryLine.d.ts +0 -4
- package/analysis/ElevationProfile/ElevationProfileSceneLine.d.ts +0 -4
- package/assets/esri/core/workers/chunks/03e5d1a00d85e4d16bff.js +0 -1
- package/assets/esri/core/workers/chunks/0914a52fb33af5d77fab.js +0 -1
- package/assets/esri/core/workers/chunks/1d491447b13f2f2b4399.js +0 -1
- package/assets/esri/core/workers/chunks/20850b0fdb55fb17bc90.js +0 -1
- package/assets/esri/core/workers/chunks/42bc1e981624ce9844a4.js +0 -1
- package/assets/esri/core/workers/chunks/436bbe99bedd7b331edb.js +0 -1
- package/assets/esri/core/workers/chunks/486ea51306c619238e41.js +0 -1
- package/assets/esri/core/workers/chunks/49cb78c85de0102e5f02.js +0 -1
- package/assets/esri/core/workers/chunks/5610dfde4e636e2333a9.js +0 -1
- package/assets/esri/core/workers/chunks/655a878ddea4907d830e.js +0 -1
- package/assets/esri/core/workers/chunks/72fe4f1f789abb5b4035.js +0 -1
- package/assets/esri/core/workers/chunks/7402c2853f6aed8d1bc7.js +0 -1
- package/assets/esri/core/workers/chunks/79a9f47dfa9ebabb5dbd.js +0 -1
- package/assets/esri/core/workers/chunks/86378d4f4d7f9a370c22.js +0 -1
- package/assets/esri/core/workers/chunks/b19d723d09f5bea9ca27.js +0 -1
- package/assets/esri/core/workers/chunks/b78ea9cc4d5f2fd3d871.js +0 -1
- package/assets/esri/core/workers/chunks/bd4125d163f372a7e978.js +0 -1
- package/assets/esri/core/workers/chunks/d0a149050f7f1c1ada09.js +0 -1
- package/assets/esri/core/workers/chunks/da42cc4f6142846cb745.js +0 -1
- package/assets/esri/core/workers/chunks/dd84f630466a26722d57.js +0 -1
- package/assets/esri/core/workers/chunks/e17df11c98dbd869302b.js +0 -1
- package/assets/esri/core/workers/chunks/e1b3ae6426886e2fab07.js +0 -1
- package/assets/esri/core/workers/chunks/f6513ec888a7d927d948.js +0 -1
- package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +0 -5
- package/views/2d/layers/features/sources/strategies/ATileLoadStrategy.js +0 -5
- package/views/2d/layers/features/sources/strategies/DrillDownTileLoadStrategy.js +0 -5
- package/views/2d/layers/features/sources/strategies/PagedTileLoadStrategy.js +0 -5
- package/views/2d/layers/features/sources/strategies/SnapshotLoadStrategy.js +0 -5
package/layers/ParquetLayer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{watch as a}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import l from"../geometry/SpatialReference.js";import d from"../graphic/ParquetGraphicOrigin.js";import m from"./Layer.js";import{ParquetSource as c}from"./graphics/sources/ParquetSource.js";import{BlendLayer as y}from"./mixins/BlendLayer.js";import{CustomParametersMixin as f}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as h}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as g}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as j}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as v}from"./mixins/OperationalLayer.js";import{OrderedLayer as x}from"./mixins/OrderedLayer.js";import{PortalLayer as F}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as b}from"./mixins/TemporalLayer.js";import{labelsVisible as I}from"./support/commonProperties.js";import O from"./support/FeatureTemplate.js";import R from"./support/Field.js";import{defineFieldProperties as q}from"./support/fieldProperties.js";import{fixRendererFields as P,fixTimeInfoFields as T}from"./support/fieldUtils.js";import w from"./support/LabelClass.js";import{reader as C}from"./support/labelingInfo.js";import{ParquetEncodingBase as Q}from"./support/ParquetEncodingBase.js";import D from"./support/ParquetEncodingLocation.js";import z from"./support/ParquetEncodingWkb.js";import{completeParquetLayerInfo as B,parquetGeometryTypeKebabDict as E}from"./support/parquetUtils.js";import{rendererTypes as A}from"../renderers/support/typeUtils.js";import L from"../rest/support/Query.js";import{createPopupTemplate as G}from"../support/popupUtils.js";const U=q(),M="__OBJECTID",W={types:{key:"type",base:Q,typeMap:{wkb:z,location:D}}};let _=class extends(h(j(g(y(x(b(S(v(F(p(f(r(m))))))))))))){constructor(e){super(e),this.capabilities=k(),this.copyright=null,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.encoding=null,this.geometryType=null,this.graphicOrigin=new d(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=M,this.outFields=null,this.popupTemplate=null,this.source=null,this.spatialReference=l.WGS84,this.templates=null,this.title="Parquet",this.type="parquet",this.urls=new s}async load(e){return this.addResolvingPromise(this._load(e)),this.addHandles([a(()=>this.customParameters,e=>this.source?.setCustomParameters(e))]),this}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return null==this.geometryType}set renderer(e){P(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return G(this,e)}createQuery(){const e=new L;return e.returnGeometry=!0,e.outFields=["*"],e}async createSource(e){const t=await B({urls:this.urls,fields:this.fields,encoding:this.encoding,geometryType:this.geometryType,spatialReference:this.spatialReference,file:this.file},{customParameters:this.customParameters});let{fields:r,geometryType:s,encoding:p,spatialReference:a,urls:n,file:u,displayOptimization:d}=t;if(null==r)throw new o("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",t);if(a){if(!a.isGeographic&&!a.isWebMercator)throw new o("parquet-layer:unsupported","Unable to create parquet source: currently only geographic and Web Mercator supported",t);a.isGeographic&&!a.isWGS84&&(i.getLogger("parquet-layer").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:t.spatialReference}),a=l.WGS84)}r.push(new R({name:M,type:"oid",alias:M}));const m=new c({urls:n.items,fields:r,objectIdField:M,spatialReference:a,encoding:p,geometryType:s,file:u,customParameters:this.customParameters??void 0,displayOptimization:d});return await m.load(e),m}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();const r=await this.source.queryFeatures(this._normalizeQuery(e),t),s=this.graphicOrigin;if(r?.features)for(const o of r.features)o.layer=o.sourceLayer=this,o.origin=s;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}_normalizeQuery(e){return L.from(e)??this.createQuery()}async _load(e){const t=await this.createSource(e);this._set("source",t),this.fields=t.fields,this.objectIdField=t.objectIdField,this.encoding=t.encoding,this.file=t.file,this.geometryType=t.geometryType,t.spatialReference&&(this.spatialReference=t.spatialReference),this.displayOptimization=t.displayOptimization,t.fullExtent&&(this.fullExtent=t.fullExtent),P(this.renderer,this.fieldsIndex),T(this.timeInfo,this.fieldsIndex)}};e([n({readOnly:!0,json:{read:!1,write:!1}})],_.prototype,"capabilities",void 0),e([n({type:String})],_.prototype,"copyright",void 0),e([n({readOnly:!0})],_.prototype,"defaultPopupTemplate",null),e([n()],_.prototype,"displayOptimization",void 0),e([n({type:[R],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],_.prototype,"fields",void 0),e([n(U.fieldsIndex)],_.prototype,"fieldsIndex",void 0),e([n(W)],_.prototype,"encoding",void 0),e([n({json:{read:{reader:E.read}}})],_.prototype,"geometryType",void 0),e([n({readOnly:!0,clonable:!1})],_.prototype,"graphicOrigin",void 0),e([n(I)],_.prototype,"labelsVisible",void 0),e([n({type:[w],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:C},write:!0}})],_.prototype,"labelingInfo",void 0),e([n()],_.prototype,"file",void 0),e([n({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],_.prototype,"objectIdField",void 0),e([n(U.outFields)],_.prototype,"outFields",void 0),e([n({type:t,json:{name:"popupInfo",write:!0}})],_.prototype,"popupTemplate",void 0),e([n({types:A,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"}}}})],_.prototype,"renderer",null),e([n({json:{read:!1},cast:null,type:c,readOnly:!0})],_.prototype,"source",void 0),e([n({type:l})],_.prototype,"spatialReference",void 0),e([n({type:[O]})],_.prototype,"templates",void 0),e([n()],_.prototype,"title",void 0),e([n({json:{read:!1},readOnly:!0})],_.prototype,"type",void 0),e([n({type:s.ofType(String)})],_.prototype,"urls",void 0),_=e([u("esri.layers.ParquetLayer")],_);const H=_;function k(){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:8e3,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}export{H as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{watch as a}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import l from"../geometry/SpatialReference.js";import d from"../graphic/ParquetGraphicOrigin.js";import m from"./Layer.js";import{ParquetSource as c}from"./graphics/sources/ParquetSource.js";import{BlendLayer as y}from"./mixins/BlendLayer.js";import{CustomParametersMixin as f}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as h}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as g}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as j}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as v}from"./mixins/OperationalLayer.js";import{OrderedLayer as x}from"./mixins/OrderedLayer.js";import{PortalLayer as F}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as b}from"./mixins/TemporalLayer.js";import{labelsVisible as I}from"./support/commonProperties.js";import O from"./support/FeatureTemplate.js";import R from"./support/Field.js";import{defineFieldProperties as q}from"./support/fieldProperties.js";import{fixRendererFields as P,fixTimeInfoFields as T}from"./support/fieldUtils.js";import w from"./support/LabelClass.js";import{reader as C}from"./support/labelingInfo.js";import{ParquetEncodingBase as Q}from"./support/ParquetEncodingBase.js";import D from"./support/ParquetEncodingLocation.js";import z from"./support/ParquetEncodingWkb.js";import{completeParquetLayerInfo as B,parquetGeometryTypeKebabDict as E}from"./support/parquetUtils.js";import{rendererTypes as A}from"../renderers/support/typeUtils.js";import L from"../rest/support/Query.js";import{createPopupTemplate as G}from"../support/popupUtils.js";const U=q(),M="__OBJECTID",W={types:{key:"type",base:Q,typeMap:{wkb:z,location:D}}};let _=class extends(h(j(g(y(x(b(S(v(F(p(f(r(m))))))))))))){constructor(e){super(e),this.capabilities=k(),this.copyright=null,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.encoding=null,this.geometryType=null,this.graphicOrigin=new d(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=M,this.outFields=null,this.popupTemplate=null,this.source=null,this.spatialReference=l.WGS84,this.templates=null,this.title="Parquet",this.type="parquet",this.urls=new s}async load(e){return this.addResolvingPromise(this._load(e)),this.addHandles([a(()=>this.urls,e=>this.source?.updateFiles(e.items)),a(()=>this.customParameters,e=>this.source?.setCustomParameters(e))]),this}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return null==this.geometryType}set renderer(e){P(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return G(this,e)}createQuery(){const e=new L;return e.returnGeometry=!0,e.outFields=["*"],e}async createSource(e){const t=await B({urls:this.urls,fields:this.fields,encoding:this.encoding,geometryType:this.geometryType,spatialReference:this.spatialReference,file:this.file},{customParameters:this.customParameters});let{fields:r,geometryType:s,encoding:p,spatialReference:a,urls:n,file:u,displayOptimization:d}=t;if(null==r)throw new o("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",t);if(a){if(!a.isGeographic&&!a.isWebMercator)throw new o("parquet-layer:unsupported","Unable to create parquet source: currently only geographic and Web Mercator supported",t);a.isGeographic&&!a.isWGS84&&(i.getLogger("parquet-layer").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:t.spatialReference}),a=l.WGS84)}r.push(new R({name:M,type:"oid",alias:M}));const m=new c({urls:n.items,fields:r,objectIdField:M,spatialReference:a,encoding:p,geometryType:s,file:u,customParameters:this.customParameters??void 0,displayOptimization:d});return await m.load(e),m}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();const r=await this.source.queryFeatures(this._normalizeQuery(e),t),s=this.graphicOrigin;if(r?.features)for(const o of r.features)o.layer=o.sourceLayer=this,o.origin=s;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}_normalizeQuery(e){return L.from(e)??this.createQuery()}async _load(e){const t=await this.createSource(e);this._set("source",t),this.fields=t.fields,this.objectIdField=t.objectIdField,this.encoding=t.encoding,this.file=t.file,this.geometryType=t.geometryType,t.spatialReference&&(this.spatialReference=t.spatialReference),this.displayOptimization=t.displayOptimization,t.fullExtent&&(this.fullExtent=t.fullExtent),P(this.renderer,this.fieldsIndex),T(this.timeInfo,this.fieldsIndex)}};e([n({readOnly:!0,json:{read:!1,write:!1}})],_.prototype,"capabilities",void 0),e([n({type:String})],_.prototype,"copyright",void 0),e([n({readOnly:!0})],_.prototype,"defaultPopupTemplate",null),e([n()],_.prototype,"displayOptimization",void 0),e([n({type:[R],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],_.prototype,"fields",void 0),e([n(U.fieldsIndex)],_.prototype,"fieldsIndex",void 0),e([n(W)],_.prototype,"encoding",void 0),e([n({json:{read:{reader:E.read}}})],_.prototype,"geometryType",void 0),e([n({readOnly:!0,clonable:!1})],_.prototype,"graphicOrigin",void 0),e([n(I)],_.prototype,"labelsVisible",void 0),e([n({type:[w],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:C},write:!0}})],_.prototype,"labelingInfo",void 0),e([n()],_.prototype,"file",void 0),e([n({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],_.prototype,"objectIdField",void 0),e([n(U.outFields)],_.prototype,"outFields",void 0),e([n({type:t,json:{name:"popupInfo",write:!0}})],_.prototype,"popupTemplate",void 0),e([n({types:A,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"}}}})],_.prototype,"renderer",null),e([n({json:{read:!1},cast:null,type:c,readOnly:!0})],_.prototype,"source",void 0),e([n({type:l})],_.prototype,"spatialReference",void 0),e([n({type:[O]})],_.prototype,"templates",void 0),e([n()],_.prototype,"title",void 0),e([n({json:{read:!1},readOnly:!0})],_.prototype,"type",void 0),e([n({type:s.ofType(String)})],_.prototype,"urls",void 0),_=e([u("esri.layers.ParquetLayer")],_);const H=_;function k(){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:8e3,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}export{H as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../request.js";import{createTask as r}from"../core/asyncUtils.js";import i from"../core/Error.js";import{clone as o}from"../core/lang.js";import{MultiOriginJSONMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as l}from"../core/promiseUtils.js";import{urlToObject as a,addQueryParameters as n,isProtocolRelative as p,normalize as y}from"../core/urlUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{reader as c}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{writer as h}from"../core/accessorSupport/decorators/writer.js";import d from"../geometry/Extent.js";import S from"../geometry/SpatialReference.js";import f from"./Layer.js";import{APIKeyMixin as g}from"./mixins/APIKeyMixin.js";import{ArcGISCachedService as v}from"./mixins/ArcGISCachedService.js";import{ArcGISService as j}from"./mixins/ArcGISService.js";import{BlendLayer as _}from"./mixins/BlendLayer.js";import{CustomParametersMixin as w}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as b}from"./mixins/OperationalLayer.js";import{PortalLayer as T}from"./mixins/PortalLayer.js";import{RefreshableLayer as x}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{checkWebPSupport as L}from"./support/imageUtils.js";import U from"./support/SpriteSource.js";import R from"./support/TileInfo.js";import{TilemapCache as O}from"./support/TilemapCache.js";import{loadMetadata as P}from"./support/vectorTileLayerLoader.js";import{createForItemRead as M}from"../portal/support/jsonContext.js";import{parseKnownArcGISOnlineDomain as C}from"../portal/support/urlUtils.js";import{e as V}from"../chunks/persistableUrlUtils.js";import{areSchemasOverlapping as D,unionTileInfos as E}from"../views/2d/engine/vectorTiles/tileInfoUtils.js";import N from"../views/2d/engine/vectorTiles/style/StyleRepository.js";import{getWebGLCapabilities as k}from"../views/webgl/capabilities.js";let K=class extends(_(I(x(v(j(b(T(w(g(s(f))))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))e?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const r=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(l).then(async()=>{if(!this.portalItem?.id)return;const r=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await t(r,{...e,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:r},M(this.portalItem,"portal-item"))}).catch(l).then(()=>this._loadStyle(e));return this.addResolvingPromise(r),Promise.resolve(this)}get apiKey(){return super.apiKey}set apiKey(e){super.apiKey=e}set portalItem(e){super.portalItem=e}get attributionDataUrl(){const e=this.currentStyleInfo,t=e?.serviceUrl&&a(e.serviceUrl);if(!t)return null;const r=this._getDefaultAttribution(t.path);return r?n(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?a(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(e,t){e&&p(e)&&(e=`https:${e}`);const r=C(e);t.styleUrl=V(e,r)}get tileInfo(){const e=[];for(const r in this.sourceNameToSource)e.push(this.sourceNameToSource[r]);let t=this.primarySource?.tileInfo||new R;if(e.length>1)for(let r=0;r<e.length;r++)D(t,e[r].tileInfo)&&(t=E(t,e[r].tileInfo));return t}readTilemapCache(e,t){const r=t.capabilities?.includes("Tilemap");return r?new O({layer:this}):null}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const r=k().maxTextureSize,i=this.currentStyleInfo?.spriteUrl?n(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,o=new U({type:"url",spriteUrl:i,pixelRatio:e,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await o.load(t),this._spriteSourceMap.set(e,o)}return this._spriteSourceMap.get(e)}async setSpriteSource(e,t){if(!e)return null;const r=k().maxTextureSize,i=e.spriteUrl,o=i?n(i,{...this.customParameters,token:this.apiKey}):null;if(!o&&"url"===e.type)return null;const s=new U(e,r);try{await s.load(t);const r=e.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,s),o&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=o),this.emit("spriteSource-change",{spriteSource:s}),s}catch(a){l(a)}return null}async loadStyle(e,t){const i=e||this.style||this.url;return this._loadingTask&&"string"==typeof i&&this.url===i||(this._loadingTask?.abort(),this._loadingTask=r(e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(i,{signal:e})),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return o(this.styleRepository?.getPaintProperties(e))}setPaintProperties(e,t){const r=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const i=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:r||i})}getStyleLayer(e){return o(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return o(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)}write(e,t){return t?.origin&&!this.styleUrl?(t.messages&&t.messages.push(new i("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,r){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const r=await P(e,{...t,query:{...this.customParameters,token:this.apiKey}});if("webp"===r.spriteFormat){await L("lossy")||(r.spriteFormat="png")}this._set("currentStyleInfo",{...r}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new N(r.style,!1)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^/]+)?\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/vectortileserver/i),r=["OpenBasemap_v2","OpenBasemap_GCS_v2","OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2","World_Hillshade_v2"];if(!t)return;const i=t[2]&&t[2].toLowerCase();if(!i)return;const o=t[1]||"";for(const s of r)if(s.toLowerCase().includes(i))return y(`//static.arcgis.com/attribution/Vector${o}/${s}`)}async _loadStyle(e){return this._loadingTask?.promise??this.loadStyle(null,e)}};e([u({readOnly:!0})],K.prototype,"attributionDataUrl",null),e([u({type:["show","hide"]})],K.prototype,"listMode",void 0),e([u({json:{read:!0,write:!0}})],K.prototype,"blendMode",void 0),e([u({readOnly:!0,json:{read:!1}})],K.prototype,"capabilities",null),e([u({readOnly:!0})],K.prototype,"currentStyleInfo",void 0),e([u({json:{read:!1},readOnly:!0,type:d})],K.prototype,"fullExtent",null),e([u({json:{read:!1},readOnly:!0,type:d})],K.prototype,"initialExtent",null),e([u({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],K.prototype,"isReference",void 0),e([u({type:["VectorTileLayer"]})],K.prototype,"operationalLayerType",void 0),e([u({readOnly:!0})],K.prototype,"parsedUrl",null),e([u({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],K.prototype,"path",void 0),e([u({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],K.prototype,"refreshInterval",void 0),e([u()],K.prototype,"style",void 0),e([u({readOnly:!0})],K.prototype,"serviceUrl",null),e([u({type:S,readOnly:!0})],K.prototype,"spatialReference",null),e([u({readOnly:!0})],K.prototype,"styleRepository",void 0),e([u({readOnly:!0})],K.prototype,"sourceNameToSource",void 0),e([u({readOnly:!0})],K.prototype,"primarySource",void 0),e([u({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],K.prototype,"styleUrl",null),e([h(["portal-item","web-document"],"styleUrl")],K.prototype,"writeStyleUrl",null),e([u({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:R})],K.prototype,"tileInfo",null),e([u()],K.prototype,"tilemapCache",void 0),e([c("service","tilemapCache",["capabilities","tileInfo"])],K.prototype,"readTilemapCache",null),e([u({json:{read:!1},readOnly:!0,value:"vector-tile"})],K.prototype,"type",void 0),e([u({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],K.prototype,"url",void 0),e([u({readOnly:!0})],K.prototype,"version",void 0),e([c("version",["version","currentVersion"])],K.prototype,"readVersion",null),K=e([m("esri.layers.VectorTileLayer")],K);const B=K;export{B as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../request.js";import{createTask as r}from"../core/asyncUtils.js";import i from"../core/Error.js";import{clone as o}from"../core/lang.js";import{MultiOriginJSONMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as l}from"../core/promiseUtils.js";import{urlToObject as a,addQueryParameters as n,isProtocolRelative as p,normalize as y}from"../core/urlUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import{reader as c}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{writer as h}from"../core/accessorSupport/decorators/writer.js";import d from"../geometry/Extent.js";import S from"../geometry/SpatialReference.js";import f from"./Layer.js";import{APIKeyMixin as g}from"./mixins/APIKeyMixin.js";import{ArcGISCachedService as v}from"./mixins/ArcGISCachedService.js";import{ArcGISService as j}from"./mixins/ArcGISService.js";import{BlendLayer as _}from"./mixins/BlendLayer.js";import{CustomParametersMixin as w}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as b}from"./mixins/OperationalLayer.js";import{PortalLayer as T}from"./mixins/PortalLayer.js";import{RefreshableLayer as x}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{url as L}from"./support/commonProperties.js";import{checkWebPSupport as U}from"./support/imageUtils.js";import P from"./support/SpriteSource.js";import R from"./support/TileInfo.js";import{TilemapCache as O}from"./support/TilemapCache.js";import{loadMetadata as M}from"./support/vectorTileLayerLoader.js";import{createForItemRead as C}from"../portal/support/jsonContext.js";import{parseKnownArcGISOnlineDomain as V}from"../portal/support/urlUtils.js";import{e as D}from"../chunks/persistableUrlUtils.js";import{areSchemasOverlapping as E,unionTileInfos as N}from"../views/2d/engine/vectorTiles/tileInfoUtils.js";import k from"../views/2d/engine/vectorTiles/style/StyleRepository.js";import{getWebGLCapabilities as K}from"../views/webgl/capabilities.js";let B=class extends(_(I(x(v(j(b(T(w(g(s(f))))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))e?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const r=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(l).then(async()=>{if(!this.portalItem?.id)return;const r=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await t(r,{...e,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:r},C(this.portalItem,"portal-item"))}).catch(l).then(()=>this._loadStyle(e));return this.addResolvingPromise(r),Promise.resolve(this)}get apiKey(){return super.apiKey}set apiKey(e){super.apiKey=e}set portalItem(e){super.portalItem=e}get attributionDataUrl(){const e=this.currentStyleInfo,t=e?.serviceUrl&&a(e.serviceUrl);if(!t)return null;const r=this._getDefaultAttribution(t.path);return r?n(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?a(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(e,t){e&&p(e)&&(e=`https:${e}`);const r=V(e);t.styleUrl=D(e,r)}get tileInfo(){const e=[];for(const r in this.sourceNameToSource)e.push(this.sourceNameToSource[r]);let t=this.primarySource?.tileInfo||new R;if(e.length>1)for(let r=0;r<e.length;r++)E(t,e[r].tileInfo)&&(t=N(t,e[r].tileInfo));return t}readTilemapCache(e,t){const r=t.capabilities?.includes("Tilemap");return r?new O({layer:this}):null}set url(e){if(!e)return void this._set("url",e);const t=a(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){const r=K().maxTextureSize,i=this.currentStyleInfo?.spriteUrl?n(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,o=new P({type:"url",spriteUrl:i,pixelRatio:e,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await o.load(t),this._spriteSourceMap.set(e,o)}return this._spriteSourceMap.get(e)}async setSpriteSource(e,t){if(!e)return null;const r=K().maxTextureSize,i=e.spriteUrl,o=i?n(i,{...this.customParameters,token:this.apiKey}):null;if(!o&&"url"===e.type)return null;const s=new P(e,r);try{await s.load(t);const r=e.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,s),o&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=o),this.emit("spriteSource-change",{spriteSource:s}),s}catch(a){l(a)}return null}async loadStyle(e,t){const i=e||this.style||this.url;return this._loadingTask&&"string"==typeof i&&this.url===i||(this._loadingTask?.abort(),this._loadingTask=r(e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(i,{signal:e})),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return o(this.styleRepository?.getPaintProperties(e))}setPaintProperties(e,t){const r=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const i=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:r||i})}getStyleLayer(e){return o(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return o(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)}write(e,t){return t?.origin&&!this.styleUrl?(t.messages&&t.messages.push(new i("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,r){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const r=await M(e,{...t,query:{...this.customParameters,token:this.apiKey}});if("webp"===r.spriteFormat){await U("lossy")||(r.spriteFormat="png")}this._set("currentStyleInfo",{...r}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new k(r.style,!1)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^/]+)?\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/vectortileserver/i),r=["OpenBasemap_v2","OpenBasemap_GCS_v2","OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2","World_Hillshade_v2"];if(!t)return;const i=t[2]&&t[2].toLowerCase();if(!i)return;const o=t[1]||"";for(const s of r)if(s.toLowerCase().includes(i))return y(`//static.arcgis.com/attribution/Vector${o}/${s}`)}async _loadStyle(e){return this._loadingTask?.promise??this.loadStyle(null,e)}};e([u({readOnly:!0})],B.prototype,"attributionDataUrl",null),e([u({type:["show","hide"]})],B.prototype,"listMode",void 0),e([u({json:{read:!0,write:!0}})],B.prototype,"blendMode",void 0),e([u({readOnly:!0,json:{read:!1}})],B.prototype,"capabilities",null),e([u({readOnly:!0})],B.prototype,"currentStyleInfo",void 0),e([u({json:{read:!1},readOnly:!0,type:d})],B.prototype,"fullExtent",null),e([u({json:{read:!1},readOnly:!0,type:d})],B.prototype,"initialExtent",null),e([u({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],B.prototype,"isReference",void 0),e([u({type:["VectorTileLayer"]})],B.prototype,"operationalLayerType",void 0),e([u({readOnly:!0})],B.prototype,"parsedUrl",null),e([u({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],B.prototype,"path",void 0),e([u({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],B.prototype,"refreshInterval",void 0),e([u()],B.prototype,"style",void 0),e([u({readOnly:!0})],B.prototype,"serviceUrl",null),e([u({type:S,readOnly:!0})],B.prototype,"spatialReference",null),e([u({readOnly:!0})],B.prototype,"styleRepository",void 0),e([u({readOnly:!0})],B.prototype,"sourceNameToSource",void 0),e([u({readOnly:!0})],B.prototype,"primarySource",void 0),e([u({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],B.prototype,"styleUrl",null),e([h(["portal-item","web-document"],"styleUrl")],B.prototype,"writeStyleUrl",null),e([u({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:R})],B.prototype,"tileInfo",null),e([u()],B.prototype,"tilemapCache",void 0),e([c("service","tilemapCache",["capabilities","tileInfo"])],B.prototype,"readTilemapCache",null),e([u({json:{read:!1},readOnly:!0,value:"vector-tile"})],B.prototype,"type",void 0),e([u({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}}),u(L)],B.prototype,"url",null),e([u({readOnly:!0})],B.prototype,"version",void 0),e([c("version",["version","currentVersion"])],B.prototype,"readVersion",null),B=e([m("esri.layers.VectorTileLayer")],B);const A=B;export{A as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{Loadable as r}from"../../../core/Loadable.js";import o from"../../../core/Logger.js";import{open as s}from"../../../core/workers/workers.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import a from"../../../geometry/Extent.js";import l from"../../support/FieldsIndex.js";import{toParquetJSONGeometryType as u}from"../../support/parquetUtils.js";import p from"../../../rest/support/FeatureSet.js";let c=class extends r{constructor(e){super(e),this.type="parquet",this.urls=null,this.fields=null,this.objectIdField=null,this.spatialReference=null}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._initialize(t)),Promise.resolve(this)}destroy(){this._connection.destroy()}setCustomParameters(e){this.customParameters=e,this._proxy.setCustomParameters(this.customParameters).catch(()=>{o.getLogger(this).warn("Failed to update customParameters")})}async queryFeaturesJSON(e,t={}){return await this.load(t),this._proxy.queryFeatures(e.toJSON(),{signal:t?.signal})}async queryFeatures(e,t={}){const r=await this.queryFeaturesJSON(e,{signal:t?.signal});return p.fromJSON(r)}async queryObjectIds(e,t){return await this._proxy.queryObjectIds(e.toJSON(),{signal:t?.signal})}async queryFeatureCount(e,t){return this._proxy.queryFeatureCount(e.toJSON(),{signal:t?.signal})}async queryExtent(e,t){if(null==this.encoding)return o.getLogger(this).warn("Tried to queryExtent, but source does not have a geometry. Returning null extent."),{count:0,extent:null};const r=await this._proxy.queryExtent(e.toJSON(),{signal:t?.signal});return{count:r.count,extent:a.fromJSON(r.extent)}}async _initialize(e){let r;if(this._connection=await s("ParquetSourceWorker",{strategy:"dedicated"}),this._proxy=this._connection.createInvokeProxy(),this.geometryType&&this.encoding){if(!this.spatialReference)throw new t("parquet:unsupported","SpatialReference must be defined");r={geometryType:u(this.geometryType),spatialReference:this.spatialReference.toJSON(),encoding:this.encoding.toJSON(),displayOptimization:this.displayOptimization}}const o=new l(this.fields).toJSON(),{extent:i}=await this._proxy.load({urls:this.urls,metadata:{fieldsIndex:o,geometryType:r?.geometryType??"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:"rowId"},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:r?.spatialReference,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null},geometryInfo:r,customParameters:this.customParameters});this.fullExtent=i?a.fromJSON(i):null}};e([i()],c.prototype,"type",void 0),e([i()],c.prototype,"urls",void 0),e([i()],c.prototype,"fields",void 0),e([i()],c.prototype,"encoding",void 0),e([i()],c.prototype,"geometryType",void 0),e([i()],c.prototype,"objectIdField",void 0),e([i()],c.prototype,"spatialReference",void 0),e([i()],c.prototype,"file",void 0),e([i()],c.prototype,"customParameters",void 0),e([i()],c.prototype,"displayOptimization",void 0),e([i()],c.prototype,"fullExtent",void 0),c=e([n("esri.layers.graphics.sources.ParquetSource")],c);export{c as ParquetSource};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{Loadable as r}from"../../../core/Loadable.js";import o from"../../../core/Logger.js";import{open as s}from"../../../core/workers/workers.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import a from"../../../geometry/Extent.js";import l from"../../support/FieldsIndex.js";import{toParquetJSONGeometryType as u}from"../../support/parquetUtils.js";import p from"../../../rest/support/FeatureSet.js";let c=class extends r{constructor(e){super(e),this.type="parquet",this.urls=null,this.fields=null,this.objectIdField=null,this.spatialReference=null}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._initialize(t)),Promise.resolve(this)}destroy(){this._connection.destroy()}setCustomParameters(e){this.customParameters=e,this._proxy.setCustomParameters(this.customParameters).catch(()=>{o.getLogger(this).warn("Failed to update customParameters")})}async updateFiles(e){this.urls=e,await this._proxy.updateFiles(e)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._proxy.queryFeatures(e.toJSON(),{signal:t?.signal})}async queryFeatures(e,t={}){const r=await this.queryFeaturesJSON(e,{signal:t?.signal});return p.fromJSON(r)}async queryObjectIds(e,t){return await this._proxy.queryObjectIds(e.toJSON(),{signal:t?.signal})}async queryFeatureCount(e,t){return this._proxy.queryFeatureCount(e.toJSON(),{signal:t?.signal})}async queryExtent(e,t){if(null==this.encoding)return o.getLogger(this).warn("Tried to queryExtent, but source does not have a geometry. Returning null extent."),{count:0,extent:null};const r=await this._proxy.queryExtent(e.toJSON(),{signal:t?.signal});return{count:r.count,extent:a.fromJSON(r.extent)}}async _initialize(e){let r;if(this._connection=await s("ParquetSourceWorker",{strategy:"dedicated"}),this._proxy=this._connection.createInvokeProxy(),this.geometryType&&this.encoding){if(!this.spatialReference)throw new t("parquet:unsupported","SpatialReference must be defined");r={geometryType:u(this.geometryType),spatialReference:this.spatialReference.toJSON(),encoding:this.encoding.toJSON(),displayOptimization:this.displayOptimization}}const o=new l(this.fields).toJSON(),{extent:i}=await this._proxy.load({urls:this.urls,metadata:{fieldsIndex:o,geometryType:r?.geometryType??"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:"rowId"},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:r?.spatialReference,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null},geometryInfo:r,customParameters:this.customParameters});this.fullExtent=i?a.fromJSON(i):null}};e([i()],c.prototype,"type",void 0),e([i()],c.prototype,"urls",void 0),e([i()],c.prototype,"fields",void 0),e([i()],c.prototype,"encoding",void 0),e([i()],c.prototype,"geometryType",void 0),e([i()],c.prototype,"objectIdField",void 0),e([i()],c.prototype,"spatialReference",void 0),e([i()],c.prototype,"file",void 0),e([i()],c.prototype,"customParameters",void 0),e([i()],c.prototype,"displayOptimization",void 0),e([i()],c.prototype,"fullExtent",void 0),c=e([n("esri.layers.graphics.sources.ParquetSource")],c);export{c as ParquetSource};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__addDisposableResource as e,__disposeResources as t}from"tslib";import{toConst as r}from"../../../../core/compilerUtils.js";import s from"../../../../core/Error.js";import{assertIsSome as o}from"../../../../core/maybe.js";import{QueueProcessor as n}from"../../../../core/QueueProcessor.js";import a from"../../../../geometry/SpatialReference.js";import{set as i,create as u,expandWithRect as l,expandWithAABB as f,negativeInfinity as
|
|
5
|
+
import{__addDisposableResource as e,__disposeResources as t}from"tslib";import{toConst as r}from"../../../../core/compilerUtils.js";import s from"../../../../core/Error.js";import{assertIsSome as o}from"../../../../core/maybe.js";import{QueueProcessor as n}from"../../../../core/QueueProcessor.js";import a from"../../../../geometry/SpatialReference.js";import{set as i,create as u,expandWithRect as l,expandWithAABB as f,negativeInfinity as c,fromRect as d}from"../../../../geometry/support/aaBoundingBox.js";import{getQueryResultExtent as m,QueryEngine as h}from"../../data/QueryEngine.js";import{QueryEngineResult as y}from"../../data/QueryEngineResult.js";import p from"../../../support/FieldsIndex.js";import{collectSQLFieldNames as _}from"../../../support/fieldUtils.js";import{createParquetFile as g,readGeoMetadata as I}from"../../../../libs/parquet/parquet.js";import{FeatureStoreQueryAdapter as w}from"../../../../views/2d/layers/features/FeatureStoreQueryAdapter.js";import{FeatureSnapshotSourceChunk as x}from"../../../../views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js";import{FeatureSourceChunkStore as R}from"../../../../views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js";import{FeatureMetadata as F}from"../../../../views/2d/layers/features/support/FeatureMetadata.js";import{FeatureSetReaderParquet as C}from"../../../../views/2d/layers/features/support/FeatureSetReaderParquet.js";const q=new w,j=8e3;class b{constructor(){this._fileInfos=new Map,this._queue=new n({concurrency:1,process:(e,t)=>this._executeQuery(e,t)})}async load(r){this.setCustomParameters(r.customParameters),this._geometryInfo=r.geometryInfo;for(const e of r.urls){const t=await g(e,{geometryInfo:r.geometryInfo,outSpatialReference:null,getCustomParameters:()=>this._customParameters});this._fileInfos.set(e,{index:this._fileInfos.size,file:t})}this._metadata=F.createFeature(r.metadata),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:r.geometryInfo?.geometryType??"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:"rowId"},hasM:!1,hasZ:!1,spatialReference:a.fromJSON(r.geometryInfo?.spatialReference),aggregateAdapter:null,timeInfo:null,definitionExpression:null};const s=this._fileInfos.values().next().value;if(!s)return{extent:null};const{fields:o,timeZoneByFieldName:n}=r.metadata.fieldsIndex,f=o.map(e=>({...e,column:s.file.columnForFieldName(e.name)})),d=p.fromJSON({fields:f,timeZoneByFieldName:n});if(this._fieldsIndex=d,r.metadata.spatialReference&&(this._fullExtent=E(this._fileInfos.values(),r.metadata.spatialReference)),null==this._fullExtent&&"location"===r.geometryInfo?.encoding.type){const{latitudeFieldName:s,longitudeFieldName:o}=r.geometryInfo.encoding,n=this._fieldsIndex.get(s)?.column,a=this._fieldsIndex.get(o)?.column,f=i(u(),c);for(const r of this._fileInfos.values())for(const s of r.file.rowGroups()){const r={stack:[],error:void 0,hasError:!1};try{const t=e(r,s.columnDescriptorForAttribute(n),!1),o=e(r,s.columnDescriptorForAttribute(a),!1),i=[o.minValue(),t.minValue(),o.maxValue(),t.maxValue()];l(f,i),s.free()}catch(m){r.error=m,r.hasError=!0}finally{t(r)}}this._fullExtent={xmin:f[0],ymin:f[1],xmax:f[3],ymax:f[4],spatialReference:r.metadata.spatialReference}}return{extent:this._fullExtent}}destroy(){for(const e of this._fileInfos.values())e.file.free();this._fileInfos.clear(),this._queue.destroy()}setCustomParameters(e){this._customParameters=e}async updateFiles(e){const t=new Set(e);for(const[r,s]of this._fileInfos.entries())t.has(r)?t.delete(r):(s.file.free(),this._fileInfos.delete(r));for(const r of t){const e=await g(r,{geometryInfo:this._geometryInfo,outSpatialReference:null,getCustomParameters:()=>this._customParameters});this._fileInfos.set(r,{index:this._fileInfos.size,file:e})}}async queryFeatures(e,t){if(this._validateQuery(e),e.objectIds?.length){return(await this._enqueueQuery(e,t)).createQueryResponse()}e.resultRecordCount=e.resultRecordCount?Math.min(e.resultRecordCount,8e3):8e3,e.resultOffset=e.resultOffset??0;return(await this._enqueueQuery(e,t)).createQueryResponse()}async queryFeatureCount(e,t){if(this._validateQuery(e),!Q(e))return this._getFeatureCount();e.resultRecordCount=e.resultRecordCount??this._getFeatureCount(),e.resultOffset=e.resultOffset??0,delete e.outFields,delete e.returnGeometry;return(await this._enqueueQuery(e,t)).createQueryResponseForCount()}async queryObjectIds(e,t){if(this._validateQuery(e),!Q(e))return Array.from({length:this._getFeatureCount()},(e,t)=>t);e.resultRecordCount=e.resultRecordCount?Math.min(e.resultRecordCount,8e3):8e3,e.resultOffset=e.resultOffset??0,delete e.returnGeometry,delete e.outFields;return(await this._enqueueQuery(e,t)).items.map(e=>e.getObjectId())}async queryExtent(e,t){if(this._validateQuery(e),this._fullExtent&&!Q(e))return{count:this._getFeatureCount(),extent:this._fullExtent};const s=r(this._metadata.spatialReference);e.resultOffset=e.resultOffset??0,e.resultRecordCount=e.resultRecordCount??this._getFeatureCount(),e.returnGeometry=!0,delete e.outFields;const o=i(u(),c),n=u(),a=await this._enqueueQuery(e,t);let l=0;for(const r of a.items)r.getBounds(n)&&(f(o,n),l+=1);return{count:l,extent:m(o,s,e.outSR?r(e.outSR):s,s,!1)}}_getFeatureCount(){return Array.from(this._fileInfos.values()).reduce((e,t)=>e+t.file.numRows(),0)}_validateQuery(e){if(e.outStatistics)throw new s("parquet:unsupported","Statistics queries are not supported",{query:e});if(e.orderByFields?.length)throw new s("parquet:unsupported","Queries using orderBy are not supported",{query:e})}async*_fetchChunks(e,t){for(const r of this._fileInfos.values()){const s=r.file.numRows(),o=Math.ceil(s/j);for(let n=0;n<o;n++){const s=n*j,o=await r.file.readChunk(s,j,e.fields,e.returnGeometry,t);for(const e of o){const t=new C(this._metadata,this._fieldsIndex,e,0,r.index),s=new x(t,null,0,!1),o=S(this._metadata,[s],this._queryEngineParams);yield o}}}}_enqueueQuery(e,t){return this._queue.push(e,t)}async _executeQuery(e,t){const r=await this._getReadParams(e);if(e.objectIds?.length)for(const o of this._fileInfos.values()){const s=[],n=(await o.file.readChunksByRowId(new Uint32Array(e.objectIds),r.fields,r.returnGeometry,t)).map((e,t)=>new C(this._metadata,this._fieldsIndex,e,t,o.index)).map((e,t)=>new x(e,null,t,!1)),a=S(this._metadata,n,this._queryEngineParams),i=await a.executeQueryForOpaqueFeatures(e,t);for(const e of i)s.push(e);return new y(s,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._metadata.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:q})}let s=e.resultRecordCount,n=e.resultOffset;o(s),o(n),delete e.resultRecordCount,delete e.resultOffset;const a=[];for await(const o of this._fetchChunks(r,t)){const r=await o.executeQueryForOpaqueFeatures(e,t);if(r.length>n){const t=r.slice(n,Math.min(n+s,r.length));for(const e of t)a.push(e);if(n=0,s-=t.length,0===s)return new y(a,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._metadata.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:q})}else n-=r.length}return new y(a,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._metadata.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:q})}async _getReadParams(e){const t=new Set;if(e.where&&await _(t,this._fieldsIndex,e.where),e.outStatistics)for(const r of e.outStatistics)null!=r.onStatisticField&&t.add(r.onStatisticField);if(e.outFields)for(const r of e.outFields)t.add(r);return{fields:this._getAttributeIds(Array.from(t)),returnGeometry:!!e.returnGeometry||!!e.geometry}}_getAttributeIds(e){if(null==e)return new Uint32Array;if(e.includes("*"))return new Uint32Array(this._fieldsIndex.fields.map(e=>e.column).filter(e=>null!=e));const t=[];for(const r of e){const e=this._fieldsIndex.get(r);if(null==e)throw new s("unknown-field",`Field ${r} does not exist`);null==e.column||t.push(e.column)}return new Uint32Array(t)}}function Q(e){return Object.keys(e).some(e=>v(e))}function v(e){switch(e){case"resultOffset":case"resultRecordCount":case"aggregateIds":case"distance":case"gdbVersion":case"geometry":case"having":case"timeExtent":case"where":case"objectIds":case"historicMoment":return!0;default:return!1}}function S(e,t,r){const s=new R(()=>e);for(const o of t)s.insert(o);return new h({...r,featureStore:s})}function O(e){switch(e.length){case 4:return d(u(),e);case 6:return e;default:throw new s("parquet:protocol-violation","Invalid Geoparquet file. BoundingBox size must be 4 or 6.",{bbox:e})}}function E(e,t){const r=i(u(),c);for(const s of e){const e=I(s.file);if(!e)return null;const t=e.columns[e.primary_column];if(!t.bbox)return null;const o=O(t.bbox);f(r,o)}return{xmin:r[0],ymin:r[1],xmax:r[3],ymax:r[4],spatialReference:t}}export{b as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as o}from"tslib";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{subclass as
|
|
5
|
+
import{__decorate as o}from"tslib";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import s from"./DateTimeFieldFormat.js";import p from"./FieldFormat.js";import a from"./NumberFieldFormat.js";const m={base:p,key:"type",errorContext:"field-configuration-field-format",typeMap:{"date-time":s,number:a}};let l=class extends(r(t)){constructor(o){super(o),this.alias=null,this.name=void 0,this.fieldFormat=null}};o([e({type:String,json:{write:!0}})],l.prototype,"alias",void 0),o([e({type:String,nonNullable:!0,json:{write:{isRequired:!0}}})],l.prototype,"name",void 0),o([e({types:m,json:{write:!0}})],l.prototype,"fieldFormat",void 0),l=o([i("esri.layers.support.FieldConfiguration")],l);export{l as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{clone as
|
|
5
|
+
import{clone as e}from"../../core/lang.js";import t from"./DateTimeFieldFormat.js";import n from"./FieldConfiguration.js";import{isNumericField as r,isDateField as o,isDateOnlyField as a,isTimeOnlyField as i,isTimestampOffsetField as s,isFieldEditable as l}from"./fieldUtils.js";import u from"./NumberFieldFormat.js";import c from"../../popup/FieldInfo.js";import m from"../../popup/support/FieldInfoFormat.js";function f(e){const{popupTemplate:t,fieldsIndex:r}=e,o=t?.fieldInfos;if(!o?.length||!r)return;const a=[];for(const{fieldName:i,label:s,format:l}of o){const e=r.get(i);if(!e)continue;const t=s&&s!==e.alias?s:null,o=I(e)?l?d(l,e):j(e):null;(t||o)&&a.push(new n({name:e.name,alias:t,fieldFormat:o}))}return a.length?a:null}function d(e,t){if(I(t))switch(t.type){case"integer":case"small-integer":case"big-integer":case"long":return h(e);case"single":case"double":return g(e);case"date":case"timestamp-offset":return p(e);case"date-only":return y(e);case"time-only":return F(e)}}function h(e){return new u({useGrouping:e.digitSeparator?"always":"never"})}function g(e){const t=h(e);return null!=e.places&&(t.maximumFractionDigits=t.minimumFractionDigits=e.places),t}function p(e){return new t({dateStyle:w(e),year:$(e),month:S(e),timeStyle:x(e),hour12:b(e)})}function y(e){return new t({dateStyle:w(e),year:$(e),month:S(e)})}function F(e){return new t({timeStyle:x(e),hour12:b(e)})}function w(e){const{dateFormat:t}=e;return t?t.startsWith("short-date")?"short":t.startsWith("day-short-month-year")?"medium":t.startsWith("long-month-day-year")?"long":t.startsWith("long-date")?"full":null:null}function b(e){return e.dateFormat?.endsWith("-24")?"never":"always"}function S(e){switch(e.dateFormat){case"short-month-year":return"short";case"long-month-year":return"long";default:return null}}function x(e){const{dateFormat:t}=e;return t?t.includes("short-time")?"short":t.includes("long-time")?"medium":null:null}function $(e){switch(e.dateFormat){case"short-month-year":case"long-month-year":case"year":return"numeric";default:return null}}function D(e){const{fields:t}=e;if(!t?.length)return;const r=[];for(const o of t){const e=I(o)?j(o,{maximumFractionDigits:2}):null;e&&r.push(new n({name:o.name,fieldFormat:e}))}return r.length?r:null}function I(e){return r(e)||o(e)||a(e)||i(e)||s(e)}function j(e,n){if(!I(e))return;const r=n?.maximumFractionDigits??3;switch(e.type){case"integer":case"small-integer":case"big-integer":case"long":return new u({maximumFractionDigits:0,minimumFractionDigits:0});case"single":case"double":return new u({maximumFractionDigits:r,minimumFractionDigits:0});case"date":case"timestamp-offset":return new t({dateStyle:"short",timeStyle:"short"});case"date-only":return new t({dateStyle:"short"});case"time-only":return new t({timeStyle:"short"})}}function v(e,t){const{popupTemplate:n,fieldsIndex:r}=e;if(!n||!r)return;const o=W(e,t,n.fieldInfos);if(!o)return;const a=n.clone();return a.fieldInfos=o,a}function W(t,n,r){n??=[],r=r?e(r):[];let o=!1;const a=new Map;for(const e of n){const n=t.fieldsIndex.get(e.name);n&&a.set(n.name,e)}for(const e of r){const n=t.fieldsIndex.get(e.fieldName);if(!n)continue;const r=a.get(n.name);e.label=r?.alias||n.alias,e.format=I(n)&&r?.fieldFormat?T(r.fieldFormat,n):null,o=!0,a.delete(n.name)}for(const e of a.values()){const n=N(t,e);n&&(r.push(n),o=!0)}return o?r:null}function N(e,t){const{name:n,alias:r,fieldFormat:o}=t,a=e.fieldsIndex.get(n);if(!a||!r&&!o)return;const i=r||a.alias,s=I(a)&&o?T(o,a):null;return new c({fieldName:a.name,label:i,format:s,visible:!1,isEditable:l(a,e)})}function T(e,t){if(!I(t))return;const n="number"===e.type,r="date-time"===e.type;switch(t.type){case"integer":case"small-integer":case"big-integer":case"long":return n?G(e):null;case"single":case"double":return n?C(e):null;case"date":case"timestamp-offset":return r?E(e):null;case"date-only":return r?M(e):null;case"time-only":return r?U(e):null}}function G(e){return new m({digitSeparator:"never"!==e.useGrouping})}function C(e){const t=G(e);return t.places=e.maximumFractionDigits,t}function E(e){let t;const n=k(e),r=q(e),o="never"===e.hour12?"24":null,a="numeric"===e.year?"year":null,i=z(e);return n&&r&&o?t=`${n}-${r}-${o}`:n&&r?t=`${n}-${r}`:n?t=n:a&&i?t=`${i}-${a}`:a&&(t=a),t?new m({dateFormat:t}):null}function M(e){let t;const n=k(e),r="numeric"===e.year?"year":null,o=z(e);return n?t=n:r&&o?t=`${o}-${r}`:r&&(t=r),t?new m({dateFormat:t}):null}function U(e){let t;const n=q(e),r="never"===e.hour12?"24":null;return n&&r?t=`short-date-${n}-${r}`:n&&(t=`short-date-${n}`),t?new m({dateFormat:t}):null}function k(e){switch(e.dateStyle){case"short":return"short-date";case"medium":return"day-short-month-year";case"long":return"long-month-day-year";case"full":return"long-date";default:return}}function q(e){return e.timeStyle&&("short"===e.timeStyle?"short-time":"long-time")}function z(e){switch(e.month){case"short":return"short-month";case"long":return"long-month";default:return}}export{j as defaultFieldFormat,D as fieldConfigurationsFromFields,f as fieldConfigurationsFromPopupTemplate,d as fieldFormatFromFieldInfoFormat,T as fieldInfoFormatFromFieldFormat,I as isFormattableField,v as popupTemplateWithFieldConfigurations};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../request.js";import{clone as t}from"../../core/lang.js";import{throwIfAborted as
|
|
5
|
+
import e from"../../request.js";import{clone as t}from"../../core/lang.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{normalize as r,removeFile as l,getAppBaseUrl as s,removeTrailingSlash as n,addQueryParameters as i,isProtocolRelative as u,isAbsolute as c,join as a}from"../../core/urlUtils.js";import{wgs84 as f,webMercator as p}from"../../geometry/support/spatialReferenceUtils.js";import{geographicToWebMercator as y}from"../../geometry/support/webMercatorUtils.js";import m from"../../views/2d/engine/vectorTiles/style/VectorTileSource.js";async function d(e,t){const o={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[r,l]="string"==typeof e?[e,null]:[null,e.jsonUrl];await x(o,"esri",e,l,t);return{layerDefinition:o.validatedSource,url:r,serviceUrl:o.sourceUrl,style:o.style,styleUrl:o.styleUrl,spriteUrl:o.style?.sprite&&h(o.styleBase,o.style.sprite),spriteFormat:o.spriteFormat,glyphsUrl:o.style?.glyphs&&h(o.styleBase,o.style.glyphs),sourceNameToSource:o.sourceNameToSource,primarySourceName:o.primarySourceName}}function h(...e){let t;for(const o of e)if(null!=o)if(u(o)){if(t){const e=t.split("://")[0];t=e+":"+o.trim()}}else t=c(o)?o:a(t,o);return t?n(t):void 0}async function x(t,l,s,n,i){let u,c,a;if(o(i),"string"==typeof s){const t=r(s);a=await e(t,{...i,responseType:"json",query:{f:"json",...i?.query}}),a.ssl&&(u&&(u=u.replace(/^http:/i,"https:")),c&&(c=c.replace(/^http:/i,"https:"))),u=t,c=t}else null!=s&&(a={data:s},u=s.jsonUrl||null,c=n);const f=a?.data;if(g(f))return t.styleUrl=u||null,w(t,f,c,i);if(j(f))return t.sourceUrl?U(t,f,c,!1,l,i):(t.sourceUrl=u||null,S(f)&&(l="tilejson"),U(t,f,c,!0,l,i));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function S(e){return"object"==typeof e&&!!e&&"tilejson"in e&&null!=e.tilejson}function g(e){return!!e&&"sources"in e&&!!e.sources}function j(e){return!g(e)}async function w(e,t,o,r){const n=o?l(o):s();e.styleBase=n,e.style=t,t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const i=[];if(t.sources&&t.sources.esri){const o=t.sources.esri;o.url?await x(e,"esri",h(n,o.url),void 0,r):i.push(x(e,"esri",o,n,r))}for(const l of Object.keys(t.sources))"esri"!==l&&"tilejson"!==l&&"vector"===t.sources[l].type&&(t.sources[l].url?i.push(x(e,l,h(n,t.sources[l].url),void 0,r)):t.sources[l].tiles&&i.push(x(e,l,t.sources[l],n,r)));await Promise.all(i)}async function U(e,t,o,r,l,u){const c=o?n(o)+"/":s(),a=v(t),f=new m(l,i(c,u?.query??{}),a);if(!r&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(f))return;null!=f.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(f.fullExtent):t.fullExtent=f.fullExtent.clone()),t.tileInfo&&f.tileInfo&&t.tileInfo.lods.length<f.tileInfo.lods.length&&(t.tileInfo=f.tileInfo)}if(r&&(e.sourceBase=c,e.source=t,e.validatedSource=a,e.primarySourceName=l),e.sourceNameToSource[l]=f,!S(e)&&"defaultStyles"in t&&!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?x(e,"",h(c,t.defaultStyles,"root.json"),void 0,u):x(e,"",t.defaultStyles,h(c,"root.json"),u)}if(S(t)&&a.defaultStyles)return x(e,"",a.defaultStyles,h(c,"root.json"),u)}function v(e){const o=512;if(N(e)){const t=e?.tileInfo;return null!=t&&(null==t.rows&&(t.rows=o),null==t.cols&&(t.cols=o)),e}const r={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let l,s=null;if(S(e)){const{bounds:o,vector_layers:r}=e;if(o){const e=y({x:o[0],y:o[1],spatialReference:t(f)}),r=y({x:o[2],y:o[3],spatialReference:t(f)});s={xmin:e.x,ymin:e.y,xmax:r.x,ymax:r.y,spatialReference:t(p)}}r&&r.length>0&&(l={version:8,sprite:"",glyphs:"",sources:{tilejson:{type:"vector",url:e.tilejson}},layers:b(r)})}null===s&&(s=r);let n=78271.51696400007,i=295828763.7957775;const u=[],c=e.hasOwnProperty("maxzoom")&&null!=e.maxzoom?Math.abs(+e.maxzoom):22,a=0,m=0;for(let t=0;t<=c;t++)u.push({level:t,scale:i,resolution:n}),n/=2,i/=2;return{capabilities:"TilesOnly",initialExtent:s,fullExtent:r,minScale:a,maxScale:m,tiles:e.tiles,tileInfo:{rows:o,cols:o,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:u,spatialReference:t(p)},defaultStyles:l}}function N(e){return e.hasOwnProperty("tileInfo")}function b(e){const t=[];for(const o of e)o.geometry_type?t.push(E(o.geometry_type.toLowerCase(),o,!1)):(t.push(E("polygon",o,!0)),t.push(E("line",o,!0)),t.push(E("circle",o,!0)));return t}function E(e,t,o){const{id:r,minzoom:l,maxzoom:s}=t,n={type:"polygon"===e?"fill":"line"===e?"line":"circle",id:r,source:"tilejson","source-layer":r,minzoom:l,maxzoom:s};switch(e){case"polygon":case"fill":o&&(n.id+="_polygon",n.filter='(["==", "$type", "Polygon"])'),n.paint={"fill-color":"#808080"};break;case"line":o&&(n.id+="_line",n.filter='(["==", "$type", "LineString"])');break;case"circle":case"point":o&&(n.id+="_point",n.filter='(["==", "$type", "Point"])')}return n}export{d as loadMetadata};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "4.34.0-next.
|
|
3
|
+
"version": "4.34.0-next.87",
|
|
4
4
|
"homepage": "https://js.arcgis.com",
|
|
5
5
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
6
|
"keywords": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
],
|
|
19
19
|
"license": "SEE LICENSE IN copyright.txt",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcgis/toolkit": "^4.34.0-next.
|
|
21
|
+
"@arcgis/toolkit": "^4.34.0-next.133",
|
|
22
22
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
23
23
|
"@esri/calcite-components": "^3.3.0-next.95",
|
|
24
24
|
"@vaadin/grid": "~24.9.0",
|