diff --git a/src/js/vendor/openfisviewer/openfisviewer.js b/src/js/vendor/openfisviewer/openfisviewer.js index b399bc2..63211c2 100644 --- a/src/js/vendor/openfisviewer/openfisviewer.js +++ b/src/js/vendor/openfisviewer/openfisviewer.js @@ -1434,6 +1434,19 @@ return envparams; } + /** + * OpenFisViewer.prototype.getDatasetViewTitle + * @param baseTitle + * @param viewparams + */ + OpenFisViewer.prototype.getDatasetViewTitle = function(baseTitle, viewparams){ + var layerTitle = baseTitle; + layerTitle += '
'; + layerTitle += '

View parameters: ' + + viewparams.replace(new RegExp(";", 'g'),"; ") + '

'; + return layerTitle; + } + /** * OpenFisViewer.prototype.mapDataset */ @@ -1449,10 +1462,7 @@ var layer = this_.getLayerByProperty(this_.selected_dsd.pid, 'id'); var viewparams = this_.getViewParams(); - var layerTitle = this_.selected_dsd.dataset.title; - layerTitle += '
'; - layerTitle += '

View parameters: ' - + viewparams.replace(new RegExp(";", 'g'),"; ") + '

'; + var layerTitle = this_.getDatasetViewTitle(this_.selected_dsd.dataset.title, viewparams); //dynamic styling properties var classType = $("#map-classtype-selector").select2('val'); @@ -1967,8 +1977,8 @@ metadata_promises.forEach(function(promise, i){ $.when(promise).then(function(md_entry) { var encoded_dataset = encoded_datasets[i]; - encoded_dataset.entry = md_entry; - console.log(encoded_dataset); + encoded_dataset.entry = md_entry; + encoded_dataset.entry.title = this_.getDatasetViewTitle(encoded_dataset.entry.title, encoded_dataset.viewparams); this_.selection.push(encoded_dataset.entry); //if it was the last dataset queried by user we fill the query interface with param values