123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- import {
- K
- } from "./chunk-AWZOCTJV.js";
- import "./chunk-YINMVLPI.js";
- import {
- I,
- T
- } from "./chunk-2H3JYQ2D.js";
- import {
- m
- } from "./chunk-5I3CETHK.js";
- import {
- u
- } from "./chunk-5X5UDWFV.js";
- import {
- Y
- } from "./chunk-3EZOER4E.js";
- import "./chunk-XCIRV7CO.js";
- import "./chunk-DMVKVC5I.js";
- import "./chunk-EL3V6S4N.js";
- import "./chunk-NFN2M2QU.js";
- import {
- f as f2,
- g
- } from "./chunk-3ZJXLJLL.js";
- import "./chunk-OP2HNSVZ.js";
- import "./chunk-4GGDRIJK.js";
- import "./chunk-MZG75XMA.js";
- import "./chunk-REMBDESU.js";
- import "./chunk-CKZZYAPN.js";
- import "./chunk-AFVJXEUJ.js";
- import "./chunk-FZSI6IGI.js";
- import "./chunk-SJGY5U4Q.js";
- import "./chunk-27XWQUQA.js";
- import "./chunk-NX2NCBAF.js";
- import {
- nt,
- rt
- } from "./chunk-4VZNS7N2.js";
- import "./chunk-IIAN3QNN.js";
- import "./chunk-VYQHMPYW.js";
- import "./chunk-WXUHXYJK.js";
- import "./chunk-NTERQTPO.js";
- import "./chunk-EDHROVWI.js";
- import "./chunk-3IRT3YKJ.js";
- import "./chunk-SOSOZIX6.js";
- import {
- r as r2
- } from "./chunk-DAWQAVQO.js";
- import "./chunk-73AMYZFU.js";
- import "./chunk-NKMX5M3L.js";
- import "./chunk-MGUVQY3Q.js";
- import "./chunk-QEWF7QPH.js";
- import "./chunk-SQ2SY4BX.js";
- import "./chunk-VLG7MMVR.js";
- import "./chunk-BWATQC2Y.js";
- import "./chunk-47NSA4T4.js";
- import "./chunk-FUODOQDM.js";
- import "./chunk-CZBRZ6SU.js";
- import "./chunk-VGWC3IKZ.js";
- import "./chunk-SWMSD4RP.js";
- import "./chunk-UKEN2UNL.js";
- import "./chunk-X4SA4ELJ.js";
- import "./chunk-XJCUT65M.js";
- import {
- j as j2
- } from "./chunk-PIFOHNWC.js";
- import "./chunk-ZLNEXZAN.js";
- import "./chunk-ZYRIJWLX.js";
- import "./chunk-RYY6632W.js";
- import "./chunk-DW42UVIT.js";
- import "./chunk-TJNOJH33.js";
- import "./chunk-YAEIHDJH.js";
- import "./chunk-OSHI574D.js";
- import "./chunk-44GMIOGP.js";
- import "./chunk-75U5LM2V.js";
- import "./chunk-ZHRAUKVQ.js";
- import "./chunk-RZK6A2GY.js";
- import "./chunk-X4LLOW7U.js";
- import "./chunk-Z4JTBD7M.js";
- import "./chunk-HZRKBTHJ.js";
- import "./chunk-5DMBXPN2.js";
- import "./chunk-QANZ6BFY.js";
- import "./chunk-VEGAOVMY.js";
- import "./chunk-CXCDYJ5R.js";
- import "./chunk-GAOW3WRZ.js";
- import {
- E,
- c
- } from "./chunk-QCKFNSN2.js";
- import "./chunk-6SOHRC7T.js";
- import "./chunk-U2XHEJM7.js";
- import "./chunk-SQOPWYIT.js";
- import "./chunk-6KZ2LTDA.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-RELD7J6F.js.map
|