Skip to content
Snippets Groups Projects

Fix map display for ATMO provider.

Merged Ghost User requested to merge hotfix-atmo-map into master
2 files
+ 1926
1961
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -84,8 +84,12 @@ export class DatasetMapComponent implements OnInit, OnDestroy {
@@ -84,8 +84,12 @@ export class DatasetMapComponent implements OnInit, OnDestroy {
if (!this.mapOptions.rasterService) {
if (!this.mapOptions.rasterService) {
return;
return;
}
}
const domain = this.mapOptions.rasterService.url.split('wms')[1];
this.mapOptions.rasterService.url = APP_CONFIG.backendUrls.wms + domain;
// If download data, use config url.
 
if (this.mapOptions.rasterService.url.includes('download.data')) {
 
const domain = this.mapOptions.rasterService.url.split('wms')[1];
 
this.mapOptions.rasterService.url = APP_CONFIG.backendUrls.wms + domain;
 
}
// If the data are just a sample, we will use this sample as geojson to display the interaction layer on the map.
// If the data are just a sample, we will use this sample as geojson to display the interaction layer on the map.
// Otherwise we use normally the MVT service.
// Otherwise we use normally the MVT service.
@@ -105,7 +109,7 @@ export class DatasetMapComponent implements OnInit, OnDestroy {
@@ -105,7 +109,7 @@ export class DatasetMapComponent implements OnInit, OnDestroy {
// Get bbox from the WMS service. If not exist, get it from metadata.
// Get bbox from the WMS service. If not exist, get it from metadata.
const wmsLink = this.metadata.link.find((e) => { return e.service === linkFormats.wms; });
const wmsLink = this.metadata.link.find((e) => { return e.service === linkFormats.wms; });
if (wmsLink && wmsLink.bbox_by_projection) {
if (wmsLink && wmsLink.bbox_by_projection && wmsLink.bbox_by_projection['EPSG:4171']) {
const bbox = wmsLink.bbox_by_projection['EPSG:4171'];
const bbox = wmsLink.bbox_by_projection['EPSG:4171'];
this.mapOptions.bbox = [bbox['miny'], bbox['minx'], bbox['maxy'], bbox['maxx']];
this.mapOptions.bbox = [bbox['miny'], bbox['minx'], bbox['maxy'], bbox['maxx']];
} else {
} else {
Loading