koishi-plugin-lutu 1.0.0
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/lib/api/evmOpenApi.d.ts +33 -0
- package/lib/api/evmOpenApi.js +114 -0
- package/lib/api/truckersMpApi.d.ts +34 -0
- package/lib/api/truckersMpApi.js +133 -0
- package/lib/api/truckersMpMapApi.d.ts +6 -0
- package/lib/api/truckersMpMapApi.js +25 -0
- package/lib/api/truckyAppApi.d.ts +12 -0
- package/lib/api/truckyAppApi.js +48 -0
- package/lib/command/ets-app/queryPoint.js +74 -0
- package/lib/command/ets-app/resetPassword.js +111 -0
- package/lib/command/tmpActivityService.js +603 -0
- package/lib/command/tmpBind.d.ts +2 -0
- package/lib/command/tmpBind.js +18 -0
- package/lib/command/tmpDlcMap.d.ts +3 -0
- package/lib/command/tmpDlcMap.js +33 -0
- package/lib/command/tmpMileageRanking.d.ts +3 -0
- package/lib/command/tmpMileageRanking.js +55 -0
- package/lib/command/tmpPosition.d.ts +3 -0
- package/lib/command/tmpPosition.js +107 -0
- package/lib/command/tmpQuery/tmpQuery.d.ts +2 -0
- package/lib/command/tmpQuery/tmpQuery.js +12 -0
- package/lib/command/tmpQuery/tmpQueryImg.d.ts +3 -0
- package/lib/command/tmpQuery/tmpQueryImg.js +103 -0
- package/lib/command/tmpQuery/tmpQueryText.d.ts +2 -0
- package/lib/command/tmpQuery/tmpQueryText.js +175 -0
- package/lib/command/tmpServer.d.ts +2 -0
- package/lib/command/tmpServer.js +41 -0
- package/lib/command/tmpTraffic/tmpTraffic.d.ts +2 -0
- package/lib/command/tmpTraffic/tmpTraffic.js +15 -0
- package/lib/command/tmpTraffic/tmpTrafficMap.d.ts +3 -0
- package/lib/command/tmpTraffic/tmpTrafficMap.js +163 -0
- package/lib/command/tmpTraffic/tmpTrafficText.d.ts +2 -0
- package/lib/command/tmpTraffic/tmpTrafficText.js +60 -0
- package/lib/command/tmpVersion.d.ts +2 -0
- package/lib/command/tmpVersion.js +14 -0
- package/lib/command/tmpVtc.js +29 -0
- package/lib/database/guildBind.d.ts +15 -0
- package/lib/database/guildBind.js +41 -0
- package/lib/database/model.d.ts +2 -0
- package/lib/database/model.js +65 -0
- package/lib/database/translateCache.d.ts +14 -0
- package/lib/database/translateCache.js +31 -0
- package/lib/index.d.ts +35 -0
- package/lib/index.js +276 -0
- package/lib/resource/dlc.html +115 -0
- package/lib/resource/mileage-leaderboard.html +363 -0
- package/lib/resource/package/SEGUIEMJ.TTF +0 -0
- package/lib/resource/package/leaflet/heatmap.min.js +9 -0
- package/lib/resource/package/leaflet/leaflet-heatmap.js +246 -0
- package/lib/resource/package/leaflet/leaflet.min.css +1 -0
- package/lib/resource/package/leaflet/leaflet.min.js +1 -0
- package/lib/resource/position.html +223 -0
- package/lib/resource/query.html +363 -0
- package/lib/resource/traffic.html +207 -0
- package/lib/util/baiduTranslate.d.ts +2 -0
- package/lib/util/baiduTranslate.js +30 -0
- package/lib/util/common.d.ts +1 -0
- package/lib/util/common.js +5 -0
- package/lib/util/constant.d.ts +8 -0
- package/lib/util/constant.js +16 -0
- package/package.json +41 -0
- package/readme.md +143 -0
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Mileage Leaderboard</title>
|
|
6
|
+
<style>
|
|
7
|
+
@font-face {
|
|
8
|
+
font-family: 'segui-emj';
|
|
9
|
+
src: url('./package/SEGUIEMJ.TTF');
|
|
10
|
+
font-weight: normal;
|
|
11
|
+
font-style: normal;
|
|
12
|
+
}
|
|
13
|
+
body {
|
|
14
|
+
font-family: 'segui-emj', sans-serif;
|
|
15
|
+
margin: 0;
|
|
16
|
+
padding: 0;
|
|
17
|
+
background-color: #000;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
#container {
|
|
21
|
+
width: 340px;
|
|
22
|
+
background: linear-gradient(135deg, #1f2f54, #0f2c2a);
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
padding-bottom: 12px;
|
|
25
|
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.header {
|
|
29
|
+
height: 45px;
|
|
30
|
+
background-color: rgba(0, 0, 0, .1);
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
padding: 0 20px;
|
|
35
|
+
box-shadow: 0 0 16px rgba(0, 0, 0, .4);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.header .title {
|
|
39
|
+
color: #b0c7ff;
|
|
40
|
+
font-size: 16px;
|
|
41
|
+
font-weight: 600;
|
|
42
|
+
text-align: center;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.leaderboard-container {
|
|
46
|
+
padding: 12px 16px 0 16px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.leaderboard-item {
|
|
50
|
+
background-color: rgba(0, 0, 0, 0.25);
|
|
51
|
+
margin-bottom: 4px;
|
|
52
|
+
border-radius: 6px;
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.leaderboard-item.top3 {
|
|
58
|
+
background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
|
|
59
|
+
border-color: rgba(255, 215, 0, 0.3);
|
|
60
|
+
box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.leaderboard-item.current-player {
|
|
64
|
+
background: linear-gradient(135deg, rgba(92, 227, 92, 0.3), rgba(92, 227, 92, 0.15));
|
|
65
|
+
border: 1px solid rgba(92, 227, 92, 0.6);
|
|
66
|
+
box-shadow: 0 2px 10px rgba(92, 227, 92, 0.3);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.item-content {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
padding: 8px 14px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.rank {
|
|
76
|
+
width: 32px;
|
|
77
|
+
color: #ffffff;
|
|
78
|
+
font-size: 15px;
|
|
79
|
+
font-weight: bold;
|
|
80
|
+
text-align: center;
|
|
81
|
+
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.current-player .rank {
|
|
85
|
+
min-width: 48px;
|
|
86
|
+
flex-shrink: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.rank.top1 {
|
|
90
|
+
color: #ffd700;
|
|
91
|
+
text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.rank.top2 {
|
|
95
|
+
color: #c0c0c0;
|
|
96
|
+
text-shadow: 0 0 6px rgba(192, 192, 192, 0.5);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.rank.top3 {
|
|
100
|
+
color: #cd7f32;
|
|
101
|
+
text-shadow: 0 0 6px rgba(205, 127, 50, 0.5);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.player-info {
|
|
105
|
+
flex: 1;
|
|
106
|
+
padding: 0 10px;
|
|
107
|
+
min-width: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.player-name {
|
|
111
|
+
color: #ffffff;
|
|
112
|
+
font-size: 13px;
|
|
113
|
+
font-weight: 600;
|
|
114
|
+
white-space: nowrap;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
text-overflow: ellipsis;
|
|
117
|
+
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
118
|
+
max-width: 160px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.current-player .player-name {
|
|
122
|
+
max-width: 144px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
.mileage-value {
|
|
127
|
+
color: #ffffff;
|
|
128
|
+
font-size: 13px;
|
|
129
|
+
font-weight: 700;
|
|
130
|
+
text-align: right;
|
|
131
|
+
white-space: nowrap;
|
|
132
|
+
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
133
|
+
min-width: 65px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.divider {
|
|
137
|
+
height: 1px;
|
|
138
|
+
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
|
|
139
|
+
margin: 12px 16px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.current-player-container {
|
|
143
|
+
padding: 0 16px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.current-player-title {
|
|
147
|
+
color: #aaaaaa;
|
|
148
|
+
font-size: 12px;
|
|
149
|
+
text-align: center;
|
|
150
|
+
margin-bottom: 8px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.footer-note {
|
|
154
|
+
color: #666666;
|
|
155
|
+
font-size: 10px;
|
|
156
|
+
text-align: center;
|
|
157
|
+
margin-top: 12px;
|
|
158
|
+
padding: 0 16px;
|
|
159
|
+
opacity: 0.8;
|
|
160
|
+
}
|
|
161
|
+
</style>
|
|
162
|
+
</head>
|
|
163
|
+
<body>
|
|
164
|
+
<div id="container">
|
|
165
|
+
<div class="header">
|
|
166
|
+
<div class="title">🚗 行驶里程排行榜</div>
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
<div class="leaderboard-container">
|
|
170
|
+
<!-- 排行榜前10名 -->
|
|
171
|
+
<div id="top-rankings"></div>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
<div class="divider"></div>
|
|
175
|
+
|
|
176
|
+
<div class="current-player-container">
|
|
177
|
+
<div class="current-player-title">你的排名</div>
|
|
178
|
+
<div id="current-player"></div>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
<div class="footer-note" id="footer-note">
|
|
182
|
+
* 数据统计说明
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
<script>
|
|
187
|
+
function createLeaderboardItem(rank, playerName, mileage, isCurrentPlayer = false, isTop3 = false) {
|
|
188
|
+
const item = document.createElement('div');
|
|
189
|
+
item.className = `leaderboard-item${isTop3 ? ' top3' : ''}${isCurrentPlayer ? ' current-player' : ''}`;
|
|
190
|
+
|
|
191
|
+
let rankClass = '';
|
|
192
|
+
if (rank === 1) rankClass = 'top1';
|
|
193
|
+
else if (rank === 2) rankClass = 'top2';
|
|
194
|
+
else if (rank === 3) rankClass = 'top3';
|
|
195
|
+
|
|
196
|
+
item.innerHTML = `
|
|
197
|
+
<div class="item-content">
|
|
198
|
+
<div class="rank ${rankClass}">#${rank}</div>
|
|
199
|
+
<div class="player-info">
|
|
200
|
+
<div class="player-name">${playerName}</div>
|
|
201
|
+
</div>
|
|
202
|
+
<div class="mileage-value">${formatMileage(mileage)}</div>
|
|
203
|
+
</div>
|
|
204
|
+
`;
|
|
205
|
+
|
|
206
|
+
return item;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function formatMileage(mileage) {
|
|
210
|
+
const meters = parseInt(mileage);
|
|
211
|
+
if (isNaN(meters) || meters < 0) return '0 km';
|
|
212
|
+
|
|
213
|
+
const km = meters / 1000;
|
|
214
|
+
|
|
215
|
+
if (km >= 1000000) {
|
|
216
|
+
const value = (km / 1000000).toFixed(2);
|
|
217
|
+
return value.endsWith('.00') ? Math.floor(km / 1000000) + 'M km' : value + 'M km';
|
|
218
|
+
} else if (km >= 1000) {
|
|
219
|
+
const value = (km / 1000).toFixed(2);
|
|
220
|
+
return value.endsWith('.00') ? Math.floor(km / 1000) + 'K km' : value + 'K km';
|
|
221
|
+
} else if (km >= 1) {
|
|
222
|
+
return Math.floor(km).toLocaleString() + ' km';
|
|
223
|
+
} else {
|
|
224
|
+
return meters.toLocaleString() + ' m';
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// 新增:处理来自后端的动态数据
|
|
229
|
+
function setData(apiData) {
|
|
230
|
+
if (!apiData) {
|
|
231
|
+
console.error('数据无效');
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// 设置标题和底部脚注
|
|
236
|
+
const titleElement = document.querySelector('.header .title');
|
|
237
|
+
const footerElement = document.getElementById('footer-note');
|
|
238
|
+
|
|
239
|
+
if (titleElement) {
|
|
240
|
+
const titles = {
|
|
241
|
+
1: '- 总行驶里程排行榜 -',
|
|
242
|
+
2: '- 今日行驶里程排行榜 -'
|
|
243
|
+
};
|
|
244
|
+
const footerNotes = {
|
|
245
|
+
1: '* 数据自 2025年8月23日 20:00 开始统计',
|
|
246
|
+
2: '* 每日 0:00 重置统计'
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
titleElement.textContent = titles[apiData.rankingType] || '🚗 行驶里程排行榜';
|
|
250
|
+
if (footerElement) {
|
|
251
|
+
footerElement.textContent = footerNotes[apiData.rankingType] || '* 数据统计说明';
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const topRankings = document.getElementById('top-rankings');
|
|
256
|
+
const currentPlayerContainer = document.getElementById('current-player');
|
|
257
|
+
|
|
258
|
+
// 清空现有内容
|
|
259
|
+
topRankings.innerHTML = '';
|
|
260
|
+
currentPlayerContainer.innerHTML = '';
|
|
261
|
+
|
|
262
|
+
// 渲染前10名排行榜
|
|
263
|
+
if (apiData.mileageRankingList && Array.isArray(apiData.mileageRankingList)) {
|
|
264
|
+
apiData.mileageRankingList.slice(0, 10).forEach((player) => {
|
|
265
|
+
if (player && player.tmpName && typeof player.distance !== 'undefined' && typeof player.ranking !== 'undefined') {
|
|
266
|
+
const isTop3 = player.ranking <= 3;
|
|
267
|
+
const item = createLeaderboardItem(player.ranking, player.tmpName, player.distance, false, isTop3);
|
|
268
|
+
topRankings.appendChild(item);
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// 渲染当前玩家排名
|
|
274
|
+
if (apiData.playerMileageRanking && apiData.playerMileageRanking.tmpName && typeof apiData.playerMileageRanking.ranking !== 'undefined') {
|
|
275
|
+
const currentItem = createLeaderboardItem(
|
|
276
|
+
apiData.playerMileageRanking.ranking,
|
|
277
|
+
apiData.playerMileageRanking.tmpName,
|
|
278
|
+
apiData.playerMileageRanking.distance,
|
|
279
|
+
true,
|
|
280
|
+
false
|
|
281
|
+
);
|
|
282
|
+
currentPlayerContainer.appendChild(currentItem);
|
|
283
|
+
} else {
|
|
284
|
+
// 如果没有当前玩家数据,隐藏该部分
|
|
285
|
+
const divider = document.querySelector('.divider');
|
|
286
|
+
const currentPlayerSection = document.querySelector('.current-player-container');
|
|
287
|
+
if (divider) divider.style.display = 'none';
|
|
288
|
+
if (currentPlayerSection) currentPlayerSection.style.display = 'none';
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
function init(data) {
|
|
293
|
+
if (!data) {
|
|
294
|
+
console.error('数据无效');
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
const topRankings = document.getElementById('top-rankings');
|
|
299
|
+
const currentPlayerContainer = document.getElementById('current-player');
|
|
300
|
+
|
|
301
|
+
// 清空现有内容
|
|
302
|
+
topRankings.innerHTML = '';
|
|
303
|
+
currentPlayerContainer.innerHTML = '';
|
|
304
|
+
|
|
305
|
+
// 渲染前10名排行榜
|
|
306
|
+
if (data.topRankings && Array.isArray(data.topRankings)) {
|
|
307
|
+
data.topRankings.slice(0, 10).forEach((player, index) => {
|
|
308
|
+
if (player && player.name && typeof player.mileage !== 'undefined') {
|
|
309
|
+
const rank = index + 1;
|
|
310
|
+
const isTop3 = rank <= 3;
|
|
311
|
+
const item = createLeaderboardItem(rank, player.name, player.mileage, false, isTop3);
|
|
312
|
+
topRankings.appendChild(item);
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// 渲染当前玩家排名
|
|
318
|
+
if (data.currentPlayer && data.currentPlayer.name && typeof data.currentPlayer.rank !== 'undefined') {
|
|
319
|
+
const currentItem = createLeaderboardItem(
|
|
320
|
+
data.currentPlayer.rank,
|
|
321
|
+
data.currentPlayer.name,
|
|
322
|
+
data.currentPlayer.mileage,
|
|
323
|
+
true,
|
|
324
|
+
false
|
|
325
|
+
);
|
|
326
|
+
currentPlayerContainer.appendChild(currentItem);
|
|
327
|
+
} else {
|
|
328
|
+
// 如果没有当前玩家数据,隐藏该部分
|
|
329
|
+
const divider = document.querySelector('.divider');
|
|
330
|
+
const currentPlayerSection = document.querySelector('.current-player-container');
|
|
331
|
+
if (divider) divider.style.display = 'none';
|
|
332
|
+
if (currentPlayerSection) currentPlayerSection.style.display = 'none';
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// 示例数据 - 实际使用时将被外部数据替换
|
|
337
|
+
const sampleData = {
|
|
338
|
+
topRankings: [
|
|
339
|
+
{ name: "Afo780", mileage: 347167 },
|
|
340
|
+
{ name: "lαdу ναlєяijα", mileage: 331177 },
|
|
341
|
+
{ name: "Stefan Z", mileage: 330658 },
|
|
342
|
+
{ name: "YorkshireSlacka", mileage: 328871 },
|
|
343
|
+
{ name: "Sun [PL]", mileage: 327208 },
|
|
344
|
+
{ name: "joewales96 LAG", mileage: 324952 },
|
|
345
|
+
{ name: "Turbo_Express", mileage: 320211 },
|
|
346
|
+
{ name: "gapcio9933", mileage: 319599 },
|
|
347
|
+
{ name: "R8 anderson", mileage: 319004 },
|
|
348
|
+
{ name: "lorddarki85", mileage: 317788 }
|
|
349
|
+
],
|
|
350
|
+
currentPlayer: {
|
|
351
|
+
rank: 3365,
|
|
352
|
+
name: "ZyRoX Drum",
|
|
353
|
+
mileage: 59515
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
// 页面加载时初始化示例数据
|
|
358
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
359
|
+
init(sampleData);
|
|
360
|
+
});
|
|
361
|
+
</script>
|
|
362
|
+
</body>
|
|
363
|
+
</html>
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* heatmap.js v2.0.2 | JavaScript Heatmap Library
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2008-2016 Patrick Wied <heatmapjs@patrick-wied.at> - All rights reserved.
|
|
5
|
+
* Dual licensed under MIT and Beerware license
|
|
6
|
+
*
|
|
7
|
+
* :: 2016-02-04 21:25
|
|
8
|
+
*/
|
|
9
|
+
(function (a, b, c) { if (typeof module !== "undefined" && module.exports) { module.exports = c() } else if (typeof define === "function" && define.amd) { define(c) } else { b[a] = c() } })("h337", this, function () { var a = { defaultRadius: 40, defaultRenderer: "canvas2d", defaultGradient: { .25: "rgb(0,0,255)", .55: "rgb(0,255,0)", .85: "yellow", 1: "rgb(255,0,0)" }, defaultMaxOpacity: 1, defaultMinOpacity: 0, defaultBlur: .85, defaultXField: "x", defaultYField: "y", defaultValueField: "value", plugins: {} }; var b = function h() { var b = function d(a) { this._coordinator = {}; this._data = []; this._radi = []; this._min = 0; this._max = 1; this._xField = a["xField"] || a.defaultXField; this._yField = a["yField"] || a.defaultYField; this._valueField = a["valueField"] || a.defaultValueField; if (a["radius"]) { this._cfgRadius = a["radius"] } }; var c = a.defaultRadius; b.prototype = { _organiseData: function (a, b) { var d = a[this._xField]; var e = a[this._yField]; var f = this._radi; var g = this._data; var h = this._max; var i = this._min; var j = a[this._valueField] || 1; var k = a.radius || this._cfgRadius || c; if (!g[d]) { g[d] = []; f[d] = [] } if (!g[d][e]) { g[d][e] = j; f[d][e] = k } else { g[d][e] += j } if (g[d][e] > h) { if (!b) { this._max = g[d][e] } else { this.setDataMax(g[d][e]) } return false } else { return { x: d, y: e, value: j, radius: k, min: i, max: h } } }, _unOrganizeData: function () { var a = []; var b = this._data; var c = this._radi; for (var d in b) { for (var e in b[d]) { a.push({ x: d, y: e, radius: c[d][e], value: b[d][e] }) } } return { min: this._min, max: this._max, data: a } }, _onExtremaChange: function () { this._coordinator.emit("extremachange", { min: this._min, max: this._max }) }, addData: function () { if (arguments[0].length > 0) { var a = arguments[0]; var b = a.length; while (b--) { this.addData.call(this, a[b]) } } else { var c = this._organiseData(arguments[0], true); if (c) { this._coordinator.emit("renderpartial", { min: this._min, max: this._max, data: [c] }) } } return this }, setData: function (a) { var b = a.data; var c = b.length; this._data = []; this._radi = []; for (var d = 0; d < c; d++) { this._organiseData(b[d], false) } this._max = a.max; this._min = a.min || 0; this._onExtremaChange(); this._coordinator.emit("renderall", this._getInternalData()); return this }, removeData: function () { }, setDataMax: function (a) { this._max = a; this._onExtremaChange(); this._coordinator.emit("renderall", this._getInternalData()); return this }, setDataMin: function (a) { this._min = a; this._onExtremaChange(); this._coordinator.emit("renderall", this._getInternalData()); return this }, setCoordinator: function (a) { this._coordinator = a }, _getInternalData: function () { return { max: this._max, min: this._min, data: this._data, radi: this._radi } }, getData: function () { return this._unOrganizeData() } }; return b }(); var c = function i() { var a = function (a) { var b = a.gradient || a.defaultGradient; var c = document.createElement("canvas"); var d = c.getContext("2d"); c.width = 256; c.height = 1; var e = d.createLinearGradient(0, 0, 256, 1); for (var f in b) { e.addColorStop(f, b[f]) } d.fillStyle = e; d.fillRect(0, 0, 256, 1); return d.getImageData(0, 0, 256, 1).data }; var b = function (a, b) { var c = document.createElement("canvas"); var d = c.getContext("2d"); var e = a; var f = a; c.width = c.height = a * 2; if (b == 1) { d.beginPath(); d.arc(e, f, a, 0, 2 * Math.PI, false); d.fillStyle = "rgba(0,0,0,1)"; d.fill() } else { var g = d.createRadialGradient(e, f, a * b, e, f, a); g.addColorStop(0, "rgba(0,0,0,1)"); g.addColorStop(1, "rgba(0,0,0,0)"); d.fillStyle = g; d.fillRect(0, 0, 2 * a, 2 * a) } return c }; var c = function (a) { var b = []; var c = a.min; var d = a.max; var e = a.radi; var a = a.data; var f = Object.keys(a); var g = f.length; while (g--) { var h = f[g]; var i = Object.keys(a[h]); var j = i.length; while (j--) { var k = i[j]; var l = a[h][k]; var m = e[h][k]; b.push({ x: h, y: k, value: l, radius: m }) } } return { min: c, max: d, data: b } }; function d(b) { var c = b.container; var d = this.shadowCanvas = document.createElement("canvas"); var e = this.canvas = b.canvas || document.createElement("canvas"); var f = this._renderBoundaries = [1e4, 1e4, 0, 0]; var g = getComputedStyle(b.container) || {}; e.className = "heatmap-canvas"; this._width = e.width = d.width = b.width || +g.width.replace(/px/, ""); this._height = e.height = d.height = b.height || +g.height.replace(/px/, ""); this.shadowCtx = d.getContext("2d"); this.ctx = e.getContext("2d"); e.style.cssText = d.style.cssText = "position:absolute;left:0;top:0;"; c.style.position = "relative"; c.appendChild(e); this._palette = a(b); this._templates = {}; this._setStyles(b) } d.prototype = { renderPartial: function (a) { if (a.data.length > 0) { this._drawAlpha(a); this._colorize() } }, renderAll: function (a) { this._clear(); if (a.data.length > 0) { this._drawAlpha(c(a)); this._colorize() } }, _updateGradient: function (b) { this._palette = a(b) }, updateConfig: function (a) { if (a["gradient"]) { this._updateGradient(a) } this._setStyles(a) }, setDimensions: function (a, b) { this._width = a; this._height = b; this.canvas.width = this.shadowCanvas.width = a; this.canvas.height = this.shadowCanvas.height = b }, _clear: function () { this.shadowCtx.clearRect(0, 0, this._width, this._height); this.ctx.clearRect(0, 0, this._width, this._height) }, _setStyles: function (a) { this._blur = a.blur == 0 ? 0 : a.blur || a.defaultBlur; if (a.backgroundColor) { this.canvas.style.backgroundColor = a.backgroundColor } this._width = this.canvas.width = this.shadowCanvas.width = a.width || this._width; this._height = this.canvas.height = this.shadowCanvas.height = a.height || this._height; this._opacity = (a.opacity || 0) * 255; this._maxOpacity = (a.maxOpacity || a.defaultMaxOpacity) * 255; this._minOpacity = (a.minOpacity || a.defaultMinOpacity) * 255; this._useGradientOpacity = !!a.useGradientOpacity }, _drawAlpha: function (a) { var c = this._min = a.min; var d = this._max = a.max; var a = a.data || []; var e = a.length; var f = 1 - this._blur; while (e--) { var g = a[e]; var h = g.x; var i = g.y; var j = g.radius; var k = Math.min(g.value, d); var l = h - j; var m = i - j; var n = this.shadowCtx; var o; if (!this._templates[j]) { this._templates[j] = o = b(j, f) } else { o = this._templates[j] } var p = (k - c) / (d - c); n.globalAlpha = p < .01 ? .01 : p; n.drawImage(o, l, m); if (l < this._renderBoundaries[0]) { this._renderBoundaries[0] = l } if (m < this._renderBoundaries[1]) { this._renderBoundaries[1] = m } if (l + 2 * j > this._renderBoundaries[2]) { this._renderBoundaries[2] = l + 2 * j } if (m + 2 * j > this._renderBoundaries[3]) { this._renderBoundaries[3] = m + 2 * j } } }, _colorize: function () { var a = this._renderBoundaries[0]; var b = this._renderBoundaries[1]; var c = this._renderBoundaries[2] - a; var d = this._renderBoundaries[3] - b; var e = this._width; var f = this._height; var g = this._opacity; var h = this._maxOpacity; var i = this._minOpacity; var j = this._useGradientOpacity; if (a < 0) { a = 0 } if (b < 0) { b = 0 } if (a + c > e) { c = e - a } if (b + d > f) { d = f - b } var k = this.shadowCtx.getImageData(a, b, c, d); var l = k.data; var m = l.length; var n = this._palette; for (var o = 3; o < m; o += 4) { var p = l[o]; var q = p * 4; if (!q) { continue } var r; if (g > 0) { r = g } else { if (p < h) { if (p < i) { r = i } else { r = p } } else { r = h } } l[o - 3] = n[q]; l[o - 2] = n[q + 1]; l[o - 1] = n[q + 2]; l[o] = j ? n[q + 3] : r } k.data = l; this.ctx.putImageData(k, a, b); this._renderBoundaries = [1e3, 1e3, 0, 0] }, getValueAt: function (a) { var b; var c = this.shadowCtx; var d = c.getImageData(a.x, a.y, 1, 1); var e = d.data[3]; var f = this._max; var g = this._min; b = Math.abs(f - g) * (e / 255) >> 0; return b }, getDataURL: function () { return this.canvas.toDataURL() } }; return d }(); var d = function j() { var b = false; if (a["defaultRenderer"] === "canvas2d") { b = c } return b }(); var e = { merge: function () { var a = {}; var b = arguments.length; for (var c = 0; c < b; c++) { var d = arguments[c]; for (var e in d) { a[e] = d[e] } } return a } }; var f = function k() { var c = function h() { function a() { this.cStore = {} } a.prototype = { on: function (a, b, c) { var d = this.cStore; if (!d[a]) { d[a] = [] } d[a].push(function (a) { return b.call(c, a) }) }, emit: function (a, b) { var c = this.cStore; if (c[a]) { var d = c[a].length; for (var e = 0; e < d; e++) { var f = c[a][e]; f(b) } } } }; return a }(); var f = function (a) { var b = a._renderer; var c = a._coordinator; var d = a._store; c.on("renderpartial", b.renderPartial, b); c.on("renderall", b.renderAll, b); c.on("extremachange", function (b) { a._config.onExtremaChange && a._config.onExtremaChange({ min: b.min, max: b.max, gradient: a._config["gradient"] || a._config["defaultGradient"] }) }); d.setCoordinator(c) }; function g() { var g = this._config = e.merge(a, arguments[0] || {}); this._coordinator = new c; if (g["plugin"]) { var h = g["plugin"]; if (!a.plugins[h]) { throw new Error("Plugin '" + h + "' not found. Maybe it was not registered.") } else { var i = a.plugins[h]; this._renderer = new i.renderer(g); this._store = new i.store(g) } } else { this._renderer = new d(g); this._store = new b(g) } f(this) } g.prototype = { addData: function () { this._store.addData.apply(this._store, arguments); return this }, removeData: function () { this._store.removeData && this._store.removeData.apply(this._store, arguments); return this }, setData: function () { this._store.setData.apply(this._store, arguments); return this }, setDataMax: function () { this._store.setDataMax.apply(this._store, arguments); return this }, setDataMin: function () { this._store.setDataMin.apply(this._store, arguments); return this }, configure: function (a) { this._config = e.merge(this._config, a); this._renderer.updateConfig(this._config); this._coordinator.emit("renderall", this._store._getInternalData()); return this }, repaint: function () { this._coordinator.emit("renderall", this._store._getInternalData()); return this }, getData: function () { return this._store.getData() }, getDataURL: function () { return this._renderer.getDataURL() }, getValueAt: function (a) { if (this._store.getValueAt) { return this._store.getValueAt(a) } else if (this._renderer.getValueAt) { return this._renderer.getValueAt(a) } else { return null } } }; return g }(); var g = { create: function (a) { return new f(a) }, register: function (b, c) { a.plugins[b] = c } }; return g });
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Leaflet Heatmap Overlay
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2008-2016, Patrick Wied (https://www.patrick-wied.at)
|
|
5
|
+
* Dual-licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
6
|
+
* and the Beerware (http://en.wikipedia.org/wiki/Beerware) license.
|
|
7
|
+
*/
|
|
8
|
+
; (function (name, context, factory) {
|
|
9
|
+
// Supports UMD. AMD, CommonJS/Node.js and browser context
|
|
10
|
+
if (typeof module !== "undefined" && module.exports) {
|
|
11
|
+
module.exports = factory(
|
|
12
|
+
require('heatmap.js'),
|
|
13
|
+
require('leaflet')
|
|
14
|
+
);
|
|
15
|
+
} else if (typeof define === "function" && define.amd) {
|
|
16
|
+
define(['heatmap.js', 'leaflet'], factory);
|
|
17
|
+
} else {
|
|
18
|
+
// browser globals
|
|
19
|
+
if (typeof window.h337 === 'undefined') {
|
|
20
|
+
throw new Error('heatmap.js must be loaded before the leaflet heatmap plugin');
|
|
21
|
+
}
|
|
22
|
+
if (typeof window.L === 'undefined') {
|
|
23
|
+
throw new Error('Leaflet must be loaded before the leaflet heatmap plugin');
|
|
24
|
+
}
|
|
25
|
+
context[name] = factory(window.h337, window.L);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
})("HeatmapOverlay", this, function (h337, L) {
|
|
29
|
+
'use strict';
|
|
30
|
+
|
|
31
|
+
// Leaflet < 0.8 compatibility
|
|
32
|
+
if (typeof L.Layer === 'undefined') {
|
|
33
|
+
L.Layer = L.Class;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var HeatmapOverlay = L.Layer.extend({
|
|
37
|
+
|
|
38
|
+
initialize: function (config) {
|
|
39
|
+
this.cfg = config;
|
|
40
|
+
this._el = L.DomUtil.create('div', 'leaflet-zoom-hide');
|
|
41
|
+
this._data = [];
|
|
42
|
+
this._max = 1;
|
|
43
|
+
this._min = 0;
|
|
44
|
+
this.cfg.container = this._el;
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
onAdd: function (map) {
|
|
48
|
+
var size = map.getSize();
|
|
49
|
+
|
|
50
|
+
this._map = map;
|
|
51
|
+
|
|
52
|
+
this._width = size.x;
|
|
53
|
+
this._height = size.y;
|
|
54
|
+
|
|
55
|
+
this._el.style.width = size.x + 'px';
|
|
56
|
+
this._el.style.height = size.y + 'px';
|
|
57
|
+
this._el.style.position = 'absolute';
|
|
58
|
+
|
|
59
|
+
this._origin = this._map.layerPointToLatLng(new L.Point(0, 0));
|
|
60
|
+
|
|
61
|
+
map.getPanes().overlayPane.appendChild(this._el);
|
|
62
|
+
|
|
63
|
+
if (!this._heatmap) {
|
|
64
|
+
this._heatmap = h337.create(this.cfg);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// this resets the origin and redraws whenever
|
|
68
|
+
// the zoom changed or the map has been moved
|
|
69
|
+
map.on('moveend', this._reset, this);
|
|
70
|
+
this._draw();
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
addTo: function (map) {
|
|
74
|
+
map.addLayer(this);
|
|
75
|
+
return this;
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
onRemove: function (map) {
|
|
79
|
+
// remove layer's DOM elements and listeners
|
|
80
|
+
map.getPanes().overlayPane.removeChild(this._el);
|
|
81
|
+
|
|
82
|
+
map.off('moveend', this._reset, this);
|
|
83
|
+
},
|
|
84
|
+
_draw: function () {
|
|
85
|
+
if (!this._map) { return; }
|
|
86
|
+
|
|
87
|
+
var mapPane = this._map.getPanes().mapPane;
|
|
88
|
+
var point = mapPane._leaflet_pos;
|
|
89
|
+
|
|
90
|
+
// reposition the layer
|
|
91
|
+
this._el.style[HeatmapOverlay.CSS_TRANSFORM] = 'translate(' +
|
|
92
|
+
-Math.round(point.x) + 'px,' +
|
|
93
|
+
-Math.round(point.y) + 'px)';
|
|
94
|
+
|
|
95
|
+
this._update();
|
|
96
|
+
},
|
|
97
|
+
_update: function () {
|
|
98
|
+
var bounds, zoom, scale;
|
|
99
|
+
var generatedData = { max: this._max, min: this._min, data: [] };
|
|
100
|
+
|
|
101
|
+
bounds = this._map.getBounds();
|
|
102
|
+
zoom = this._map.getZoom();
|
|
103
|
+
scale = Math.pow(2, zoom);
|
|
104
|
+
|
|
105
|
+
if (this._data.length == 0) {
|
|
106
|
+
if (this._heatmap) {
|
|
107
|
+
this._heatmap.setData(generatedData);
|
|
108
|
+
}
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
var latLngPoints = [];
|
|
114
|
+
var radiusMultiplier = this.cfg.scaleRadius ? scale : 1;
|
|
115
|
+
var localMax = 0;
|
|
116
|
+
var localMin = 0;
|
|
117
|
+
var valueField = this.cfg.valueField;
|
|
118
|
+
var len = this._data.length;
|
|
119
|
+
|
|
120
|
+
while (len--) {
|
|
121
|
+
var entry = this._data[len];
|
|
122
|
+
var value = entry[valueField];
|
|
123
|
+
var latlng = entry.latlng;
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
// we don't wanna render points that are not even on the map ;-)
|
|
127
|
+
if (!bounds.contains(latlng)) {
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
// local max is the maximum within current bounds
|
|
131
|
+
localMax = Math.max(value, localMax);
|
|
132
|
+
localMin = Math.min(value, localMin);
|
|
133
|
+
|
|
134
|
+
var point = this._map.latLngToContainerPoint(latlng);
|
|
135
|
+
var latlngPoint = { x: Math.round(point.x), y: Math.round(point.y) };
|
|
136
|
+
latlngPoint[valueField] = value;
|
|
137
|
+
|
|
138
|
+
var radius;
|
|
139
|
+
|
|
140
|
+
if (entry.radius) {
|
|
141
|
+
radius = entry.radius * radiusMultiplier;
|
|
142
|
+
} else {
|
|
143
|
+
radius = (this.cfg.radius || 2) * radiusMultiplier;
|
|
144
|
+
}
|
|
145
|
+
latlngPoint.radius = radius;
|
|
146
|
+
latLngPoints.push(latlngPoint);
|
|
147
|
+
}
|
|
148
|
+
if (this.cfg.useLocalExtrema) {
|
|
149
|
+
generatedData.max = localMax;
|
|
150
|
+
generatedData.min = localMin;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
generatedData.data = latLngPoints;
|
|
154
|
+
|
|
155
|
+
this._heatmap.setData(generatedData);
|
|
156
|
+
},
|
|
157
|
+
setData: function (data) {
|
|
158
|
+
this._max = data.max || this._max;
|
|
159
|
+
this._min = data.min || this._min;
|
|
160
|
+
var latField = this.cfg.latField || 'lat';
|
|
161
|
+
var lngField = this.cfg.lngField || 'lng';
|
|
162
|
+
var valueField = this.cfg.valueField || 'value';
|
|
163
|
+
|
|
164
|
+
// transform data to latlngs
|
|
165
|
+
var data = data.data;
|
|
166
|
+
var len = data.length;
|
|
167
|
+
var d = [];
|
|
168
|
+
|
|
169
|
+
while (len--) {
|
|
170
|
+
var entry = data[len];
|
|
171
|
+
var latlng = new L.LatLng(entry[latField], entry[lngField]);
|
|
172
|
+
var dataObj = { latlng: latlng };
|
|
173
|
+
dataObj[valueField] = entry[valueField];
|
|
174
|
+
if (entry.radius) {
|
|
175
|
+
dataObj.radius = entry.radius;
|
|
176
|
+
}
|
|
177
|
+
d.push(dataObj);
|
|
178
|
+
}
|
|
179
|
+
this._data = d;
|
|
180
|
+
|
|
181
|
+
this._draw();
|
|
182
|
+
},
|
|
183
|
+
// experimential... not ready.
|
|
184
|
+
addData: function (pointOrArray) {
|
|
185
|
+
if (pointOrArray.length > 0) {
|
|
186
|
+
var len = pointOrArray.length;
|
|
187
|
+
while (len--) {
|
|
188
|
+
this.addData(pointOrArray[len]);
|
|
189
|
+
}
|
|
190
|
+
} else {
|
|
191
|
+
var latField = this.cfg.latField || 'lat';
|
|
192
|
+
var lngField = this.cfg.lngField || 'lng';
|
|
193
|
+
var valueField = this.cfg.valueField || 'value';
|
|
194
|
+
var entry = pointOrArray;
|
|
195
|
+
var latlng = new L.LatLng(entry[latField], entry[lngField]);
|
|
196
|
+
var dataObj = { latlng: latlng };
|
|
197
|
+
|
|
198
|
+
dataObj[valueField] = entry[valueField];
|
|
199
|
+
this._max = Math.max(this._max, dataObj[valueField]);
|
|
200
|
+
this._min = Math.min(this._min, dataObj[valueField]);
|
|
201
|
+
|
|
202
|
+
if (entry.radius) {
|
|
203
|
+
dataObj.radius = entry.radius;
|
|
204
|
+
}
|
|
205
|
+
this._data.push(dataObj);
|
|
206
|
+
this._draw();
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
_reset: function () {
|
|
210
|
+
this._origin = this._map.layerPointToLatLng(new L.Point(0, 0));
|
|
211
|
+
|
|
212
|
+
var size = this._map.getSize();
|
|
213
|
+
if (this._width !== size.x || this._height !== size.y) {
|
|
214
|
+
this._width = size.x;
|
|
215
|
+
this._height = size.y;
|
|
216
|
+
|
|
217
|
+
this._el.style.width = this._width + 'px';
|
|
218
|
+
this._el.style.height = this._height + 'px';
|
|
219
|
+
|
|
220
|
+
this._heatmap._renderer.setDimensions(this._width, this._height);
|
|
221
|
+
}
|
|
222
|
+
this._draw();
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
HeatmapOverlay.CSS_TRANSFORM = (function () {
|
|
227
|
+
var div = document.createElement('div');
|
|
228
|
+
var props = [
|
|
229
|
+
'transform',
|
|
230
|
+
'WebkitTransform',
|
|
231
|
+
'MozTransform',
|
|
232
|
+
'OTransform',
|
|
233
|
+
'msTransform'
|
|
234
|
+
];
|
|
235
|
+
|
|
236
|
+
for (var i = 0; i < props.length; i++) {
|
|
237
|
+
var prop = props[i];
|
|
238
|
+
if (div.style[prop] !== undefined) {
|
|
239
|
+
return prop;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return props[0];
|
|
243
|
+
})();
|
|
244
|
+
|
|
245
|
+
return HeatmapOverlay;
|
|
246
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:0 0}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-bottom,.leaflet-top{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,.5)}.leaflet-container{font-family:"Helvetica Neue",Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:focus,.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px 'Lucida Console',Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255,255,255,.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:focus,.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;-moz-box-sizing:border-box;box-sizing:border-box;background:rgba(255,255,255,.8);text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:17px 0;margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px rgba(0,0,0,.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:0 0}.leaflet-container a.leaflet-popup-close-button:focus,.leaflet-container a.leaflet-popup-close-button:hover{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,.4)}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{position:absolute;pointer-events:none;border:6px solid transparent;background:0 0;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
|