Fix bugs related to z scaling
This commit is contained in:
parent
e7ff4c5493
commit
e3a4018582
6 changed files with 156 additions and 110 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue