Skip to content

Commit

Permalink
Map / External map viewer should not redirect to map app
Browse files Browse the repository at this point in the history
When an external mapviewer is configured, location URL is changed.
Only change location if buildAddToMapConfig return a config. If not, then it has redirected to the external viewer.

Backport attempt of
https://github.com/geonetwork/core-geonetwork/pull/6548/files ;
untested, will need help from @tkohr to validate.
  • Loading branch information
fxprunayre authored and pmauduit committed Aug 14, 2023
1 parent ec83cdb commit c0f1634
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions web-ui/src/main/resources/catalog/views/default/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,12 @@
addMdLayerToMap: function (link, md) {
// This is probably only a service
// Open the add service layer tab
$location.path("map").search({
add: encodeURIComponent(angular.toJson([buildAddToMapConfig(link, md)]))
});
var config = buildAddToMapConfig(link, md);
if (angular.isObject(config)) {
$location.path('map').search({
add: encodeURIComponent(angular.toJson(
[config]))});
}
return;
},
addAllMdLayersToMap: function (layers, md) {
Expand Down

0 comments on commit c0f1634

Please sign in to comment.