@naivemap/maplibre-gl-echarts-layer 0.0.1-alpha.0 → 0.0.1-alpha.1

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.
Files changed (3) hide show
  1. package/README.md +17 -0
  2. package/dist/index.js +96 -96
  3. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @naivemap/maplibre-gl-echarts-layer
2
+
3
+ ## Install
4
+
5
+ ```bash
6
+ pnpm add @naivemap/maplibre-gl-echarts-layer echarts
7
+ ```
8
+
9
+ ## Example
10
+
11
+ ```ts
12
+ // echart option
13
+ const option = {...}
14
+ const layer = new EChartsLayer('layer-id', option)
15
+
16
+ map.addLayer(layer)
17
+ ```
package/dist/index.js CHANGED
@@ -1,153 +1,153 @@
1
1
  import { getCoordinateSystemDimensions as p, registerCoordinateSystem as m, init as l } from "echarts";
2
- const c = r;
3
- function r(a, t) {
4
- const x = o();
5
- return r = function(e, n) {
6
- return e = e - 241, x[e];
7
- }, r(a, t);
2
+ function o(i, e) {
3
+ const x = h();
4
+ return o = function(t, n) {
5
+ return t = t - 346, x[t];
6
+ }, o(i, e);
8
7
  }
9
- (function(a, t) {
10
- const x = { _0x23e5d9: 290, _0x3f1620: 293, _0x216574: 254, _0x4f9397: 266, _0x322c37: 271 }, e = r, n = a();
8
+ const c = o;
9
+ (function(i, e) {
10
+ const x = { _0x2e5c71: 383, _0x30b827: 393, _0x3b4ac7: 365, _0x41275b: 377, _0x1e6c24: 346 }, t = o, n = i();
11
11
  for (; ; )
12
12
  try {
13
- if (-parseInt(e(265)) / 1 + parseInt(e(x._0x23e5d9)) / 2 + parseInt(e(275)) / 3 * (-parseInt(e(282)) / 4) + parseInt(e(246)) / 5 + parseInt(e(x._0x3f1620)) / 6 + parseInt(e(x._0x216574)) / 7 * (parseInt(e(x._0x4f9397)) / 8) + parseInt(e(x._0x322c37)) / 9 * (parseInt(e(278)) / 10) === t) break;
13
+ if (parseInt(t(402)) / 1 + parseInt(t(353)) / 2 * (-parseInt(t(371)) / 3) + parseInt(t(x._0x2e5c71)) / 4 * (parseInt(t(394)) / 5) + -parseInt(t(x._0x30b827)) / 6 * (parseInt(t(403)) / 7) + parseInt(t(355)) / 8 * (parseInt(t(x._0x3b4ac7)) / 9) + parseInt(t(410)) / 10 * (parseInt(t(x._0x41275b)) / 11) + -parseInt(t(x._0x1e6c24)) / 12 * (parseInt(t(400)) / 13) === e) break;
14
14
  n.push(n.shift());
15
15
  } catch {
16
16
  n.push(n.shift());
17
17
  }
18
- })(o, 141456);
18
+ })(h, 577500);
19
+ function h() {
20
+ const i = ["uEHgE", "(((.+)+)+)+$", "getCanvas", "26mUZDso", "random", "2752mbIxtN", "length", "onRemove", "dataToPoint", "_map", "render", "parentNode", "incsz", "div", "_mapOffset", "23247YTyNHN", "ylBro", "Eljwh", "_ecOption", "_prepareECharts", "pmKng", "256191erFYPh", "get", "constructor", "_coordSystemName", "VdSVD", "appendChild", "143NnVfvz", "setOption", "height", "dispose", "substring", "toString", "4dLjNtZ", "width", "_removeLayerContainer", "series", "type", "search", "ITpRI", "onAdd", "pointToData", "createElement", "1692AzhSOF", "1602070RUaKEm", "_container", "split", "renderingMode", "style", "coordinateSystem", "7330479HkWCGt", "1|0|2|3|4", "937112yIlSEf", "20356VyGdFU", "EKJcn", "maplibregl-echarts", "YghOA", "eachSeries", "WGsSg", "SoAKe", "711940eoYUZQ", "_ec", "_createLayerContainer", "dimensions", "VVWtU", "getCanvasContainer", "12qmQera", "oLIhR", "dPKPP", "isMoving"];
21
+ return h = function() {
22
+ return i;
23
+ }, h();
24
+ }
19
25
  const u = /* @__PURE__ */ function() {
20
- let a = !0;
21
- return function(t, x) {
22
- const e = a ? function() {
26
+ let i = !0;
27
+ return function(e, x) {
28
+ const t = i ? function() {
23
29
  if (x) {
24
- const n = x.apply(t, arguments);
30
+ const n = x.apply(e, arguments);
25
31
  return x = null, n;
26
32
  }
27
33
  } : function() {
28
34
  };
29
- return a = !1, e;
35
+ return i = !1, t;
30
36
  };
31
- }(), h = u(void 0, function() {
32
- const a = { _0x2f699e: 294, _0xf5535b: 281 }, t = r, x = { Crzqp: t(242) };
33
- return h[t(294)]().search(x[t(280)])[t(a._0x2f699e)]()[t(a._0xf5535b)](h).search(x[t(280)]);
37
+ }(), d = u(void 0, function() {
38
+ const i = { _0x5c3091: 382, _0x131897: 388, _0x1de181: 406, _0x1dcf47: 373 }, e = o, x = { YghOA: e(351) };
39
+ return d[e(i._0x5c3091)]()[e(i._0x131897)](x[e(i._0x1de181)]).toString()[e(i._0x1dcf47)](d).search(x[e(406)]);
34
40
  });
35
- function o() {
36
- const a = ["onAdd", "1|0|2|4|3", "270006AooCIv", "toString", "_prepareECharts", "kNQZd", "resize", "_mapOffset", "setOption", "(((.+)+)+)+$", "renderingMode", "create", "eachSeries", "494140zRsDub", "unproject", "lng", "coordinateSystem", "getCanvas", "Hikti", "_map", "hlTTY", "21yCLBFm", "removeChild", "Uagfb", "BmDKL", "style", "split", "_ecOption", "div", "custom", "height", "_removeLayerContainer", "187012MTkkdf", "182128XyDEma", "length", "_container", "_createLayerContainer", "width", "54DSmZWC", "get", "fNkHe", "getCanvasContainer", "3sdMMDH", "render", "_ec", "237310VduYSB", "DGeVJ", "Crzqp", "constructor", "874024kAIvQJ", "type", "Pdajs", "clear", "pYMfU", "yBoJj", "_coordSystemName", "UyIOi", "384922mxbSqV"];
37
- return o = function() {
38
- return a;
39
- }, o();
40
- }
41
- h();
42
- const y = "maplibregl-echarts";
43
- class d {
41
+ d();
42
+ const g = c(405);
43
+ class f {
44
44
  id;
45
- dimensions = ["x", "y"];
46
- [c(252)];
45
+ [c(413)] = ["x", "y"];
46
+ _map;
47
47
  _mapOffset = [0, 0];
48
- constructor(t, x) {
49
- this.id = t, this._map = x;
48
+ constructor(e, x) {
49
+ const t = { _0x382a02: 359 }, n = c;
50
+ this.id = e, this[n(t._0x382a02)] = x;
50
51
  }
51
- [c(244)](t) {
52
- const x = { _0xd7c942: 245 }, e = { _0x2e9752: 284, _0x29f7e6: 272 }, n = c, _ = { Pdajs: function(s, i) {
53
- return s === i;
54
- }, Hikti: n(249) };
55
- t[n(x._0xd7c942)]((s) => {
56
- const i = n;
57
- _[i(e._0x2e9752)](s[i(e._0x29f7e6)](_[i(251)]), this.id) && (s[i(249)] = new d(this.id, this._map));
52
+ create(e) {
53
+ const x = { _0x3c8ada: 407 }, t = { _0x1aacee: 347 }, n = c, _ = { oLIhR: function(s, a) {
54
+ return s === a;
55
+ }, ITpRI: n(399) };
56
+ e[n(x._0x3c8ada)]((s) => {
57
+ const a = n;
58
+ _[a(t._0x1aacee)](s[a(372)](_[a(389)]), this.id) && (s.coordinateSystem = new f(this.id, this._map));
58
59
  });
59
60
  }
60
- dataToPoint(t) {
61
- const x = { _0xcf3b8a: 289 }, e = c, n = { UyIOi: function(i, f) {
62
- return i - f;
63
- } }, _ = this[e(252)].project(t), s = this._mapOffset;
64
- return [n[e(x._0xcf3b8a)](_.x, s[0]), n.UyIOi(_.y, s[1])];
61
+ [c(358)](e) {
62
+ const x = { _0x5e1c59: 409 }, t = c, n = { SoAKe: function(a, r) {
63
+ return a - r;
64
+ } }, _ = this[t(359)].project(e), s = this[t(364)];
65
+ return [n[t(x._0x5e1c59)](_.x, s[0]), n[t(409)](_.y, s[1])];
65
66
  }
66
- pointToData(t) {
67
- const x = { _0x35cabb: 273 }, e = c, n = { fNkHe: function(i, f) {
68
- return i + f;
69
- } }, _ = this[e(298)], s = this[e(252)][e(247)]([n[e(273)](t[0], _[0]), n[e(x._0x35cabb)](t[1], _[1])]);
70
- return [s[e(248)], s.lat];
67
+ [c(391)](e) {
68
+ const x = { _0x39ecbb: 364, _0x588e00: 350 }, t = c, n = { uEHgE: function(a, r) {
69
+ return a + r;
70
+ } }, _ = this[t(x._0x39ecbb)], s = this._map.unproject([n[t(350)](e[0], _[0]), n[t(x._0x588e00)](e[1], _[1])]);
71
+ return [s.lng, s.lat];
71
72
  }
72
73
  }
73
- class C {
74
+ class y {
74
75
  id;
75
- [c(283)];
76
- renderingMode;
77
- [c(268)];
78
- [c(252)];
79
- _ec;
80
- _coordSystemName;
81
- [c(260)];
82
- constructor(t, x) {
83
- const e = { _0x290523: 262, _0x3a5717: 259, _0x3123dd: 283, _0x17418b: 257, _0x207349: 279 }, n = c, _ = { yBoJj: n(292), BmDKL: n(e._0x290523), DGeVJ: function(f, b) {
84
- return f + b;
85
- } }, s = _[n(287)][n(e._0x3a5717)]("|");
86
- let i = 0;
76
+ [c(387)];
77
+ [c(397)];
78
+ _container;
79
+ [c(359)];
80
+ [c(411)];
81
+ [c(374)];
82
+ _ecOption;
83
+ constructor(e, x) {
84
+ const t = { _0x5f3849: 370, _0x560a03: 387, _0x28548c: 414, _0x3b7370: 348, _0x4f0ab7: 382, _0x1cfdf6: 381 }, n = c, _ = { pmKng: n(401), VVWtU: "custom", dPKPP: function(r, b) {
85
+ return r + b;
86
+ } }, s = _[n(t._0x5f3849)][n(396)]("|");
87
+ let a = 0;
87
88
  for (; ; ) {
88
- switch (s[i++]) {
89
+ switch (s[a++]) {
89
90
  case "0":
90
- this[n(e._0x3123dd)] = _[n(e._0x17418b)];
91
+ this[n(t._0x560a03)] = _[n(t._0x28548c)];
91
92
  continue;
92
93
  case "1":
93
- this.id = t;
94
+ this.id = e;
94
95
  continue;
95
96
  case "2":
96
- this[n(243)] = "2d";
97
+ this[n(397)] = "2d";
97
98
  continue;
98
99
  case "3":
99
- this[n(260)] = x;
100
+ this[n(374)] = _[n(348)](_[n(t._0x3b7370)](g, "-"), Math[n(354)]()[n(t._0x4f0ab7)](16)[n(t._0x1cfdf6)](2));
100
101
  continue;
101
102
  case "4":
102
- this[n(288)] = _[n(279)](_[n(e._0x207349)](y, "-"), Math.random().toString(16).substring(2));
103
+ this[n(368)] = x;
103
104
  continue;
104
105
  }
105
106
  break;
106
107
  }
107
108
  }
108
- [c(291)](t) {
109
- const x = { _0x2de920: 252 }, e = c, n = { nsABt: function(_, s) {
109
+ [c(390)](e) {
110
+ const x = { _0x2df985: 412, _0x5293e5: 359, _0x325499: 374 }, t = c, n = { Eljwh: function(_, s) {
110
111
  return _(s);
111
- }, pYMfU: function(_, s, i) {
112
- return _(s, i);
112
+ }, WGsSg: function(_, s, a) {
113
+ return _(s, a);
113
114
  } };
114
- if (this[e(252)] = t, this._createLayerContainer(), !n.nsABt(p, this[e(288)])) {
115
- const _ = new d(this[e(288)], this[e(x._0x2de920)]);
116
- n[e(286)](m, this._coordSystemName, _);
115
+ if (this[t(359)] = e, this[t(x._0x2df985)](), !n[t(367)](p, this[t(374)])) {
116
+ const _ = new f(this[t(374)], this[t(x._0x5293e5)]);
117
+ n[t(408)](m, this[t(x._0x325499)], _);
117
118
  }
118
119
  }
119
- onRemove() {
120
- const t = { _0x42472a: 264 }, x = c;
121
- this._ec?.dispose(), this[x(t._0x42472a)]();
120
+ [c(357)]() {
121
+ const e = { _0x59533d: 411, _0x523ca7: 380 }, x = c;
122
+ this[x(e._0x59533d)]?.[x(e._0x523ca7)](), this[x(385)]();
122
123
  }
123
- [c(241)](t) {
124
- const x = { _0x5b08bb: 241 }, e = c;
125
- this[e(277)]?.[e(x._0x5b08bb)](t);
124
+ [c(378)](e) {
125
+ this[c({ _0xb0ead0: 411 }._0xb0ead0)]?.setOption(e);
126
126
  }
127
- [c(276)]() {
128
- const t = { _0x444ec5: 269, _0x2d3cbf: 268, _0x2f0be4: 295, _0x584136: 285, _0x5ea923: 297, _0x3af77b: 250, _0x2b8464: 277, _0x21238a: 241, _0x3bc6b6: 260 }, x = c, e = { hlTTY: function(n, _) {
127
+ [c(360)]() {
128
+ const e = { _0x2de995: 411, _0x34883e: 395, _0x330770: 369, _0x1b9b38: 368, _0x28c490: 359, _0x389118: 352, _0x772efc: 384, _0x4fbe92: 352, _0x585237: 378 }, x = c, t = { VdSVD: function(n, _) {
129
129
  return n(_);
130
130
  } };
131
- !this[x(268)] && this[x(t._0x444ec5)](), this[x(277)] ? this._map.isMoving() ? this[x(277)][x(t._0x584136)]() : (this[x(277)][x(t._0x5ea923)]({ width: this[x(252)][x(250)]().width, height: this[x(252)][x(t._0x3af77b)]()[x(263)] }), this[x(t._0x2b8464)][x(t._0x21238a)](this[x(t._0x3bc6b6)])) : (this[x(277)] = e[x(253)](l, this[x(t._0x2d3cbf)]), this[x(t._0x2f0be4)](), this[x(277)].setOption(this._ecOption));
131
+ !this[x(395)] && this[x(412)](), this[x(e._0x2de995)] ? this[x(359)][x(349)]() ? this[x(411)].clear() : (this[x(411)].resize({ width: this[x(e._0x28c490)][x(e._0x389118)]()[x(e._0x772efc)], height: this._map[x(e._0x4fbe92)]()[x(379)] }), this[x(411)][x(e._0x585237)](this._ecOption)) : (this[x(411)] = t[x(375)](l, this[x(e._0x34883e)]), this[x(e._0x330770)](), this._ec[x(378)](this[x(e._0x1b9b38)]));
132
132
  }
133
- [c(295)]() {
134
- const t = { _0x5936fe: 256 }, x = c, e = { gDpnW: function(_, s) {
133
+ [c(369)]() {
134
+ const e = { _0x185d83: 386, _0x3acb26: 362 }, x = c, t = { EKJcn: function(_, s) {
135
135
  return _ - s;
136
- }, kNQZd: function(_, s) {
136
+ }, ylBro: function(_, s) {
137
137
  return _ >= s;
138
- }, Uagfb: "coordinateSystem" }, n = this._ecOption.series;
139
- if (n) for (let _ = e.gDpnW(n[x(267)], 1); e[x(296)](_, 0); _--)
140
- n[_][e[x(t._0x5936fe)]] = this[x(288)];
138
+ }, incsz: "coordinateSystem" }, n = this[x(368)][x(e._0x185d83)];
139
+ if (n) for (let _ = t[x(404)](n[x(356)], 1); t[x(366)](_, 0); _--)
140
+ n[_][t[x(e._0x3acb26)]] = this._coordSystemName;
141
141
  }
142
- [c(269)]() {
143
- const t = { _0xb7153e: 261, _0x22d553: 268, _0x401d55: 270, _0x5b4acf: 258, _0x3c92b2: 252, _0x43dc6e: 263 }, x = c, e = { RevXs: x(t._0xb7153e) }, n = this._map[x(274)]();
144
- this[x(268)] = document.createElement(e.RevXs), this[x(t._0x22d553)][x(258)][x(t._0x401d55)] = this._map[x(250)]()[x(258)][x(t._0x401d55)], this[x(268)][x(t._0x5b4acf)][x(263)] = this[x(t._0x3c92b2)][x(250)]().style[x(t._0x43dc6e)], n.appendChild(this[x(t._0x22d553)]);
142
+ [c(412)]() {
143
+ const e = { _0x443118: 359, _0x4d745e: 392, _0x1c2985: 398, _0x47320b: 359 }, x = c, t = { wnVOw: x(363) }, n = this[x(e._0x443118)][x(415)]();
144
+ this._container = document[x(e._0x4d745e)](t.wnVOw), this[x(395)][x(398)].width = this[x(359)][x(352)]()[x(e._0x1c2985)][x(384)], this._container[x(398)][x(379)] = this[x(e._0x47320b)][x(352)]()[x(398)].height, n[x(376)](this[x(395)]);
145
145
  }
146
- _removeLayerContainer() {
147
- const t = { _0x48a86d: 268, _0x2a5eb3: 255 }, x = c;
148
- this[x(268)] && this[x(t._0x48a86d)].parentNode?.[x(t._0x2a5eb3)](this._container);
146
+ [c(385)]() {
147
+ const e = c;
148
+ this._container && this[e(395)][e(361)]?.removeChild(this[e(395)]);
149
149
  }
150
150
  }
151
151
  export {
152
- C as default
152
+ y as default
153
153
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naivemap/maplibre-gl-echarts-layer",
3
- "version": "0.0.1-alpha.0",
3
+ "version": "0.0.1-alpha.1",
4
4
  "description": "Integrate the Lines graph and Scatter (bubble) chart of Apache ECharts",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "module": "./dist/index.js",