HeatmapProcessor-ZTNOMUTP.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. import {
  2. p
  3. } from "./chunk-BXIBTNXI.js";
  4. import {
  5. l as l2
  6. } from "./chunk-5NM43FFO.js";
  7. import {
  8. o as o2
  9. } from "./chunk-WFSV2B2I.js";
  10. import "./chunk-H6ETEALK.js";
  11. import "./chunk-FIYKFRB2.js";
  12. import {
  13. m
  14. } from "./chunk-LY74KTXV.js";
  15. import "./chunk-EWE6EXPY.js";
  16. import {
  17. l
  18. } from "./chunk-XLV7RUSE.js";
  19. import "./chunk-NTUXR253.js";
  20. import "./chunk-RMX2AZ4P.js";
  21. import "./chunk-NE3ESGA6.js";
  22. import "./chunk-YIS6BAC3.js";
  23. import "./chunk-N2663GRX.js";
  24. import "./chunk-WEMIK25H.js";
  25. import "./chunk-UXF37FQ4.js";
  26. import "./chunk-ZOEK6QHJ.js";
  27. import "./chunk-XNLG7T2T.js";
  28. import "./chunk-IR4PV7VK.js";
  29. import "./chunk-2Z6LERTI.js";
  30. import "./chunk-OWVBLVP3.js";
  31. import "./chunk-ALDCDSPV.js";
  32. import "./chunk-DT6EAZQ5.js";
  33. import "./chunk-HNOZUNJ4.js";
  34. import "./chunk-PDKDCAAD.js";
  35. import "./chunk-ECW2QABR.js";
  36. import "./chunk-GCDJLKH4.js";
  37. import "./chunk-MRJEICT6.js";
  38. import {
  39. e,
  40. n2 as n
  41. } from "./chunk-Y3WMVFTW.js";
  42. import "./chunk-SAS7RONY.js";
  43. import "./chunk-WSRBH7BF.js";
  44. import "./chunk-IHXECKQQ.js";
  45. import "./chunk-ULGDPLM2.js";
  46. import "./chunk-EMJ4ZSM2.js";
  47. import "./chunk-IKP3YN53.js";
  48. import {
  49. o,
  50. r
  51. } from "./chunk-GZT4BVFP.js";
  52. import "./chunk-A5ICIBVI.js";
  53. // node_modules/@arcgis/core/views/2d/layers/features/processors/HeatmapProcessor.js
  54. var p2 = class {
  55. constructor(e2, t) {
  56. this.offset = e2, this.extent = t;
  57. }
  58. };
  59. function c(e2) {
  60. const t = e2.key, s = new Map(), r2 = 256, i = o2, o3 = e2.tileInfoView.tileInfo.isWrappable;
  61. return s.set(l2(t, -1, -1, o3).id, new p2([-i, -i], [i - r2, i - r2, i, i])), s.set(l2(t, 0, -1, o3).id, new p2([0, -i], [0, i - r2, i, i])), s.set(l2(t, 1, -1, o3).id, new p2([i, -i], [0, i - r2, r2, i])), s.set(l2(t, -1, 0, o3).id, new p2([-i, 0], [i - r2, 0, i, i])), s.set(l2(t, 1, 0, o3).id, new p2([i, 0], [0, 0, r2, i])), s.set(l2(t, -1, 1, o3).id, new p2([-i, i], [i - r2, 0, i, r2])), s.set(l2(t, 0, 1, o3).id, new p2([0, i], [0, 0, i, r2])), s.set(l2(t, 1, 1, o3).id, new p2([i, i], [0, 0, r2, r2])), s;
  62. }
  63. var l3 = class extends p {
  64. constructor() {
  65. super(...arguments), this.type = "heatmap", this._tileKeyToFeatureSets = new Map();
  66. }
  67. initialize() {
  68. this.handles.add([this.tileStore.on("update", this.onTileUpdate.bind(this))]);
  69. }
  70. async update(e2, t) {
  71. const s = t.schema.processors[0];
  72. if (s.type !== "heatmap")
  73. return;
  74. m(this._schema, s) && (e2.mesh = true, this._schema = s);
  75. }
  76. onTileUpdate(e2) {
  77. for (const t of e2.removed)
  78. this._tileKeyToFeatureSets.delete(t.key.id);
  79. }
  80. onTileClear(e2) {
  81. const t = { clear: true };
  82. return this._tileKeyToFeatureSets.delete(e2.key.id), this.remoteClient.invoke("tileRenderer.onTileData", { tileKey: e2.id, data: t });
  83. }
  84. async onTileMessage(e2, r2, i) {
  85. this._tileKeyToFeatureSets.has(e2.key.id) || this._tileKeyToFeatureSets.set(e2.key.id, new Map());
  86. const a = this._tileKeyToFeatureSets.get(e2.key.id);
  87. if (r(r2.addOrUpdate) && r2.addOrUpdate.hasFeatures && a.set(r2.addOrUpdate.instance, r2), r2.end) {
  88. const t = [], r3 = c(e2);
  89. this._tileKeyToFeatureSets.forEach((i2, o3) => {
  90. if (o3 === e2.key.id)
  91. i2.forEach((e3) => o(e3.addOrUpdate, (e4) => t.push(e4)));
  92. else if (r3.has(o3)) {
  93. const e3 = r3.get(o3), [a3, n3] = e3.offset;
  94. i2.forEach((e4) => o(e4.addOrUpdate, (e5) => {
  95. const s = e5.transform(a3, n3, 1, 1);
  96. t.push(s);
  97. }));
  98. }
  99. });
  100. const a2 = l(t, this._schema.mesh, 512, 512), n2 = { tileKey: e2.key.id, intensityInfo: a2 }, d = [a2.matrix];
  101. return this.remoteClient.invoke("tileRenderer.onTileData", n2, { ...i, transferList: d });
  102. }
  103. }
  104. onTileError(e2, t, s) {
  105. return this.remoteClient.invoke("tileRenderer.onTileError", { tileKey: e2.id, error: t }, s);
  106. }
  107. };
  108. l3 = e([n("esri.views.2d.layers.features.processors.HeatmapProcessor")], l3);
  109. var h = l3;
  110. export {
  111. h as default
  112. };
  113. //# sourceMappingURL=HeatmapProcessor-ZTNOMUTP.js.map