-
Notifications
You must be signed in to change notification settings - Fork 89
/
map.html
305 lines (290 loc) · 25.3 KB
/
map.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<title>%l10n_title_map%</title>
<head>
<script src="//api-maps.yandex.ru/2.1.74/?apikey=%var_ymaps_apikey%&lang=ru-RU" type="text/javascript"></script>
<script src="js/FileSaver.min.js" type="text/javascript"></script>
<script type="text/javascript">
function initmap()
{
myMap = new ymaps.Map('map', {
center: [%var_lat%, %var_lon%],
zoom: 18,
controls: ['geolocationControl','searchControl','typeSelector','fullscreenControl','zoomControl']
}),
baseTileUrl = '3wifi.php?a=map&tileNumber=%t&zoom=%z&clat=%var_lat%&clon=%var_lon%';
var myTileUrl = baseTileUrl;
var showaps = settingsGetBool('3wifi.map.showaps', true);
var clusters = settingsGetBool('3wifi.map.clusters', true);
var mob = isMobile();
if (mob) myTileUrl += '&mobile=1';
if (!clusters) myTileUrl += '&scat=1';
remoteObjectManager = new ymaps.RemoteObjectManager(myTileUrl,
{ // Разбивать запросы по тайлам
splitRequests: false,
// Опции кластеров задаются с префиксом cluster.
clusterHasBalloon: false,
clusterHasHint: !mob,
// Опции объектов задаются с префиксом geoObject
geoObjectOpenBalloonOnClick: mob
});
userLocations = new ymaps.RemoteObjectManager('user.php?a=mylocmap&bbox=%b' + (mob ? '&mobile=1' : ''),
{ // Разбивать запросы по тайлам
splitRequests: false,
// Опции объектов задаются с префиксом geoObject
geoObjectOpenBalloonOnClick: mob
});
if (ProfileInfo.Level >= 1)
myMap.geoObjects.add(userLocations);
if (showaps) myMap.geoObjects.add(remoteObjectManager);
// Кнопка скрытия/показа точек доступа
var iconShowAP = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogPGc+CiAgPHRpdGxlPkxheWVyIDE8L3RpdGxlPgogIDxwYXRoIGlkPSJzdmdfMSIgZD0ibS02MTIsMzIwbDAsOTZsOTYsMGwwLC05NmwtOTYsMHptODMsODNsLTcwLDBsMCwtNzBsNzAsMGwwLDcweiIvPgogIDxwYXRoIGlkPSJzdmdfMiIgZD0ibTcuMzQwNDQ2LDIuNzU5NjM4YzIuODczNTkyLC0wLjIwNjk1MSA1LjgxMzcxNiwwLjg2ODE4NSA3Ljg2NDYyNCwyLjg5MzEyNGMwLjI2ODczLDAuMjc2NjQgMC4yMzM2ODYsMC43NjA1NzEgLTAuMDQ5ODIzLDEuMDE0MDkyYy0wLjI2MDM5MiwwLjMwNjk2NCAtMC43ODE4NDcsMC4zMTIzOSAtMS4wNTA1Nz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AwLjU0MTMyMywtMS42NzgyNDEgMS4zODEzNjQsLTEuNzc1MDM0eiIgZmlsbD0iIzdmN2Y3ZiIvPgogIDxwYXRoIGZpbHRlcj0idXJsKCNzdmdfN19ibHVyKSIgc3Ryb2tlPSJudWxsIiBpZD0ic3ZnXzciIGQ9Im0zLjQzNDc5OSwxMi4xODU1OThsOS43NzAzMDgsLTkuNzcwMzA5bDAuNzcwNzc2LDAuNzcwNzc2bC05Ljc3MDMwNyw5Ljc3MDMwOGwtMC43NzA3NzcsLTAuNzcwNzc1eiIgc3Ryb2tlLWxpbmVjYXA9Im51bGwiIHN0cm9rZS1saW5lam9pbj0ibnVsbCIgc3Ryb2tlLWRhc2hhcnJheT0ibnVsbCIgc3Ryb2tlLXdpZHRoPSJudWxsIiBmaWxsPSIjZTAwMjAyIi8+CiA8L2c+CiA8ZGVmcz4KICA8ZmlsdGVyIGhlaWdodD0iMjAwJSIgd2lkdGg9IjIwMCUiIHk9Ii01MCUiIHg9Ii01MCUiIGlkPSJzdmdfN19ibHVyIj4KICAgPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMC4zIiBpbj0iU291cmNlR3JhcGhpYyIvPgogIDwvZmlsdGVyPgogPC9kZWZzPgo8L3N2Zz4=';
var showButton = new ymaps.control.Button({
data: {
title: '%l10n_map_show_aps%',
image: (showaps ? iconShowAP : iconHideAP)
},
options: {
float: 'right'
},
state: {
selected: showaps
}
});
showButton.events
.add(
'select',
function () {
settingsSetBool('3wifi.map.showaps', true);
myMap.geoObjects.add(remoteObjectManager);
showButton.data.set('image', iconShowAP);
}
)
.add(
'deselect',
function () {
settingsSetBool('3wifi.map.showaps', false);
myMap.geoObjects.remove(remoteObjectManager);
showButton.data.set('image', iconHideAP);
}
);
myMap.controls.add(showButton);
// Кнопка включения/выключения кластеризации
var iconClustAP = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9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zMsMC41MjQtMC41NDcsMC43Yy0wLjExOCwwLjE1My0wLjI3MSwwLjMyMS0wLjQ2OCwwLjQ5NWMtMC4yMjMsMC4xOTUtMC40NjMsMC4zNjEtMC43MjcsMC40ODIgYy0wLjQwNiwwLjE4Ny0wLjg2NSwwLjI2NC0xLjQsMC4yYy0wLjExNi0wLjAyMi0wLjE0OC0wLjAyOC0wLjIxNy0wLjA0OWMtMC44NjMtMC4yMjYtMS40NjMtMC44ODEtMS42Ni0xLjY4IGMtMC4xMDYtMC40MzQtMC4wODgtMC44MTQtMC4wMDYtMS4xODJjMC4wMTctMC4wNywwLjAzMi0wLjEzNSwwLjA1MS0wLjE5M2wyLjc3LTEwLjI1OEM1LjA1OSwyNiwwLDIwLjMsMCwxMy41TDAsMTMuNXoiIC8+DQogICAgPHBhdGggY2xhc3M9ImN1c3RvbV9jb2xvcl9zb2xpZCIgZD0iTTIsMTMuNUMyLDcuMSw3LjEsMiwxMy41LDJTMjUsNy4xLDI1LDEzLjVjMCwwLjc2OC0wLjA3NSwxLjUxNy0wLjIxOSwyLjJjMC4wMSwwLDAsMC4xLDAsMC4xNTEgYy0xLjI4NCw4LjAwMi0xMy4wODMsMjEuOTQ4LTEzLjA4MywyMS45NDhzLTAuMzc1LDAuNTIzLTAuNzMyLDAuNGMtMC4zNjctMC4wOTQtMC4yMDQtMC41NjItMC4yMDQtMC41NjJsMy40MzItMTIuNzA5IEMxMy45NzcsMjUsMTMuNywyNSwxMy41LDI1QzcuMTQ4LDI1LDIsMTkuOSwyLDEzLjVMMiwxMy41eiIgLz4NCiAgICA8Y2lyY2xlIGNsYXNzPSJ3aGl0ZV9zb2xpZCIgY3g9IjEzLjUiIGN5PSIxMy41IiByPSI4LjUiIC8+DQogIDwvZz4NCjwvc3ZnPg==';
var clustButton = new ymaps.control.Button({
data: {
title: '%l10n_map_clusters%',
image: (clusters ? iconClustAP : iconScattAP)
},
options: {
float: 'right'
},
state: {
selected: clusters
}
});
clustButton.events
.add(
'select',
function () {
settingsSetBool('3wifi.map.clusters', true);
remoteObjectManager.setUrlTemplate(baseTileUrl);
remoteObjectManager.reloadData();
clustButton.data.set('image', iconClustAP);
}
)
.add(
'deselect',
function () {
settingsSetBool('3wifi.map.clusters', false);
remoteObjectManager.setUrlTemplate(baseTileUrl + '&scat=1');
remoteObjectManager.reloadData();
clustButton.data.set('image', iconScattAP);
}
);
myMap.controls.add(clustButton);
// Кнопка перехода к диапазонам
var rangesButton = new ymaps.control.Button({
data: {
title: '%l10n_map_ranges%',
image: 'img/icon-ip.png'
},
options: {
float: 'right',
selectOnClick: false
}
});
rangesButton.events
.add(
'click',
function () {
var coords = myMap.getCenter();
var bounds = myMap.getBounds();
var rad = ymaps.coordSystem.geo.getDistance(bounds[0], bounds[1]);
rad = Math.ceil(((rad / 1000) / 2) * 10) / 10;
var lat = Math.round(coords[0] * 10000000) / 10000000;
var lon = Math.round(coords[1] * 10000000) / 10000000;
if (rad > 25)
{
alert('%l10n_loc_large%');
return false;
}
window.open('ranges?lat=' + lat + '&lon=' + lon + '&rad=' + rad, '_blank');
}
);
myMap.controls.add(rangesButton);
// Кнопка добавления локации в избранное
var faveButton = new ymaps.control.Button({
data: {
title: '%l10n_map_favorite%',
image: 'img/icon-fav-on.png'
},
options: {
float: 'right',
selectOnClick: false
}
});
faveButton.events
.add(
'click',
function () {
var cmt = prompt("%l10n_loc_save%", '%l10n_loc_name%');
if (cmt == null || cmt == '') return;
var coords = myMap.getCenter();
var onFail = function(jqXHR, textStatus, errorThrown)
{
alert('%l10n_err_data%');
};
$.get('user.php?a=token', function(json)
{
if (!json.result)
{
alert(errorStr(json.error));
return;
} else {
var data = '';
data += '&token=' + encodeURIComponent(json.token);
data += '&lat=' + coords[0];
data += '&lon=' + coords[1];
data += '&cmt=' + cmt;
$.get('user.php?a=addloc' + data, function(json)
{
if (!json.result)
{
alert(errorStr(json.error));
return;
}
userLocations.reloadData();
if (json.new)
{
alert('%l10n_loc_added%');
return;
}
alert('%l10n_loc_updated%');
}).fail(onFail);
}
}).fail(onFail);
}
);
myMap.controls.add(faveButton);
// Кнопка закрепления локации
var lockButton = new ymaps.control.Button({
data: {
title: '%l10n_map_lock_coords%',
image: 'img/icon-location.png'
},
options: {
float: 'right',
selectOnClick: false
}
});
lockButton.events
.add(
'click',
function () {
if (ProfileInfo.Level < 1)
{
alert(errorStr('lowlevel'));
return false;
}
var coords = myMap.getCenter();
var bounds = myMap.getBounds();
var rad = ymaps.coordSystem.geo.getDistance(bounds[0], bounds[1]);
rad = Math.ceil(((rad / 1000) / 2) * 10) / 10;
var lat = Math.round(coords[0] * 10000000) / 10000000;
var lon = Math.round(coords[1] * 10000000) / 10000000;
if (rad > 25)
{
alert('%l10n_loc_large%');
return false;
}
document.cookie = 'uselocation=' + escape('lat=' + lat + '&lon=' + lon + '&rad=' + rad);
if (getCookie('uselocation') != '')
{
alert('%l10n_loc_locked%');
}
}
);
myMap.controls.add(lockButton);
// Кнопка сохранения точек в файл
var iconSave = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaGVpZ2h0PSIxNnB4IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2cHgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48dGl0bGUvPjxkZWZzLz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGlkPSJJY29ucyB3aXRoIG51bWJlcnMiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIj48ZyBmaWxsPSIjMDAwMDAwIiBpZD0iR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC03MjAuMDAwMDAwLCAtNDMyLjAwMDAwMCkiPjxwYXRoIGQ9Ik03MjEsNDQ2IEw3MzMsNDQ2IEw3MzMsNDQzIEw3MzUsNDQzIEw3MzUsNDQ2IEw3MzUsNDQ4IEw3MjEsNDQ4IFogTTcyMSw0NDMgTDcyMyw0NDMgTDcyMyw0NDYgTDcyMSw0NDYgWiBNNzI2LDQzMyBMNzMwLDQzMyBMNzMwLDQ0MCBMNzMyLDQ0MCBMNzI4LDQ0NSBMNzI0LDQ0MCBMNzI2LDQ0MCBaIE03MjYsNDMzIiBpZD0iUmVjdGFuZ2xlIDIxNyIvPjwvZz48L2c+PC9zdmc+';
var saveButton = new ymaps.control.Button({
data: {
title: '%l10n_map_aps_save%',
image: iconSave
},
options: {
float: 'right'
}
});
saveButton.events.add('click', function ()
{
var points = [];
var element = document.createElement('div'); // to convert special html chars
remoteObjectManager.objects.each(function (el)
{
//if (!remoteObjectManager.getObjectState(el.id).isShown) { return; }
var lat = el.geometry.coordinates[0];
var lon = el.geometry.coordinates[1];
var hints = el.properties.hintContent.split('<hr>');
for (var i = 0, l = hints.length; i < l; i++)
{
element.innerHTML = hints[i].split('<br>').slice(1).concat([lat, lon]).join("\t") + "\r\n";
hints[i] = element.textContent;
element.textContent = '';
}
points = points.concat(hints);
});
var blob = new Blob(points, {type: 'text/plain; charset=utf-8'});
saveAs(blob, '');
});
myMap.controls.add(saveButton, {float: 'right', selectOnClick: false});
}
function loginConfirm()
{
if (!confirm("%l10n_msg_map_reveal%")) return;
loginBtn(true);
}
function refreshLocation()
{
var coords = myMap.getCenter();
var lat = Math.round(coords[0] * 10000000) / 10000000;
var lon = Math.round(coords[1] * 10000000) / 10000000;
window.location = "?lat=" + lat + "&lon=" + lon;
}
function initpage()
{
ymaps.ready(initmap);
}
</script>
<style>
ymaps.ymaps-2-1-48-hint__text
{
max-height: 350px;
overflow-y: auto;
}
</style>
</head>
<body>
<div id=map style="width: 100%; height: 100%"></div>
</body>