I am trying to load a geojson file. I get an error (404) if the file doesn't exist but nothing happens if the file exists. I have tried different versions of D3 ... v3, v4, v5
console.log("hello"); // displays
d3.json("/sites/default/d3_files/json/conposcovidloc.geojson")
.then(function(data) {
console.log("data"); // nothing
})
.catch(function(error) {
console.log("error", error); // displays 404 error if file not found
});
What could be the problem?