Add javascript to reset map list.
@@ -668,6 +668,21 @@ var updateMapFaceting = function (){
}
updateMapView();
+ var map_items_table = $('#map-items').DataTable();
+ map_items_table.clear().draw();
+
+
+ var num_of_points = 0;
+ var num_of_boxes = 0;
+
+ for (var k = 0; k < raw_results.length; k++) {
+ if (raw_results[k].coverage_type == 'point') {
+ num_of_points++;
+ } else if (raw_results[k].coverage_type == 'box') {
+ num_of_boxes++;
+ }
+ }
+ console.log("total number of data: " + data.length + " point: " + num_of_points + " box: " + num_of_boxes);
},
failure: function(data) {
console.error("Ajax call for getting map data failed");
@@ -900,6 +915,7 @@ $(document).ready(function () {
},
dataType: 'json',
success: function (data) {
+
var json_results = [];
for (var j = 0; j < data.length; j++) {
var item = $.parseJSON(data[j]);
@@ -910,6 +926,17 @@ $(document).ready(function () {
setMapItemsList([], null);
$("#resource-search").show();
$("#discover-map-loading-spinner").hide();
+
+ var num_of_points = 0;
+ var num_of_boxes = 0;
+ for (var k = 0; k < raw_results.length; k++) {
+ if (raw_results[k].coverage_type == 'point') {
+ num_of_points++;
+ } else if (raw_results[k].coverage_type == 'box'){
+ num_of_boxes++;
+ }
+ }
+ console.log("total number of data: " + data.length + " point: " + num_of_points + " box: " + num_of_boxes);
},
failure: function(data) {
$("#discover-map-loading-spinner").hide();
