JS Lab 4
This commit is contained in:
@@ -29,7 +29,6 @@
|
||||
<input type="number" placeholder="MaxYear" name="maxYearInput" id="maxYearInput">
|
||||
|
||||
<button type="submit" value="Filter By Year" name="yearFilterBtn" onclick="filterByYear()">Filter By Year</button>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<!-- Filter by name stuff -->
|
||||
|
||||
@@ -5,7 +5,7 @@ function fetchJson() {
|
||||
.then(data => {
|
||||
console.log(data);
|
||||
const tableBody = document.getElementById("meteorTableBody");
|
||||
data.forEach(meteor => { // Just get 500 values for now
|
||||
data.splice(0,35).forEach(meteor => { // Just get 500 values for now
|
||||
const row = document.createElement("tr");
|
||||
const id = document.createElement("td");
|
||||
id.textContent = meteor.id ?? "-";
|
||||
|
||||
@@ -12,7 +12,7 @@ function loadMap() {
|
||||
fetch("./js/Meteorite_Landings.json")
|
||||
.then((response) => response.json())
|
||||
.then(data => {
|
||||
meteorData = data.splice(0,500);
|
||||
meteorData = data.splice(0,35);
|
||||
filteredData = [...meteorData];
|
||||
drawMarkers(filteredData);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user