mars3d-tdt 3.8.4 → 3.8.7
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.
- package/README.md +1 -1
- package/{dist/mars3d-tdt.js → mars3d-tdt.js} +41 -26
- package/package.json +3 -6
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mars3D平台插件,支持对天地图三维地名服务和地形服务加载使用 mars3d-tdt
|
|
3
3
|
*
|
|
4
|
-
* 版本信息:v3.8.
|
|
5
|
-
* 编译日期:2024-
|
|
4
|
+
* 版本信息:v3.8.7
|
|
5
|
+
* 编译日期:2024-11-14 18:16
|
|
6
6
|
* 版权所有:Copyright by 火星科技 http://mars3d.cn
|
|
7
7
|
* 使用单位:免费公开版 ,2024-08-01
|
|
8
8
|
*/
|
|
@@ -2503,8 +2503,17 @@
|
|
|
2503
2503
|
m = (i(88), i(0)),
|
|
2504
2504
|
b = i.n(m);
|
|
2505
2505
|
!function (e, r) {
|
|
2506
|
-
var n = i(120)
|
|
2507
|
-
window.dcodeIO = window.dcodeIO || {}
|
|
2506
|
+
// var n = i(120)
|
|
2507
|
+
// ;(window.dcodeIO = window.dcodeIO || {}),
|
|
2508
|
+
// (window.dcodeIO.ByteBuffer = n),
|
|
2509
|
+
// "function" === typeof define && i(121)
|
|
2510
|
+
// ? define(["bytebuffer"], r)
|
|
2511
|
+
// : "object" === b()(t) && t && t.exports
|
|
2512
|
+
// ? (t.exports = r(i(120), !0))
|
|
2513
|
+
// : ((e.dcodeIO = e.dcodeIO || {}).ProtoBuf = r(e.dcodeIO.ByteBuffer))
|
|
2514
|
+
|
|
2515
|
+
e.dcodeIO = e.dcodeIO || {};
|
|
2516
|
+
e.dcodeIO.ProtoBuf = r(i(120), true);
|
|
2508
2517
|
}(window, function (t, r) {
|
|
2509
2518
|
var o,
|
|
2510
2519
|
s = {};
|
|
@@ -4871,7 +4880,11 @@
|
|
|
4871
4880
|
}
|
|
4872
4881
|
var T;
|
|
4873
4882
|
!function (e) {
|
|
4874
|
-
("undefined" === typeof define ? "undefined" : w()(define)) === P("0x8") && define[P("0xd")]
|
|
4883
|
+
if (("undefined" === typeof define ? "undefined" : w()(define)) === P("0x8") && define[P("0xd")]) {
|
|
4884
|
+
define(e);
|
|
4885
|
+
} else {
|
|
4886
|
+
e();
|
|
4887
|
+
}
|
|
4875
4888
|
}(function () {}), (T = Cesium$2) && (T[P("0x45")] = {
|
|
4876
4889
|
GeoCamera: !0,
|
|
4877
4890
|
GeoCameraEventAggregator: !0,
|
|
@@ -5141,9 +5154,9 @@
|
|
|
5141
5154
|
function (Cesium) {
|
|
5142
5155
|
var t = Cesium.defaultValue;
|
|
5143
5156
|
function i(i) {
|
|
5144
|
-
i = t(i, t.EMPTY_OBJECT), this[P("0xe18")] = i.proxy, this
|
|
5157
|
+
i = t(i, t.EMPTY_OBJECT), this[P("0xe18")] = i.proxy, this.viewer = i.viewer, this.url = i[P("0x6af")], this[P("0xe19")] = i.metadata, this[P("0xe1a")] = i.roadMetadata, this[P("0xe1b")] = i[P("0xe1b")], this[P("0xe1c")] = i.labelGraphics ? i.labelGraphics : {}, this[P("0xe1d")] = i[P("0xe1d")] ? i.billboardGraphics : {}, this[P("0xe1e")] = !!i.aotuCollide, this.collisionPadding = i[P("0xe1f")] ? i[P("0xe1f")] : [3, 5, 3, 5], this[P("0xe20")] = !!i[P("0xe20")], this[P("0xa4e")] = i.subdomains, Array.isArray(this[P("0xa4e")]) ? this[P("0xa4e")] = this[P("0xa4e")].slice() : Cesium["defined"](this[P("0xa4e")]) && 0 < this[P("0xa4e")][P("0x0")] ? this[P("0xa4e")] = this[P("0xa4e")][P("0x7f2")]("") : this[P("0xa4e")] = ["a", "b", "c"], this[P("0xe21")] = [], this[P("0xe22")] = [], this[P("0xe23")] = !1, this[P("0xe24")] = [], this._latelyRefreshStamp = 0, this._latelyCollisionStamp = 0;
|
|
5145
5158
|
var r = Cesium[P("0x75c")]();
|
|
5146
|
-
this[P("0xe25")] = P("0xe26") + r, this[P("0xe27")] = "GEO_WTFS_LABEL_ROAD_" + r, this
|
|
5159
|
+
this[P("0xe25")] = P("0xe26") + r, this[P("0xe27")] = "GEO_WTFS_LABEL_ROAD_" + r, this.viewer.camera.percentageChanged = 0.18, this.bindEvent();
|
|
5147
5160
|
}
|
|
5148
5161
|
function r(Cesium, t) {
|
|
5149
5162
|
return t[P("0xe77")] >= Cesium[P("0xe77")] && t.minX <= Cesium.maxX && t[P("0x4d2")] >= Cesium[P("0x4d2")] && t[P("0x4d2")] <= Cesium.maxY || t[P("0xe78")] >= Cesium[P("0xe77")] && t.maxX <= Cesium[P("0xe78")] && t[P("0xe79")] >= Cesium[P("0x4d2")] && t[P("0xe79")] <= Cesium.maxY || t[P("0xe77")] >= Cesium[P("0xe77")] && t[P("0xe77")] <= Cesium[P("0xe78")] && t[P("0xe79")] >= Cesium[P("0x4d2")] && t.maxY <= Cesium[P("0xe79")] || t[P("0xe78")] >= Cesium[P("0xe77")] && t.maxX <= Cesium.maxX && t[P("0x4d2")] >= Cesium[P("0x4d2")] && t[P("0x4d2")] <= Cesium.maxY;
|
|
@@ -5185,22 +5198,22 @@
|
|
|
5185
5198
|
return (this[P("0xe18")] ? this.proxy[P("0xe18")] : "") + this.url + P("0xe32");
|
|
5186
5199
|
}, i.prototype[P("0xe33")] = function () {
|
|
5187
5200
|
return (this[P("0xe18")] ? this[P("0xe18")][P("0xe18")] : "") + this[P("0xe1b")];
|
|
5188
|
-
}, i.prototype
|
|
5201
|
+
}, i.prototype._moveEnd = function () {
|
|
5189
5202
|
var Cesium = this;
|
|
5190
5203
|
clearTimeout(this[P("0xe34")]);
|
|
5191
|
-
var t = this
|
|
5204
|
+
var t = this.viewer.scene[P("0xa3")][P("0xa2e")];
|
|
5192
5205
|
if (t[P("0xe35")][P("0x0")] < 2 || 0 < t._tileLoadQueueHigh.length) this[P("0xe34")] = setTimeout(function () {
|
|
5193
|
-
Cesium
|
|
5206
|
+
Cesium._moveEnd();
|
|
5194
5207
|
}, 100);else {
|
|
5195
5208
|
var i = this[P("0xe36")]();
|
|
5196
5209
|
if (this[P("0xe37")](i, this._latelyGrid)) return;
|
|
5197
5210
|
this[P("0xe38")](i), Cesium.delaySynchronous();
|
|
5198
5211
|
}
|
|
5199
|
-
}, i.prototype
|
|
5212
|
+
}, i.prototype._changed = function () {
|
|
5200
5213
|
var Cesium = new Date().getTime(),
|
|
5201
5214
|
t = Cesium - this[P("0xe39")],
|
|
5202
5215
|
i = Cesium - this[P("0xe3a")];
|
|
5203
|
-
300 < t && this
|
|
5216
|
+
300 < t && this._moveEnd(), 150 < i && this[P("0xe3b")]();
|
|
5204
5217
|
}, i.prototype._queueCall = function (Cesium) {
|
|
5205
5218
|
var t = this;
|
|
5206
5219
|
t[P("0xe24")] = Cesium, t[P("0xe39")] = new Date()[P("0x68")](), Cesium[P("0x1e4")](function (Cesium, i, n) {
|
|
@@ -5281,7 +5294,7 @@
|
|
|
5281
5294
|
}, 600);
|
|
5282
5295
|
return i;
|
|
5283
5296
|
}, i.prototype[P("0xe36")] = function () {
|
|
5284
|
-
for (var t = this[P("
|
|
5297
|
+
for (var t = this.viewer.scene[P("0xa3")][P("0xa2e")]._tilesToRender.map(function (t, i, r) {
|
|
5285
5298
|
return {
|
|
5286
5299
|
x: t.x,
|
|
5287
5300
|
y: t.y,
|
|
@@ -5309,9 +5322,9 @@
|
|
|
5309
5322
|
Cesium.synchronousLabel();
|
|
5310
5323
|
}, 100);
|
|
5311
5324
|
}, i.prototype.synchronousLabel = function () {
|
|
5312
|
-
for (var Cesium = 0; Cesium < this.labelCache[P("0x0")]; Cesium++) this[P("0xe22")][Cesium].timestamp >= this[P("0xe39")] && !this.viewer[P("0x194")].contains(this.labelCache[Cesium]) && (this._isInitial && this[P("0xe1e")] && (this[P("0xe22")][Cesium][P("0x221")] = !1), this[P("
|
|
5325
|
+
for (var Cesium = 0; Cesium < this.labelCache[P("0x0")]; Cesium++) this[P("0xe22")][Cesium].timestamp >= this[P("0xe39")] && !this.viewer[P("0x194")].contains(this.labelCache[Cesium]) && (this._isInitial && this[P("0xe1e")] && (this[P("0xe22")][Cesium][P("0x221")] = !1), this.viewer[P("0x194")][P("0x6d")](this.labelCache[Cesium]));
|
|
5313
5326
|
if (!this[P("0xe23")]) {
|
|
5314
|
-
for (Cesium = 0; Cesium < this.viewer.entities[P("0x190")][P("0x0")]; Cesium++) !this[P("
|
|
5327
|
+
for (Cesium = 0; Cesium < this.viewer.entities[P("0x190")][P("0x0")]; Cesium++) !this.viewer[P("0x194")][P("0x190")][Cesium][P("0x176")] || this.viewer[P("0x194")][P("0x190")][Cesium][P("0x176")] !== this[P("0xe25")] && this.viewer[P("0x194")][P("0x190")][Cesium].name !== this[P("0xe27")] || this.viewer[P("0x194")][P("0x190")][Cesium].timestamp < this._latelyRefreshStamp && (this.viewer[P("0x194")].remove(this.viewer[P("0x194")][P("0x190")][Cesium]), Cesium--);
|
|
5315
5328
|
this[P("0xe1e")] && this[P("0xe3b")]();
|
|
5316
5329
|
}
|
|
5317
5330
|
}, i.prototype[P("0xe4b")] = function (t, i) {
|
|
@@ -5334,12 +5347,12 @@
|
|
|
5334
5347
|
}, i.prototype.getPropertyValue = function (Cesium, t, i, r) {
|
|
5335
5348
|
return void 0 !== t[Cesium] ? t[Cesium] : void 0 !== i[Cesium] ? i[Cesium] : r;
|
|
5336
5349
|
}, i.prototype[P("0xe3b")] = function () {
|
|
5337
|
-
if (this[P("0xe66")]) for (var t = document[P("0xe67")](P("0xe66")), i = 0; i < t[P("0x0")]; i++) this[P("
|
|
5350
|
+
if (this[P("0xe66")]) for (var t = document[P("0xe67")](P("0xe66")), i = 0; i < t[P("0x0")]; i++) this.viewer[P("0x131")][P("0x41b")](t[i]), i--;
|
|
5338
5351
|
var r = [],
|
|
5339
5352
|
o = this.viewer[P("0x194")][P("0x190")];
|
|
5340
5353
|
for (i = 0; i < o[P("0x0")]; i++) if (o[i][P("0x176")] && (o[i][P("0x176")] === this[P("0xe25")] || o[i][P("0x176")] === this[P("0xe27")])) {
|
|
5341
5354
|
var a, s;
|
|
5342
|
-
a = Cesium[P("0xe68")].worldToDrawingBufferCoordinates(this
|
|
5355
|
+
a = Cesium[P("0xe68")].worldToDrawingBufferCoordinates(this.viewer.scene, o[i].position[P("0x512")](0)), o[i][P("0x221")] = !0, s = this[P("0xe69")]({
|
|
5343
5356
|
point: a,
|
|
5344
5357
|
entity: o[i]
|
|
5345
5358
|
}), o[i].collisionBox = s;
|
|
@@ -5352,7 +5365,7 @@
|
|
|
5352
5365
|
entities: []
|
|
5353
5366
|
}, r.push(x)), x[P("0x194")][P("0x17c")](o[i]), this[P("0xe66")]) {
|
|
5354
5367
|
var c = document[P("0x15c")](P("0x15d"));
|
|
5355
|
-
c[P("0x21b")](P("0xe6a"), P("0xe66")), c[P("0x150")][P("0xe6b")] = P("0xe6c") + s.y + P("0xe6d") + s.x + P("0xe6e") + s.width + P("0xe6f") + s[P("0x8b")] + "px; border: solid 1px red; color: rgba(0,0,0,0);", c[P("0x40a")] = o[i][P("0xe51")][P("0x31b")].getValue(0), this
|
|
5368
|
+
c[P("0x21b")](P("0xe6a"), P("0xe66")), c[P("0x150")][P("0xe6b")] = P("0xe6c") + s.y + P("0xe6d") + s.x + P("0xe6e") + s.width + P("0xe6f") + s[P("0x8b")] + "px; border: solid 1px red; color: rgba(0,0,0,0);", c[P("0x40a")] = o[i][P("0xe51")][P("0x31b")].getValue(0), this.viewer.container.appendChild(c);
|
|
5356
5369
|
}
|
|
5357
5370
|
}
|
|
5358
5371
|
for (var u = 0; u < r[P("0x0")]; u++) for (r[u].entities[P("0x3d2")](function (Cesium, t) {
|
|
@@ -5364,14 +5377,16 @@
|
|
|
5364
5377
|
return Cesium.priority - t[P("0xe64")];
|
|
5365
5378
|
}), l = i + 1; l < h[P("0x0")]; l++) h[l].show && n(h[i][P("0xe70")], h[l][P("0xe70")]) && (h[l].show = !1);
|
|
5366
5379
|
}, i.prototype[P("0xe71")] = function () {
|
|
5367
|
-
this
|
|
5380
|
+
this.viewer.scene.camera.moveEnd.addEventListener(this._moveEnd, this);
|
|
5381
|
+
this.viewer.scene.camera.changed.addEventListener(this._changed, this);
|
|
5368
5382
|
}, i.prototype[P("0xe74")] = function () {
|
|
5369
|
-
this
|
|
5383
|
+
this.viewer.scene.camera.moveEnd.removeEventListener(this._moveEnd, this);
|
|
5384
|
+
this.viewer.scene.camera.changed.removeEventListener(this._changed, this);
|
|
5370
5385
|
}, i.prototype[P("0x198")] = function () {
|
|
5371
|
-
this[P("0xe24")] = [], this
|
|
5386
|
+
this[P("0xe24")] = [], this._moveEnd();
|
|
5372
5387
|
}, i.prototype["destroy"] = function () {
|
|
5373
|
-
for (var Cesium = 0; Cesium < this[P("
|
|
5374
|
-
this
|
|
5388
|
+
for (var Cesium = 0; Cesium < this.viewer[P("0x194")][P("0x190")][P("0x0")]; Cesium++) !this.viewer[P("0x194")][P("0x190")][Cesium].name || this.viewer.entities[P("0x190")][Cesium][P("0x176")] !== this._UUID && this.viewer.entities.values[Cesium].name !== this[P("0xe27")] || (this.viewer[P("0x194")].remove(this.viewer.entities[P("0x190")][Cesium]), Cesium--);
|
|
5389
|
+
this.viewer.camera.percentageChanged = 0.5, this[P("0xe74")](), this[P("0x16f")] = this[P("0x16f")] && this[P("0x16f")].destroy(), this[P("0xe18")] = void 0, this.viewer = void 0, this[P("0x6af")] = void 0, this[P("0xe1c")] = void 0, this[P("0xe1d")] = void 0, this[P("0xe1e")] = void 0, this.collisionPadding = void 0, this.tileCache = void 0, this.labelCache = void 0, this[P("0xe24")] = void 0, this[P("0xe39")] = void 0, this[P("0xe75")] = void 0;
|
|
5375
5390
|
}, i.prototype[P("0xe37")] = function (Cesium, t) {
|
|
5376
5391
|
for (var i = !1, r = 0; r < Cesium[P("0x0")]; r++) {
|
|
5377
5392
|
for (var n = !1, o = 0; o < t.length; o++) if (Cesium[r].x === t[o].x && Cesium[r].y === t[o].y && Cesium[r].level === t[o][P("0x968")]) {
|
|
@@ -5410,7 +5425,7 @@
|
|
|
5410
5425
|
return "#" + Cesium + t;
|
|
5411
5426
|
}, i.prototype.getLabelVisibility = function (Cesium) {
|
|
5412
5427
|
if (!Cesium) return !1;
|
|
5413
|
-
var t = this[P("
|
|
5428
|
+
var t = this.viewer[P("0x48")].getBoundingClientRect();
|
|
5414
5429
|
return !(Cesium.x < -10 || Cesium.x > t[P("0x9b")] + 10 || Cesium.y < -10 || Cesium.y > t[P("0x9aa")] + 10);
|
|
5415
5430
|
};
|
|
5416
5431
|
var o = function (Cesium) {
|
|
@@ -6372,7 +6387,7 @@
|
|
|
6372
6387
|
...this.options,
|
|
6373
6388
|
viewer: this._map.viewer,
|
|
6374
6389
|
subdomains: subdomains,
|
|
6375
|
-
labelGraphics: mars3d__namespace.LabelStyleConver.toCesiumVal(this.options.label, {
|
|
6390
|
+
labelGraphics: mars3d__namespace.LabelStyleConver.toCesiumVal(this.options.label || {}, {
|
|
6376
6391
|
font: "28px sans-serif",
|
|
6377
6392
|
fontSize: 28,
|
|
6378
6393
|
fillColor: Cesium$1.Color.WHITE,
|
|
@@ -6388,7 +6403,7 @@
|
|
|
6388
6403
|
eyeOffset: Cesium$1.Cartesian3.ZERO,
|
|
6389
6404
|
pixelOffset: new Cesium$1.Cartesian2(0, -10)
|
|
6390
6405
|
}),
|
|
6391
|
-
billboardGraphics: mars3d__namespace.BillboardStyleConver.toCesiumVal(this.options.billboard, {
|
|
6406
|
+
billboardGraphics: mars3d__namespace.BillboardStyleConver.toCesiumVal(this.options.billboard || {}, {
|
|
6392
6407
|
horizontalOrigin: Cesium$1.HorizontalOrigin.CENTER,
|
|
6393
6408
|
verticalOrigin: Cesium$1.VerticalOrigin.CENTER,
|
|
6394
6409
|
eyeOffset: Cesium$1.Cartesian3.ZERO,
|
package/package.json
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mars3d-tdt",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.7",
|
|
4
4
|
"description": "Mars3D平台插件,支持对天地图三维地名服务和地形服务加载使用",
|
|
5
|
-
"main": "
|
|
6
|
-
"files": [
|
|
7
|
-
"dist"
|
|
8
|
-
],
|
|
5
|
+
"main": "./mars3d-tdt.js",
|
|
9
6
|
"peerDependencies": {
|
|
10
7
|
"bytebuffer": "^5.0.1"
|
|
11
8
|
},
|
|
12
9
|
"devDependencies": {
|
|
13
|
-
"mars3d": "~3.8.
|
|
10
|
+
"mars3d": "~3.8.7"
|
|
14
11
|
},
|
|
15
12
|
"scripts": {
|
|
16
13
|
"lint": "eslint ./src/**/*.{js,ts} --fix"
|