mirror of https://github.com/MISP/misp-dashboard
Fixed bug multiple days geo queries
parent
810caa643a
commit
a6dd63548d
|
@ -328,13 +328,14 @@ small {
|
|||
var coord = circleRadius._latlng;
|
||||
var dateStart = datePickersRadiusWidgetFrom.datepicker("getDate").getTime() / 1000;
|
||||
var dateEnd = datePickersRadiusWidgetTo.datepicker("getDate").getTime() / 1000;
|
||||
$.getJSON("{{ url_for('getCoordsByRadius') }}?dateStart="+dateStart+"&dateEnd="+dateEnd+"¢erLat="+coord.lat+"¢erLon="+coord.lng+"&radius="+radius_km, function(list){
|
||||
$.getJSON("{{ url_for('getCoordsByRadius') }}?dateStart="+dateStart+"&dateEnd="+dateEnd+"¢erLat="+coord.lat+"¢erLon="+coord.lng+"&radius="+radius_km, function(allList){
|
||||
// remove old markers
|
||||
for (var i in savedMarkerRadius) {
|
||||
savedMarkerRadius[i].remove(); // remove marker
|
||||
}
|
||||
|
||||
var list = list[0];
|
||||
for (var listIndex in allList) {
|
||||
var list = allList[listIndex];
|
||||
for (var dayListIndex in list) {
|
||||
var jsonData = list[dayListIndex][0];
|
||||
var coordJson = list[dayListIndex][1];
|
||||
|
@ -343,6 +344,7 @@ small {
|
|||
savedMarkerRadius.push(marker);
|
||||
marker.bindPopup('<strong>'+jsonData.categ+'</strong><br>'+jsonData.value, {autoClose:false}).openPopup();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -383,7 +385,6 @@ small {
|
|||
buttonImageOnly: true,
|
||||
buttonText: "Select date",
|
||||
showAnim: "slideDown",
|
||||
onSelect: updateRadius
|
||||
};
|
||||
|
||||
datePickerWidget = $( "#datepicker" )
|
||||
|
|
Loading…
Reference in New Issue