mars3d-tdt 3.6.13 → 3.6.14
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/dist/mars3d-tdt.js +13 -3
- package/package.json +2 -2
package/dist/mars3d-tdt.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mars3D平台插件,支持对天地图三维地名服务和地形服务加载使用 mars3d-tdt
|
|
3
3
|
*
|
|
4
|
-
* 版本信息:v3.6.
|
|
5
|
-
* 编译日期:2023-11-
|
|
4
|
+
* 版本信息:v3.6.14
|
|
5
|
+
* 编译日期:2023-11-27 22:14:12
|
|
6
6
|
* 版权所有:Copyright by 火星科技 http://mars3d.cn
|
|
7
7
|
* 使用单位:免费公开版 ,2023-03-17
|
|
8
8
|
*/
|
|
@@ -93,9 +93,19 @@
|
|
|
93
93
|
get layer() {
|
|
94
94
|
return this.wtfs;
|
|
95
95
|
}
|
|
96
|
+
_showHook(show) {
|
|
97
|
+
if (show) {
|
|
98
|
+
this._addedHook();
|
|
99
|
+
} else {
|
|
100
|
+
this._removedHook();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
96
103
|
|
|
97
104
|
// 对象添加到地图上的创建钩子方法
|
|
98
105
|
_addedHook() {
|
|
106
|
+
if (!this.show) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
99
109
|
// 服务域名
|
|
100
110
|
const tdtUrl = this.options.url || "https://t{s}.tianditu.gov.cn/mapservice/GetTiles";
|
|
101
111
|
const token = this.options.key || mars3d__namespace.Token.tianditu;
|
|
@@ -367,7 +377,7 @@
|
|
|
367
377
|
_removedHook() {
|
|
368
378
|
if (this.wtfs) {
|
|
369
379
|
this.wtfs.destroy();
|
|
370
|
-
this.wtfs
|
|
380
|
+
delete this.wtfs;
|
|
371
381
|
}
|
|
372
382
|
}
|
|
373
383
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mars3d-tdt",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.14",
|
|
4
4
|
"description": "Mars3D平台插件,支持对天地图三维地名服务和地形服务加载使用",
|
|
5
5
|
"main": "dist/mars3d-tdt.js",
|
|
6
6
|
"files": [
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"bytebuffer": "^5.0.1"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"mars3d": "~3.6.
|
|
13
|
+
"mars3d": "~3.6.14"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"lint": "eslint ./src/**/*.{js,ts} --fix"
|