For years i have sent the request to www.gebco.net, and now suddenly it stopped working: If i check the url, it is working, and the content of the url doesnt seems to have changed, here is the console output:
The actual code that gets and handles the data:
function getSeaDepth(lat, lon) {
var url = "https://www.gebco.net/data_and_products/gebco_web_services/web_map_service/mapserv?request=getfeatureinfo&service=wms&crs=EPSG:4326&layers=gebco_latest_2&query_layers=gebco_latest_2&BBOX=" + lat + "," + lon + "," + (lat + 0.001) + "," + (lon + 0.001) + "&info_format=text/plain&service=wms&x=20&y=20&width=900&height=600&version=1.3.0";
console.log(url);
//console.log(typeof (url));
var req = new XMLHttpRequest();
req.open('GET', url, false);
req.send(null);
if (req.status == 200)
var str = req.responseText;
var n = str.search("value_list = '");
var m = str.lastIndexOf("'");
var newstr = str.slice(n + 14, m);
console.log(newstr);
return (newstr);
};
- Could be CORS, but why now?
- Could be
req.send(null)
is no longer allowed, but how do i find out, and why now? - Could also
req.open('GET', url, false);
is not allowed, but it has worked for years, so why now?
Or, What could it be? tnx
Additional info/update:
I had this "Deprecation warning" for years, but now its actually in effect saying "Deprecation" instead of "deprecation warning" (I dont remember what it used to say, but i think it was something with warning....