123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- import {
- K
- } from "./chunk-DVYEME2A.js";
- import "./chunk-YINMVLPI.js";
- import {
- I,
- T
- } from "./chunk-JK76NUHI.js";
- import {
- m
- } from "./chunk-QR6V6X5R.js";
- import {
- u
- } from "./chunk-RDOYANC4.js";
- import {
- Y
- } from "./chunk-FSIQKOJP.js";
- import "./chunk-OQSZOHTF.js";
- import "./chunk-OP2HNSVZ.js";
- import "./chunk-UVQJ7AVD.js";
- import "./chunk-DMVKVC5I.js";
- import "./chunk-Y7BZ6TKQ.js";
- import {
- f as f2,
- g
- } from "./chunk-VEJPYAE4.js";
- import "./chunk-4GGDRIJK.js";
- import "./chunk-D5UVUJIX.js";
- import "./chunk-PZ7XDUL6.js";
- import "./chunk-ULSPZIPE.js";
- import "./chunk-UMUHMVL4.js";
- import "./chunk-FZSI6IGI.js";
- import "./chunk-B5O7N7PM.js";
- import "./chunk-KOKTANE6.js";
- import "./chunk-OKUFE7TO.js";
- import {
- nt,
- rt
- } from "./chunk-JKFWEHNK.js";
- import "./chunk-IIAN3QNN.js";
- import "./chunk-P24XEEHY.js";
- import "./chunk-WOXHUQGM.js";
- import "./chunk-FMPQIGFA.js";
- import "./chunk-EDHROVWI.js";
- import "./chunk-3IRT3YKJ.js";
- import "./chunk-SAJAEMIJ.js";
- import {
- r as r2
- } from "./chunk-JLSNMUQJ.js";
- import "./chunk-ECY35CJI.js";
- import "./chunk-PT62335L.js";
- import "./chunk-JGBXYDGB.js";
- import "./chunk-QEWF7QPH.js";
- import "./chunk-FNA5GLRW.js";
- import "./chunk-MCWCB5IY.js";
- import "./chunk-TJV6ODRM.js";
- import "./chunk-CRGY2SDS.js";
- import "./chunk-4T5ZGMEN.js";
- import "./chunk-CZBRZ6SU.js";
- import "./chunk-VGWC3IKZ.js";
- import "./chunk-2H5MD622.js";
- import "./chunk-3RSFVUKZ.js";
- import "./chunk-X4SA4ELJ.js";
- import "./chunk-5N7JLUJJ.js";
- import {
- j as j2
- } from "./chunk-2ZSOO377.js";
- import "./chunk-ZLNEXZAN.js";
- import "./chunk-ZYRIJWLX.js";
- import "./chunk-RYY6632W.js";
- import "./chunk-DW42UVIT.js";
- import "./chunk-YAEIHDJH.js";
- import "./chunk-TJNOJH33.js";
- import "./chunk-OSHI574D.js";
- import "./chunk-ETGAZ7LF.js";
- import "./chunk-75U5LM2V.js";
- import "./chunk-RMDDCMKS.js";
- import "./chunk-VCH45Q2I.js";
- import "./chunk-GSSTTHIT.js";
- import "./chunk-IM3LVQXV.js";
- import "./chunk-HZRKBTHJ.js";
- import "./chunk-DVUG3KID.js";
- import "./chunk-FWSQEIAR.js";
- import "./chunk-VEGAOVMY.js";
- import "./chunk-6T6G6LCQ.js";
- import "./chunk-YEJL5NEF.js";
- import {
- E,
- c
- } from "./chunk-PQFTYGF5.js";
- import "./chunk-2Z2TG5CU.js";
- import "./chunk-6KZ2LTDA.js";
- import "./chunk-U2XHEJM7.js";
- import "./chunk-SQOPWYIT.js";
- import {
- f,
- j
- } from "./chunk-V6P2MAQQ.js";
- import {
- s2 as s,
- s3 as s2
- } from "./chunk-E5O6P5I2.js";
- import "./chunk-SPWQ3AWG.js";
- import "./chunk-2TIUKVZN.js";
- import {
- e,
- r
- } from "./chunk-YXWMMD76.js";
- import "./chunk-S5KM4IGW.js";
- // node_modules/@arcgis/core/layers/graphics/sources/WFSSourceWorker.js
- var E2 = class {
- constructor() {
- this._queryEngine = null, this._customParameters = null, this._snapshotFeatures = async (e2) => {
- var _a;
- const { objectIdField: t } = this._queryEngine, r3 = await K((_a = this._getFeatureUrl) != null ? _a : "", this._featureType.typeName, this._getFeatureOutputFormat, { customParameters: this._customParameters, dateFields: this._queryEngine.fieldsIndex.dateFields.map((e3) => e3.name), signal: e2 });
- await T(r3), f(e2);
- const a = I(r3, { geometryType: this._queryEngine.geometryType, hasZ: false, objectIdField: t });
- if (!E(this._queryEngine.spatialReference, c))
- for (const i of a)
- r(i.geometry) && (i.geometry = nt(g(rt(i.geometry, this._queryEngine.geometryType, false, false), c, this._queryEngine.spatialReference)));
- let o = 1;
- for (const s3 of a) {
- const e3 = {};
- m(this._fieldsIndex, e3, s3.attributes, true), s3.attributes = e3, null == s3.attributes[t] && (s3.objectId = s3.attributes[t] = o++);
- }
- return a;
- };
- }
- destroy() {
- var _a;
- (_a = this._queryEngine) == null ? void 0 : _a.destroy(), this._queryEngine = null;
- }
- async load(e2, t) {
- const { getFeatureUrl: r3, getFeatureOutputFormat: s3, spatialReference: o, fields: n, geometryType: u2, featureType: p, objectIdField: h, customParameters: c2 } = e2;
- this._featureType = p, this._customParameters = c2, this._getFeatureUrl = r3, this._getFeatureOutputFormat = s3, this._fieldsIndex = new r2(n), await this._checkProjection(o), f(t), this._queryEngine = new Y({ fields: n, geometryType: u2, hasM: false, hasZ: false, objectIdField: h, spatialReference: o, timeInfo: null, featureStore: new u({ geometryType: u2, hasM: false, hasZ: false }) });
- const m2 = await this._snapshotFeatures(e(t.signal));
- return this._queryEngine.featureStore.addMany(m2), { extent: this._queryEngine.fullExtent };
- }
- async applyEdits() {
- throw new s2("wfs-source:editing-not-supported", "applyEdits() is not supported on WFSLayer");
- }
- async queryFeatures(e2 = {}, t = {}) {
- return await this._waitSnapshotComplete(), this._queryEngine.executeQuery(e2, t.signal);
- }
- async queryFeatureCount(e2 = {}, t = {}) {
- return await this._waitSnapshotComplete(), this._queryEngine.executeQueryForCount(e2, t.signal);
- }
- async queryObjectIds(e2 = {}, t = {}) {
- return await this._waitSnapshotComplete(), this._queryEngine.executeQueryForIds(e2, t.signal);
- }
- async queryExtent(e2 = {}, t = {}) {
- return await this._waitSnapshotComplete(), this._queryEngine.executeQueryForExtent(e2, t.signal);
- }
- async querySnapping(e2, t = {}) {
- return await this._waitSnapshotComplete(), this._queryEngine.executeQueryForSnapping(e2, t.signal);
- }
- async refresh(s3) {
- var _a;
- return this._customParameters = s3, (_a = this._snapshotTask) == null ? void 0 : _a.abort(), this._snapshotTask = j2(this._snapshotFeatures), this._snapshotTask.promise.then((e2) => {
- this._queryEngine.featureStore.clear(), e2 && this._queryEngine.featureStore.addMany(e2);
- }, (e2) => {
- this._queryEngine.featureStore.clear(), j(e2) || s.getLogger("esri.layers.WFSLayer").error(new s2("wfs-layer:getfeature-error", "An error occurred during the GetFeature request", { error: e2 }));
- }), await this._waitSnapshotComplete(), { extent: this._queryEngine.fullExtent };
- }
- async _waitSnapshotComplete() {
- if (this._snapshotTask && !this._snapshotTask.finished) {
- try {
- await this._snapshotTask.promise;
- } catch {
- }
- return this._waitSnapshotComplete();
- }
- }
- async _checkProjection(e2) {
- try {
- await f2(c, e2);
- } catch {
- throw new s2("unsupported-projection", "Projection not supported", { spatialReference: e2 });
- }
- }
- };
- export {
- E2 as default
- };
- //# sourceMappingURL=WFSSourceWorker-KUOZZVB5.js.map
|