Commit 660ed84d authored by Matthieu BENOIST's avatar Matthieu BENOIST
Browse files

Merge branch 'DOS0124802' into 'master'

Corrections on atmo download links and complex data array

See merge request !130
parents 4e985f28 2e983140
Pipeline #14532 passed with stage
in 8 minutes and 55 seconds
{ {
"name": "webapp", "name": "webapp",
"version": "2.7.3", "version": "2.7.4",
"license": "GNU Affero General Public License v3.0", "license": "GNU Affero General Public License v3.0",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
......
...@@ -22,6 +22,12 @@ export class DatasetDataDetailsComponent implements OnInit { ...@@ -22,6 +22,12 @@ export class DatasetDataDetailsComponent implements OnInit {
} catch (err) { } } catch (err) { }
} }
} }
else if (Array.isArray(properties[key])) {
try {
const parsed = JSON.parse(properties[key]);
properties[key] = parsed;
} catch (err) { }
}
} }
this._properties = properties; this._properties = properties;
} }
......
...@@ -152,6 +152,12 @@ export class ResourceDownloadItemComponent implements OnInit { ...@@ -152,6 +152,12 @@ export class ResourceDownloadItemComponent implements OnInit {
`${this.format.mapServerType}`; `${this.format.mapServerType}`;
const projectionAndBbox = this.getProjectionAndBbox(this.format); const projectionAndBbox = this.getProjectionAndBbox(this.format);
if (Array.isArray(this.metadata.providers) && this.metadata.providers[0].match(/ATMO/g)) {
if (this.format.mapServerType.match(/application\/json/)) {
outputFormat = `&${this.labelFormat[this.resource.type]}=GEOJSON`;
}
}
const baseParameters = this.resource.parametersUrl ? `?${this.resource.parametersUrl}` : ''; const baseParameters = this.resource.parametersUrl ? `?${this.resource.parametersUrl}` : '';
queryableUrl += baseParameters + queryableUrl += baseParameters +
layer + layer +
......
...@@ -284,7 +284,8 @@ export class DatasetDetailService { ...@@ -284,7 +284,8 @@ export class DatasetDetailService {
var fieldtype = field + '_' + eval(`this._dataset.fields.types.${field}`); var fieldtype = field + '_' + eval(`this._dataset.fields.types.${field}`);
newDataPropertiesOrder[field] = data.properties[fieldtype] ? data.properties[fieldtype] : newDataPropertiesOrder[field] = data.properties[fieldtype] ? data.properties[fieldtype] :
data.properties[field] ? data.properties[field] : data.properties[`${field}_json`] ? data.properties[field] ? data.properties[field] : data.properties[`${field}_json`] ?
data.properties[`${field}_json`] : ''; data.properties[`${field}_json`] : data.properties[`${field}_str`] ?
data.properties[`${field}_str`] : '';
}); });
......
Markdown is supported
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