Skip to content
Snippets Groups Projects
Commit 07108233 authored by Nicolas Castejon's avatar Nicolas Castejon
Browse files

Merge branch 'hotfix-atmo-map' into 'master'

Fix map display for ATMO provider.

See merge request refonte-data/portail-data!52
parents f7255a6c b7327018
Branches
Tags
1 merge request!52Fix map display for ATMO provider.
Pipeline #1799 passed
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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment