Skip to content

Commit 7bbd5c5

Browse files
author
liqian
committed
leaflet 下例子优化 review by tangqin
1 parent 98d8a1b commit 7bbd5c5

File tree

3 files changed

+50
-8
lines changed

3 files changed

+50
-8
lines changed

examples/leaflet/PlanesMonitor.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,22 @@
6666

6767
//暂停播放
6868
function pause() {
69-
timeControl.pause();
69+
if(!timeControl){
70+
return;
71+
}else{
72+
timeControl.pause();
73+
}
74+
7075
}
7176

7277
//停止播放
7378
function stop() {
74-
timeControl.stop();
75-
clearAll();
79+
if(!timeControl){
80+
return;
81+
}else{
82+
timeControl.stop();
83+
clearAll();
84+
}
7685
}
7786

7887
//时间控制器回调参数,即每次刷新时执行的操作,此处为向服务器请求数据并绘制。实时刷新执行。

examples/leaflet/echartsScatter.html

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
},
251251
controller: {
252252
inRange: {
253-
color: ['#c23531']
253+
color: ['#dd4444']
254254
},
255255
outOfRange: {
256256
color: ['#444']
@@ -280,7 +280,7 @@
280280
},
281281
controller: {
282282
inRange: {
283-
color: ['#c23531']
283+
color: ['#dd4444']
284284
},
285285
outOfRange: {
286286
color: ['#444']
@@ -348,6 +348,41 @@
348348
itemStyle: itemStyle,
349349
data: dataMap[city]
350350
}
351+
],
352+
visualMap:[
353+
{
354+
inRange: {
355+
symbolSize: [10, 70]
356+
},
357+
outOfRange: {
358+
symbolSize: [10, 70],
359+
color: ['rgba(255,255,255,.2)']
360+
},
361+
controller: {
362+
inRange: {
363+
color: [ colorMap[city] ]
364+
},
365+
outOfRange: {
366+
color: ['#444']
367+
}
368+
}
369+
},
370+
{
371+
inRange: {
372+
colorLightness: [1, 0.5]
373+
},
374+
outOfRange: {
375+
color: ['rgba(255,255,255,.2)']
376+
},
377+
controller: {
378+
inRange: {
379+
color: [ colorMap[city] ]
380+
},
381+
outOfRange: {
382+
color: ['#444']
383+
}
384+
}
385+
}
351386
]
352387
});
353388
map.panTo(e.latlng);

examples/leaflet/mapVLayerQianxi.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,7 @@
216216
L.supermap.mapVLayer(pointDataSet, pointOptions).addTo(map);
217217

218218
var timeDataSet = new mapv.DataSet(timeData);
219-
220-
console.log(timeData);
221-
219+
222220
var timeOptions = {
223221
fillStyle: 'rgba(255, 250, 250, 0.5)',
224222
zIndex: 200,

0 commit comments

Comments
 (0)