Skip to content
Snippets Groups Projects
Commit 61bce660 authored by ext.sopra.ncastejon's avatar ext.sopra.ncastejon
Browse files

mend

parent 6f2eccf4
Branches fix-issue-157
No related tags found
No related merge requests found
...@@ -197,22 +197,14 @@ export class ResourceQueryableComponent implements OnInit { ...@@ -197,22 +197,14 @@ export class ResourceQueryableComponent implements OnInit {
`&typename=${this.resource.metadataLink.name}`; `&typename=${this.resource.metadataLink.name}`;
} }
// Set the dimension of the image based no the bbox aspect ratio
if (this.resource.type === linkFormats.wms) { if (this.resource.type === linkFormats.wms) {
// Set the dimension of the image based no the bbox ratio
const width = 700; const width = 700;
const longDiff = this.metadata.max_east - this.metadata.max_west; const longDiff = this.metadata.max_east - this.metadata.max_west;
const latDiff = this.metadata.max_north - this.metadata.max_south; const latDiff = this.metadata.max_north - this.metadata.max_south;
const ratio = longDiff / latDiff; const ratio = longDiff / latDiff;
const height = Math.round(width * ratio); const height = Math.round(width * ratio);
console.log(longDiff);
console.log(latDiff);
console.log(ratio);
console.log(height);
this.queryableParameters.baseParameters += `&WIDTH=${width}&HEIGHT=${height}`; this.queryableParameters.baseParameters += `&WIDTH=${width}&HEIGHT=${height}`;
console.log(this.queryableParameters.baseParameters);
} }
this.setProjection(this.selectedProjection); this.setProjection(this.selectedProjection);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment