|
@@ -274,8 +274,9 @@ function init_map() {
|
|
legend.onAdd = function (map) {
|
|
legend.onAdd = function (map) {
|
|
var div = L.DomUtil.create('div', 'info legend');
|
|
var div = L.DomUtil.create('div', 'info legend');
|
|
div.innerHTML = '<small>'+{{ _('Legend')|js_str }}+' :</small> ';
|
|
div.innerHTML = '<small>'+{{ _('Legend')|js_str }}+' :</small> ';
|
|
- div.innerHTML += '<i style="background: #ff7900" title="'+{{ _('ISP')|js_str }}+'"></i> ';
|
|
|
|
- div.innerHTML += '<i style="background: #00aac9" title="'+{{ _('Member of the FDN Federation')|js_str }}+'"></i> ';
|
|
|
|
|
|
+ div.innerHTML += '<i style="background: #EAEAEA" title="'+{{ _('Members that might do Internet Cube one day (ask them!)')|js_str }}+'"></i> ';
|
|
|
|
+ div.innerHTML += '<i style="background: #E5CC17" title="'+{{ _('Members that offers VPN services')|js_str }}+'"></i> ';
|
|
|
|
+ div.innerHTML += '<i style="background: #D20000" title="'+{{ _('Members that offers Internet Cube')|js_str }}+'"></i> ';
|
|
$(div).children('i').tooltip({container: 'body'});
|
|
$(div).children('i').tooltip({container: 'body'});
|
|
|
|
|
|
return div;
|
|
return div;
|
|
@@ -303,15 +304,18 @@ function init_map() {
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
- var icon = L.icon({
|
|
|
|
- iconUrl: '../static/img/marker.png',
|
|
|
|
|
|
+ var icon_nothing = L.icon({
|
|
|
|
+ iconUrl: '../static/img/marker_nothing.png',
|
|
|
|
|
|
iconSize: [14, 20], // size of the icon
|
|
iconSize: [14, 20], // size of the icon
|
|
iconAnchor: [7, 20], // point of the icon which will correspond to marker's location
|
|
iconAnchor: [7, 20], // point of the icon which will correspond to marker's location
|
|
popupAnchor: [0, -20] // point from which the popup should open relative to the iconAnchor
|
|
popupAnchor: [0, -20] // point from which the popup should open relative to the iconAnchor
|
|
});
|
|
});
|
|
- var icon_ffdn = $.extend(true, {}, icon);
|
|
|
|
- icon_ffdn['options']['iconUrl'] = '../static/img/marker_ffdn.png';
|
|
|
|
|
|
+ var icon_vpn = $.extend(true, {}, icon_nothing);
|
|
|
|
+ icon_vpn['options']['iconUrl'] = '../static/img/marker_vpn.png';
|
|
|
|
+
|
|
|
|
+ var icon_cube = $.extend(true, {}, icon_nothing);
|
|
|
|
+ icon_cube['options']['iconUrl'] = '../static/img/marker_cube.png';
|
|
|
|
|
|
window.isp_list={};
|
|
window.isp_list={};
|
|
$.getJSON('/isp/map_data_cube.json', function(data) {
|
|
$.getJSON('/isp/map_data_cube.json', function(data) {
|
|
@@ -323,7 +327,7 @@ function init_map() {
|
|
if (!isp.ffdn_member) return;
|
|
if (!isp.ffdn_member) return;
|
|
|
|
|
|
var marker = L.marker([isp['coordinates']['latitude'], isp['coordinates']['longitude']],
|
|
var marker = L.marker([isp['coordinates']['latitude'], isp['coordinates']['longitude']],
|
|
- {'icon': isp.distribute_zsh:1: ube ? icon_cube : icon_ffdn});
|
|
|
|
|
|
+ {'icon': isp.distribute_cube ? icon_cube : (isp.has_vpn? icon_vpn : icon_nothing)});
|
|
|
|
|
|
marker.bindPopup(isp.popup);
|
|
marker.bindPopup(isp.popup);
|
|
marker.getPopup().on('open', function() {
|
|
marker.getPopup().on('open', function() {
|