Commit b7327018 authored by ncastejon's avatar ncastejon
Browse files

Fix map display for ATMO provider.

parent f7255a6c
This diff is collapsed.
......@@ -84,8 +84,12 @@ export class DatasetMapComponent implements OnInit, OnDestroy {
if (!this.mapOptions.rasterService) {
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.
// Otherwise we use normally the MVT service.
......@@ -105,7 +109,7 @@ export class DatasetMapComponent implements OnInit, OnDestroy {
// 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; });
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'];
this.mapOptions.bbox = [bbox['miny'], bbox['minx'], bbox['maxy'], bbox['maxx']];
} else {
......
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