123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- import {
- n as n2,
- o,
- t
- } from "./chunk-QPTNFAIA.js";
- import {
- a,
- s as s3
- } from "./chunk-6XX7OZ2W.js";
- import {
- i
- } from "./chunk-MQOWDNF7.js";
- import {
- u,
- y as y3
- } from "./chunk-ZOTXRPGC.js";
- import "./chunk-TVRLP2HY.js";
- import "./chunk-QQTL25WV.js";
- import "./chunk-J2PY6ANL.js";
- import "./chunk-MH3GGTFP.js";
- import "./chunk-2ZACOQZJ.js";
- import "./chunk-JBMHQ5RK.js";
- import "./chunk-WBWQJQK4.js";
- import "./chunk-DBT4KOKX.js";
- import "./chunk-2GP5D74I.js";
- import "./chunk-SCZJ2KEY.js";
- import "./chunk-EPMXCACW.js";
- import "./chunk-T2SKWJGU.js";
- import "./chunk-UO3LS2M5.js";
- import "./chunk-H2VOWDMO.js";
- import "./chunk-QISOH77W.js";
- import "./chunk-UWKVAZQ6.js";
- import "./chunk-3WXSWAUV.js";
- import "./chunk-27YO3FKC.js";
- import "./chunk-EQNT4A7P.js";
- import "./chunk-XO5VJRK4.js";
- import "./chunk-4OM3EX6P.js";
- import "./chunk-3OFVLRSL.js";
- import "./chunk-IQBIGNPU.js";
- import "./chunk-K7B6OWCU.js";
- import {
- r as r2
- } from "./chunk-BPRMPSTX.js";
- import {
- y as y2
- } from "./chunk-PQGNKUMB.js";
- import "./chunk-UDYHZLTE.js";
- import "./chunk-DGINNG7Z.js";
- import {
- h
- } from "./chunk-KK6FUQQU.js";
- import "./chunk-JQUWFKNU.js";
- import "./chunk-RWQH5X3O.js";
- import "./chunk-6334AFGG.js";
- import {
- e as e2
- } from "./chunk-TFHLTN6F.js";
- import "./chunk-4VZNS7N2.js";
- import "./chunk-O3JQY77G.js";
- import "./chunk-E3G7BRZB.js";
- import "./chunk-EDHROVWI.js";
- import "./chunk-3IRT3YKJ.js";
- import "./chunk-RDMCXRET.js";
- import "./chunk-PJNBFKPF.js";
- import "./chunk-C7742RNZ.js";
- import {
- l
- } from "./chunk-BWATQC2Y.js";
- import "./chunk-3WQOA5CB.js";
- import "./chunk-FZQZIM7U.js";
- import "./chunk-CZBRZ6SU.js";
- import "./chunk-VGWC3IKZ.js";
- import "./chunk-SWMSD4RP.js";
- import "./chunk-UKEN2UNL.js";
- import "./chunk-UVVU4UUO.js";
- import "./chunk-X4SA4ELJ.js";
- import "./chunk-PE24J2I5.js";
- import "./chunk-AUOH2VSO.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-4NQ74ZR6.js";
- import "./chunk-X4LLOW7U.js";
- import "./chunk-Z4JTBD7M.js";
- import "./chunk-MSBIHK67.js";
- import "./chunk-HZRKBTHJ.js";
- import "./chunk-CXCDYJ5R.js";
- import "./chunk-GAOW3WRZ.js";
- import {
- E as E2
- } from "./chunk-QCKFNSN2.js";
- import {
- e,
- n5 as n,
- y3 as y
- } from "./chunk-6SOHRC7T.js";
- import "./chunk-U2XHEJM7.js";
- import "./chunk-SQOPWYIT.js";
- import "./chunk-6KZ2LTDA.js";
- import {
- E,
- 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 {
- r
- } from "./chunk-YXWMMD76.js";
- import "./chunk-S5KM4IGW.js";
- // node_modules/@arcgis/core/views/layers/TileLayerView.js
- var i2 = (i3) => {
- let c = class extends i3 {
- async fetchPopupFeatures(e3, s4) {
- const { layer: a2 } = this;
- if (!e3)
- throw new s2("tilelayerview:fetchPopupFeatures", "Nothing to fetch without area", { layer: a2 });
- if ("tile" !== a2.type)
- throw new s2("tilelayerview:fetchPopupFeatures", "Layer type should be 'tile'", { type: a2.type });
- const i4 = this.get("view.scale"), c2 = a2.allSublayers.toArray().filter((e4) => {
- const r3 = 0 === e4.minScale || i4 <= e4.minScale, t2 = 0 === e4.maxScale || i4 >= e4.maxScale;
- return e4.popupTemplate && e4.popupEnabled && e4.visible && r3 && t2;
- });
- return E(c2.map(async (r3) => {
- const o2 = r3.createQuery(), a3 = r(s4) ? s4.event : null, i5 = s3({ renderer: r3.renderer, event: a3 });
- o2.geometry = this.createFetchPopupFeaturesQueryGeometry(e3, i5), o2.outFields = await r3.popupTemplate.getRequiredFields();
- return (await r3.queryFeatures(o2)).features;
- })).then((e4) => [].concat(...e4.map((e5) => e5.value).filter(Boolean)));
- }
- };
- return e([y()], c.prototype, "layer", void 0), c = e([n("esri.layers.mixins.TileLayerView")], c), c;
- };
- // node_modules/@arcgis/core/views/2d/layers/TileLayerView2D.js
- var _ = [0, 0];
- var I = class extends i2(i(t(y3(u)))) {
- constructor() {
- super(...arguments), this._tileStrategy = null, this._fetchQueue = null, this.layer = null;
- }
- get resampling() {
- return !("resampling" in this.layer) || false !== this.layer.resampling;
- }
- update(e3) {
- this._fetchQueue.pause(), this._fetchQueue.state = e3.state, this._tileStrategy.update(e3), this._fetchQueue.resume();
- }
- attach() {
- const e3 = "tileServers" in this.layer ? this.layer.tileServers : null;
- this._tileInfoView = new h(this.layer.tileInfo, this.layer.fullExtent), this._fetchQueue = new y2({ tileInfoView: this._tileInfoView, concurrency: e3 && 10 * e3.length || 10, process: (e4, t2) => this.fetchTile(e4, t2) }), this._tileStrategy = new r2({ cachePolicy: "keep", resampling: this.resampling, acquireTile: (e4) => this.acquireTile(e4), releaseTile: (e4) => this.releaseTile(e4), tileInfoView: this._tileInfoView }), this.requestUpdate(), this.handles.add(l(() => this.resampling, () => {
- this.doRefresh();
- })), super.attach();
- }
- detach() {
- super.detach(), this._tileStrategy.destroy(), this._fetchQueue.clear(), this.container.removeAllChildren(), this._fetchQueue = this._tileStrategy = this._tileInfoView = null;
- }
- moveStart() {
- this.requestUpdate();
- }
- viewChange() {
- this.requestUpdate();
- }
- moveEnd() {
- this.requestUpdate();
- }
- supportsSpatialReference(e3) {
- var _a;
- return E2((_a = this.layer.tileInfo) == null ? void 0 : _a.spatialReference, e3);
- }
- createFetchPopupFeaturesQueryGeometry(e3, t2) {
- return a(e3, t2, this.view);
- }
- async doRefresh() {
- !this.attached || this.updateRequested || this.suspended || (this._fetchQueue.reset(), this._tileStrategy.tiles.forEach((e3) => this._enqueueTileFetch(e3)));
- }
- isUpdating() {
- var _a, _b;
- return (_b = (_a = this._fetchQueue) == null ? void 0 : _a.updating) != null ? _b : false;
- }
- acquireTile(e3) {
- const t2 = this._bitmapView.createTile(e3), i3 = t2.bitmap;
- return [i3.x, i3.y] = this._tileInfoView.getTileCoords(_, t2.key), i3.resolution = this._tileInfoView.getTileResolution(t2.key), [i3.width, i3.height] = this._tileInfoView.tileInfo.size, this._enqueueTileFetch(t2), this._bitmapView.addChild(t2), this.requestUpdate(), t2;
- }
- releaseTile(e3) {
- this._fetchQueue.abort(e3.key.id), this._bitmapView.removeChild(e3), e3.once("detach", () => e3.destroy()), this.requestUpdate();
- }
- async fetchTile(e3, t2 = {}) {
- const s4 = "tilemapCache" in this.layer ? this.layer.tilemapCache : null, { signal: r3, resamplingLevel: a2 = 0 } = t2;
- if (!s4)
- try {
- return await this._fetchImage(e3, r3);
- } catch (h2) {
- if (!j(h2) && !this.resampling)
- return o(this._tileInfoView.tileInfo.size);
- if (a2 < 3) {
- const i3 = this._tileInfoView.getTileParentId(e3.id);
- if (i3) {
- const s5 = new e2(i3), r4 = await this.fetchTile(s5, { ...t2, resamplingLevel: a2 + 1 });
- return n2(this._tileInfoView, r4, s5, e3);
- }
- }
- throw h2;
- }
- const l2 = new e2(0, 0, 0, 0);
- let o2;
- try {
- if (await s4.fetchAvailabilityUpsample(e3.level, e3.row, e3.col, l2, { signal: r3 }), l2.level !== e3.level && !this.resampling)
- return o(this._tileInfoView.tileInfo.size);
- o2 = await this._fetchImage(l2, r3);
- } catch (h2) {
- if (j(h2))
- throw h2;
- o2 = await this._fetchImage(e3, r3);
- }
- return this.resampling ? n2(this._tileInfoView, o2, l2, e3) : o2;
- }
- async _enqueueTileFetch(e3) {
- if (!this._fetchQueue.has(e3.key.id)) {
- try {
- const t2 = await this._fetchQueue.push(e3.key);
- e3.bitmap.source = t2, e3.bitmap.width = this._tileInfoView.tileInfo.size[0], e3.bitmap.height = this._tileInfoView.tileInfo.size[1], e3.once("attach", () => this.requestUpdate());
- } catch (s4) {
- j(s4) || s.getLogger(this.declaredClass).error(s4);
- }
- this.requestUpdate();
- }
- }
- async _fetchImage(e3, t2) {
- return this.layer.fetchImageBitmapTile(e3.level, e3.row, e3.col, { signal: t2 });
- }
- };
- e([y()], I.prototype, "_fetchQueue", void 0), e([y()], I.prototype, "resampling", null), I = e([n("esri.views.2d.layers.TileLayerView2D")], I);
- var V = I;
- export {
- V as default
- };
- //# sourceMappingURL=TileLayerView2D-57S53H76.js.map
|