From 3219dea6118b42371261a74e2553333a1b9cb735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Prunayre?= Date: Mon, 19 Dec 2022 18:15:38 +0100 Subject: [PATCH] Record view / Display bounding polygon if set Most of the time only a bounding box is provided in metadata records but sometimes bounding polygons are also used. Add the possibility to return the bounding polygon if available for a metadata record. For the time being, this is only rendered in the record view. For search results, only the bounding box is rendered (as bounding polygon can increase a lot the search response size). If some user wants to highlight polygons in the small map, they can add the `shape` field in the `gnESFacet` include list. --- .../resources/catalog/components/common/map/mapService.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web-ui/src/main/resources/catalog/components/common/map/mapService.js b/web-ui/src/main/resources/catalog/components/common/map/mapService.js index b95d6b4eaa..1866cb6d10 100644 --- a/web-ui/src/main/resources/catalog/components/common/map/mapService.js +++ b/web-ui/src/main/resources/catalog/components/common/map/mapService.js @@ -570,7 +570,10 @@ */ getBboxFeatureFromMd: function (md, proj) { var feat = new ol.Feature(); - var wkts = md.geom; + var wkts = md.shape || md.geom; + if (!angular.isArray(wkts)) { + wkts = [wkts]; + } var projExtent = proj.getExtent(); if (wkts && wkts.length) { var geometry;