Commit b301ffea authored by ext.sopra.ncastejon's avatar ext.sopra.ncastejon
Browse files

Fix issue 157: images from WMS are flatten.

parent 0bd2fdf6
......@@ -197,6 +197,24 @@ export class ResourceQueryableComponent implements OnInit {
`&typename=${this.resource.metadataLink.name}`;
}
if (this.resource.type === linkFormats.wms) {
// Set the dimension of the image based no the bbox ratio
const width = 700;
const longDiff = this.metadata.max_east - this.metadata.max_west;
const latDiff = this.metadata.max_north - this.metadata.max_south;
const ratio = longDiff / latDiff;
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}`;
console.log(this.queryableParameters.baseParameters);
}
this.setProjection(this.selectedProjection);
if (this.resource.isStandard) {
......@@ -479,13 +497,13 @@ export class ResourceQueryableComponent implements OnInit {
this.messageClipboardRoot = geosource.mapMessages.copied;
setTimeout(() => {
this.messageClipboardRoot = geosource.mapMessages.share;
// tslint:disable-next-line: align
// tslint:disable-next-line: align
}, 2000);
} else {
this.messageClipboard = geosource.mapMessages.copied;
setTimeout(() => {
this.messageClipboard = geosource.mapMessages.share;
// tslint:disable-next-line: align
// tslint:disable-next-line: align
}, 2000);
}
......
......@@ -8,10 +8,10 @@
"middlewareLegacyAuth": "https://data-reloaded-dev.alpha.grandlyon.com/api/middleware-legacy/",
"email": "http://localhost:3001",
"matomo": "https://matomo-intothesky.alpha.grandlyon.com",
"elasticsearch": "https://data-reloaded-dev.alpha.grandlyon.com/api/es-consumer-aware",
"elasticsearch": "https://data-reloaded-dev.alpha.grandlyon.com/api/elasticsearch",
"catalogue": "https://data-reloaded-dev.alpha.grandlyon.com/api/catalogue",
"reuses": "https://data-reloaded-dev.alpha.grandlyon.com/api/reuses/reuses",
"proxyMap": "https://data-reloaded-dev.alpha.grandlyon.com/api/services",
"proxyMap": "https://data-reloaded-dev.alpha.grandlyon.com/api/map-services",
"geocoder": "https://download.data.grandlyon.com/geocoding/photon",
"seo": "/share"
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment