Fix bugs related to z scaling

This commit is contained in:
Fuhrmann 2025-03-28 13:01:52 +01:00
commit e3a4018582
6 changed files with 156 additions and 110 deletions

View file

@ -20,18 +20,22 @@ export function getCenter3D(extent: Extent) {
}
export async function getMetadata(serviceUrl: string) {
const response = await fetch(serviceUrl, {
method: "GET",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
});
try {
const response = await fetch(serviceUrl, {
method: "GET",
mode: "cors",
headers: {
"Content-Type": "application/json",
},
});
if (response.ok) {
return response.json();
} else {
throw new Error("HTTP error status: " + response.status);
if (response.ok) {
return response.json();
} else {
throw new Error("HTTP error status: " + response.status);
}
} catch (e) {
console.log(e);
}
}