@ohuoy/easymap 1.1.10 → 1.1.11
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/data/gis_weather.sql +37 -0
- package/index.js +8 -1
- package/package.json +1 -1
- package/src/components/layer/AnimationLayer.js +19 -2
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Navicat Premium Data Transfer
|
|
3
|
+
|
|
4
|
+
Source Server : 90
|
|
5
|
+
Source Server Type : PostgreSQL
|
|
6
|
+
Source Server Version : 120000 (120000)
|
|
7
|
+
Source Host : 192.168.11.90:5432
|
|
8
|
+
Source Catalog : sdgydb
|
|
9
|
+
Source Schema : public
|
|
10
|
+
|
|
11
|
+
Target Server Type : PostgreSQL
|
|
12
|
+
Target Server Version : 120000 (120000)
|
|
13
|
+
File Encoding : 65001
|
|
14
|
+
|
|
15
|
+
Date: 30/09/2025 13:44:37
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
-- ----------------------------
|
|
20
|
+
-- Table structure for gis_weather
|
|
21
|
+
-- ----------------------------
|
|
22
|
+
DROP TABLE IF EXISTS "public"."gis_weather";
|
|
23
|
+
CREATE TABLE "public"."gis_weather" (
|
|
24
|
+
"gw_type" int2 NOT NULL,
|
|
25
|
+
"gw_json" jsonb NOT NULL,
|
|
26
|
+
"gw_name" varchar COLLATE "pg_catalog"."default" NOT NULL,
|
|
27
|
+
"gw_code" varchar COLLATE "pg_catalog"."default" NOT NULL,
|
|
28
|
+
"gw_update_time" timestamptz(6) NOT NULL,
|
|
29
|
+
"gw_level" int2 NOT NULL,
|
|
30
|
+
"gw_create_time" timestamptz(6) NOT NULL
|
|
31
|
+
)
|
|
32
|
+
;
|
|
33
|
+
|
|
34
|
+
-- ----------------------------
|
|
35
|
+
-- Primary Key structure for table gis_weather
|
|
36
|
+
-- ----------------------------
|
|
37
|
+
ALTER TABLE "public"."gis_weather" ADD CONSTRAINT "gis_weather_pkey" PRIMARY KEY ("gw_code", "gw_create_time");
|
package/index.js
CHANGED
|
@@ -161,7 +161,14 @@ export class EasyMap {
|
|
|
161
161
|
map.addLayer(layer);
|
|
162
162
|
}
|
|
163
163
|
})
|
|
164
|
-
|
|
164
|
+
if(layerIds.indexOf("tiandi") >= 0){
|
|
165
|
+
map.theme.value ="light"
|
|
166
|
+
}
|
|
167
|
+
else if(layerIds.indexOf("yingxiang") >= 0){
|
|
168
|
+
map.theme.value ="dark"
|
|
169
|
+
}else{
|
|
170
|
+
map.theme.value = map.style.stylesheet.theme
|
|
171
|
+
}
|
|
165
172
|
|
|
166
173
|
map.off('style.load', handleStyleLoad);
|
|
167
174
|
};
|
package/package.json
CHANGED
|
@@ -18,6 +18,7 @@ export default class AnimationLayer{
|
|
|
18
18
|
itemList = []
|
|
19
19
|
oldItem ={}
|
|
20
20
|
opacity = 0.8
|
|
21
|
+
textureLoading = false
|
|
21
22
|
obj = {}
|
|
22
23
|
status = actionStatus.Pause
|
|
23
24
|
current = 0
|
|
@@ -30,6 +31,9 @@ export default class AnimationLayer{
|
|
|
30
31
|
}
|
|
31
32
|
setProgress=()=>{
|
|
32
33
|
|
|
34
|
+
}
|
|
35
|
+
textureLoadingFun = ()=>{
|
|
36
|
+
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
destory(){
|
|
@@ -47,6 +51,9 @@ export default class AnimationLayer{
|
|
|
47
51
|
this.getProgress = config.getProgress
|
|
48
52
|
this.setProgress = config.setProgress
|
|
49
53
|
this.textClass = config.textClass
|
|
54
|
+
if(config.textureLoadingFun){
|
|
55
|
+
this.textureLoadingFun = config.textureLoadingFun
|
|
56
|
+
}
|
|
50
57
|
this.progress = new Proxy(this.progress,{
|
|
51
58
|
set:(target, property, value)=>{
|
|
52
59
|
target[property] = value
|
|
@@ -95,7 +102,7 @@ export default class AnimationLayer{
|
|
|
95
102
|
}
|
|
96
103
|
|
|
97
104
|
loadMesh(){
|
|
98
|
-
let texture = this.itemList[0].texture
|
|
105
|
+
let texture = this.itemList[0].texture
|
|
99
106
|
let _item = this.itemList[0].item;
|
|
100
107
|
let geometry = new THREE.PlaneGeometry(_item.width *20,_item.width*20);
|
|
101
108
|
//geometry.setAttribute('position', new THREE.BufferAttribute(vertices, 3));
|
|
@@ -180,7 +187,9 @@ export default class AnimationLayer{
|
|
|
180
187
|
}else{
|
|
181
188
|
this.animate()
|
|
182
189
|
this.getProgress(this.progress.value,this.status,this.current)
|
|
183
|
-
this.
|
|
190
|
+
if(!this.textureLoading){
|
|
191
|
+
this.current++;
|
|
192
|
+
}
|
|
184
193
|
}
|
|
185
194
|
}
|
|
186
195
|
this.updateStyleByTheme()
|
|
@@ -210,6 +219,14 @@ export default class AnimationLayer{
|
|
|
210
219
|
}
|
|
211
220
|
|
|
212
221
|
animate(){
|
|
222
|
+
let item = this.itemList[this.current].texture
|
|
223
|
+
if(!item.image){
|
|
224
|
+
this.textureLoading = true
|
|
225
|
+
this.textureLoadingFun(true)
|
|
226
|
+
}else{
|
|
227
|
+
this.textureLoading = false
|
|
228
|
+
this.textureLoadingFun(false)
|
|
229
|
+
}
|
|
213
230
|
this.obj.model.material.map = this.itemList[this.current].texture
|
|
214
231
|
let _item = this.itemList[this.current].item
|
|
215
232
|
this.obj.label.element.innerHTML = _item.text
|