Thanks @amandus, I have swapped the coordinates and I am now having trouble passing the response to my callback function in order to add it to my leaflet map.
//set an event listener for when the HTTP state changes
request.onreadystatechange = function () {
//a successful HTTP request returns a state of DONE and a status of 200
if (request.readyState === 4 && request.status === 200) {
// Trying to do is pass the request.response to a callback function to style it
drawIsochrone(request.response);
}
};
const body = '{"locations":[[-2.23179,53.464774],[-2.23185,53.464780]],"range":[300],"range_type":"time"}'
request.send(body);
};
function drawIsochrone (data) {
console.log(data);
}
I am getting “drawIsochrone is not a function”
Best regards.