diff --git a/examples/al-init-custom-options.html b/examples/al-init-custom-options.html
index 4bfbb5d9..458cc25a 100644
--- a/examples/al-init-custom-options.html
+++ b/examples/al-init-custom-options.html
@@ -22,6 +22,7 @@
reticleColor: '#ff89ff', // change reticle color
reticleSize: 64, // change reticle size
showContextMenu: true,
+ showShareControl: true,
showFrame: true,
showZoomControl:true,
showSettingsControl:true,
diff --git a/src/js/DefaultActionsForContextMenu.js b/src/js/DefaultActionsForContextMenu.js
index a136bce2..d9a27147 100644
--- a/src/js/DefaultActionsForContextMenu.js
+++ b/src/js/DefaultActionsForContextMenu.js
@@ -235,10 +235,27 @@ export let DefaultActionsForContextMenu = (function () {
},
{
label: "HiPS2FITS cutout", action(o) {
- let hips2fitsUrl = 'https://alasky.cds.unistra.fr/hips-image-services/hips2fits?';
let hipsId = a.getBaseImageLayer().id;
let wcs = JSON.stringify(a.getViewWCS());
- hips2fitsUrl += 'wcs=' + encodeURIComponent(wcs) + '&hips=' + encodeURIComponent(hipsId);
+ let radec = a.getRaDec();
+ let fov = Math.max.apply(null, a.getFov());
+
+ let hips2fitsUrl = 'https://alasky.cds.unistra.fr/hips-image-services/hips2fits#'
+ // HiPS identifier
+ hips2fitsUrl += 'hips=' + encodeURIComponent(hipsId)
+
+ // Parameter given for full support of the Aladin view position and orientation in the sky
+ // WCS object
+
+ hips2fitsUrl += '&wcs=' + encodeURIComponent(wcs)
+ // Parameters given to fill the more readable user formular in HiPS2FITS interface
+ // Sky projection center
+ hips2fitsUrl += '&ra=' + radec[0]
+ hips2fitsUrl += '&dec=' + radec[1]
+ // FoV
+ hips2fitsUrl += '&fov=' + fov
+
+ // Open HiPS2FITS interface in a new browser tab
window.open(hips2fitsUrl, '_blank');
}
},