Skip to content

Commit

Permalink
Record view / Display bounding polygon if set
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fxprunayre committed Dec 23, 2022
1 parent 8ca09bf commit 3219dea
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3219dea

Please sign in to comment.